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

Published Nov 30, 2026
·
Updated

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, v4l2ctrlcluster() triggers a WARNING:

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

Additionally, v4l2ctrlautocluster() 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 v4l2ctrlcluster() and v4l2ctrlautocluster() 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 v4l2ctrlautocluster code a bit]

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Update v4l2_ctrl_cluster() and v4l2_ctrl_auto_cluster() to return silently when controls[0] is NULL, and update their documentation in include/media/v4l2-ctrls.h.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203