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

CVE-2025-40197

CVE-2025-40197

Description

In the Linux kernel, the following vulnerability has been resolved:

media: mc: Clear minor number before put device

The device minor should not be cleared after the device is released.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's media controller subsystem, a use-after-free bug occurs when the device minor number is cleared after the device is released.

Vulnerability

Analysis

In the Linux kernel's media controller (mc) subsystem, a use-after-free vulnerability exists in the device cleanup path. The issue is that the device minor number is cleared after the device is released [1]. This violates the proper sequence where the minor number should be cleared before the device is put (released).

Exploitation

An attacker with local access and the ability to trigger device unregistration in the media controller subsystem can exploit this race condition. No special authentication is required beyond standard user-level access to interact with media device nodes. The bug manifests when a media device is being removed and concurrently a user-space process still holds a reference to the device node.

Impact

If successfully exploited, this flaw can lead to a use-after-free condition, potentially allowing an attacker to crash the system or escalate privileges. The kernel's memory safety is compromised, as the freed device structure may be reused for other purposes.

Mitigation

Patches have been committed to the Linux kernel stable branches [2][3]. Users should update to the latest kernel version containing the fix. The patch ensures the minor number is cleared before the device is released, preventing the use-after-free scenario.

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

Patches

8

Vulnerability mechanics

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

References

8

News mentions

0

No linked articles in our index yet.