media: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

media: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions

The V4L2 control framework is designed to allow drivers to instantiate controls and clusters without checking for errors after each call, checking hdl->error only once at the end.

However, if allocating the master control (controls[0]) fails, e.g. due to memory allocation failure, v4l2_ctrl_cluster() triggers a WARNING:

ncontrols == 0 || controls[0] == NULL WARNING: drivers/media/v4l2-core/v4l2-ctrls-core.c:2525 at v4l2_ctrl_cluster

Additionally, v4l2_ctrl_auto_cluster() attempts to dereference master->minimum without checking if controls[0] is NULL, leading to a NULL pointer dereference when master control creation fails.

Update both v4l2_ctrl_cluster() and v4l2_ctrl_auto_cluster() to silently return if controls[0] is NULL, preserving the design that control creation errors are caught at the end when the driver checks hdl->error. Also update function documentation in include/media/v4l2-ctrls.h.

[hverkuil: simplified the v4l2_ctrl_auto_cluster code a bit]

ProductVersions
Linux Linux71c689dc2e732d4cb190aaf0edea73116b1611bd to before 8db2017feb141e46a456defe7b05ec935bae3aaf Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before 827b56d45e562a80d063eff9a7be4ffb4f3257a6 Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before 7aa2f6a9cc2d467166174194de8697be8b830a36 Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before 802e61f3ba7ab0dd212866286ddbe062de157e65 Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before 90379d750ee6146b8ccaf28d00e98f7708b074fd Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before e6f3ebe63ce84cb5a7bccc00f5e70b2f29133fc2 Affected71c689dc2e732d4cb190aaf0edea73116b1611bd to before 9ff738f93084351ed6e818d4d58679a9e9083a8d Affected
Linux Linux5.14 Affectedbefore 5.14 Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.