CVE-2024-40913
kernel: cachefiles: defer exposing anon_fd until after copy_to_user() succeeds
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 12, 2024
Updated · June 28, 2026
Description
A vulnerability was found in the Linux kernel's cachefiles component, regarding the handling of anonymous file descriptors. This issue occurs when an anonymous fd is exposed to userland before confirming the success of the copy_to_user() operation, which can lead to a use-after-free condition.
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
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 6.6CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition