CVE-2026-138989
media: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions
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]
INFO
Published Date :
Nov. 30, 2026, 2:18 p.m.
Last Modified :
Nov. 30, 2026, 2:18 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
- Update v4l2_ctrl_cluster() to handle NULL controls[0].
- Update v4l2_ctrl_auto_cluster() to handle NULL controls[0].
- Update function documentation for controls.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-138989.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-138989 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-138989
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-138989 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-138989 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Nov. 30, 2026
Action Type Old Value New Value Added 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] Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/138xxx/CVE-2026-138989.json">CVE-2026-138989</a> Added Reference https://git.kernel.org/stable/c/7aa2f6a9cc2d467166174194de8697be8b830a36 Added Reference https://git.kernel.org/stable/c/802e61f3ba7ab0dd212866286ddbe062de157e65 Added Reference https://git.kernel.org/stable/c/827b56d45e562a80d063eff9a7be4ffb4f3257a6 Added Reference https://git.kernel.org/stable/c/8db2017feb141e46a456defe7b05ec935bae3aaf Added Reference https://git.kernel.org/stable/c/90379d750ee6146b8ccaf28d00e98f7708b074fd Added Reference https://git.kernel.org/stable/c/9ff738f93084351ed6e818d4d58679a9e9083a8d Added Reference https://git.kernel.org/stable/c/e6f3ebe63ce84cb5a7bccc00f5e70b2f29133fc2