CVE-2025-40207
Description
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try()
v4l2_subdev_call_state_try() macro allocates a subdev state with __v4l2_subdev_state_alloc(), but does not check the returned value. If __v4l2_subdev_state_alloc fails, it returns an ERR_PTR, and that would cause v4l2_subdev_call_state_try() to crash.
Add proper error handling to v4l2_subdev_call_state_try().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Missing error check in Linux kernel's v4l2_subdev_call_state_try macro can cause a crash if state allocation fails.
Vulnerability
The v4l2_subdev_call_state_try() macro in the Linux kernel's V4L2 sub-device framework allocates a sub-device state using __v4l2_subdev_state_alloc() but does not check the returned value. If the allocation fails, the function returns an ERR_PTR, and using it without validation leads to a kernel crash [1].
Exploitation
An attacker who can trigger memory allocation failure (e.g., by exhausting available memory) and invoke a code path that uses this macro can cause the kernel to dereference an invalid pointer. This may be achievable from user space through video device operations that rely on sub-device state handling, though no specific privileges are mentioned.
Impact
Successful exploitation results in a denial of service (kernel crash). No privilege escalation or data corruption beyond the crash has been indicated.
Mitigation
The fix adds proper error handling: if __v4l2_subdev_state_alloc() fails, the macro now returns an error code. The patch has been applied to multiple stable kernel branches [1][2][3][4], and system administrators should update their kernel to a patched version.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
55b0057459cdced30811fbed494e6336dc1f0a553530b3314f37df9a0eb5eVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/5b0057459cdc243ffb35617603142dcace09c711nvd
- git.kernel.org/stable/c/94e6336dc1f06a06f5b4cd04d4a012bba34f2857nvd
- git.kernel.org/stable/c/a553530b3314a0bdc98cf114cdbe204551a70a00nvd
- git.kernel.org/stable/c/ed30811fbed40751deb952bde534aa2632dc0bf7nvd
- git.kernel.org/stable/c/f37df9a0eb5e43fcfe02cbaef076123dc0d79c7envd
News mentions
0No linked articles in our index yet.