CVE-2025-40272
kernel: mm/secretmem: fix use-after-free race in fault handler
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 6, 2025
Updated · July 30, 2026
Description
A use-after-free race condition was found in the secretmem subsystem of the Linux kernel. When two tasks concurrently fault on the same page in a memfd_secret file, the losing task may free its folio before restoring the direct map entry. This allows the freed page to be reallocated while still unmapped, causing potential memory corruption.
Statement
Exploitation requires use of the memfd_secret() syscall with concurrent page faults. This feature is used for storing sensitive data like cryptographic keys. The race window is narrow but could be widened by an attacker.
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 · 5.8CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L
CWE-1341 · Multiple Releases of Same Resource or Handle