VYPR
Unrated severityNVD Advisory· Published Nov 12, 2025· Updated Apr 15, 2026

CVE-2025-40207

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

2
  • Linux/Kernelinferred2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)

Patches

5

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.