CVE Database›Document archive›CVE-2025-40302

CVE-2025-40302

kernel: media: videobuf2: forbid remove_bufs when legacy fileio is active

Loading…

Severity

Moderate

Red Hat Product Security

6.3

CVSS 3.1

Review impact separately from score.

Published · December 8, 2025

Updated · July 30, 2026

Description

A memory corruption flaw was found in the Video4Linux2 (V4L2) videobuf2 subsystem in the Linux kernel. The vb2_ioctl_remove_bufs() function can be called while legacy fileio is active, corrupting internal buffer pointers. This can lead to use-after-free or other memory safety issues during subsequent I/O operations.

Statement

Exploiting this requires access to video capture devices and using both the remove_bufs ioctl and legacy fileio simultaneously. Standard video applications typically don't mix these access modes.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 6.3
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H

CWE-787 · Out-of-bounds Write