# CVE-2025-40207: media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-11-12T21:56:35.988Z
- Modified: 2026-10-19T21:10:00.160Z
- Assigned by: Linux

## 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().

(As written by CVE List.)

## Affected

- Linux Linux: from 982c0487185bd466059ff618f398a8d074ddb654 before 5b0057459cdc243ffb35617603142dcace09c711; from 982c0487185bd466059ff618f398a8d074ddb654 before ed30811fbed40751deb952bde534aa2632dc0bf7; from 982c0487185bd466059ff618f398a8d074ddb654 before 94e6336dc1f06a06f5b4cd04d4a012bba34f2857; from 982c0487185bd466059ff618f398a8d074ddb654 before a553530b3314a0bdc98cf114cdbe204551a70a00; from 982c0487185bd466059ff618f398a8d074ddb654 before f37df9a0eb5e43fcfe02cbaef076123dc0d79c7e; 6.0 (not affected: before 6.0; from 6.1.157 up to 6.1.*; from 6.6.113 up to 6.6.*; from 6.12.54 up to 6.12.*; from 6.17.4 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/5b0057459cdc243ffb35617603142dcace09c711>
- <https://git.kernel.org/stable/c/ed30811fbed40751deb952bde534aa2632dc0bf7>
- <https://git.kernel.org/stable/c/94e6336dc1f06a06f5b4cd04d4a012bba34f2857>
- <https://git.kernel.org/stable/c/a553530b3314a0bdc98cf114cdbe204551a70a00>
- <https://git.kernel.org/stable/c/f37df9a0eb5e43fcfe02cbaef076123dc0d79c7e>

## Sources

- CVE List: [CVE-2025-40207](https://www.cve.org/CVERecord?id=CVE-2025-40207), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40207](https://nvd.nist.gov/vuln/detail/CVE-2025-40207), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-40207 · Whole record: https://cve.day/CVE-2025-40207.json · Rebuilt by cve.day 2026-11-25T22:59:07.602Z
