CVE-2025-40272
BaseFortify
Publication date: 2025-12-06
Last updated on: 2025-12-08
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a use-after-free race condition in the Linux kernel's secret memory subsystem (mm/secretmem). When two tasks concurrently cause a page fault on the same secret memory page, both may allocate a folio and remove the page from the direct map. Only one task succeeds in adding the folio to the file mapping, while the other frees its folio and attempts to restore the page to the direct map. However, the order of operations allows the page to become available to the allocator before it is restored in the direct map, potentially causing another task to access a page that is not properly mapped, leading to a supervisor not-present page fault.
How can this vulnerability impact me? :
This vulnerability can cause kernel instability or crashes due to supervisor not-present page faults triggered by improper memory handling in the secret memory subsystem. It may lead to denial of service or unexpected behavior in systems using memfd_secret(2) for secret memory management.
What immediate steps should I take to mitigate this vulnerability?
Apply the kernel update that includes the fix for the use-after-free race condition in the secretmem fault handler. This fix corrects the order of operations to prevent the page from becoming available to the allocator prematurely. Until the update is applied, avoid workloads that heavily use memfd_secret(2) to reduce the risk of triggering the race condition.