Local memory corruption via hugetlbfs folio race
Published Oct 20, 2025 · Updated Oct 20, 2025
A race condition in affected Linux kernel releases allows local users to corrupt memory via concurrent hugetlbfs hole punching and page migration. remove_inode_single_folio checks folio_mapped() without holding the folio lock, mistakes a migration entry for an unmapped folio, and deletes it before migration restores the mapping. An ordinary local user can control both racing threads; the resulting stale writable mapping permits access to recycled huge-page memory and can panic the kernel.
Summary
What happened
A race condition in affected Linux kernel releases allows local users to corrupt memory via concurrent hugetlbfs hole punching and page migration. remove_inode_single_folio checks folio_mapped() without holding the folio lock, mistakes a migration entry for an unmapped folio, and deletes it before migration restores the mapping. An ordinary local user can control both racing threads; the resulting stale writable mapping permits access to recycled huge-page memory and can panic the kernel.
The record
- CVE
- CVE-2025-40006
- Published
- Oct 20, 2025
- Updated
- Oct 20, 2025
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1499
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Oct 20, 2025CVE publishedPublication date reported by the CVE source.
- Oct 20, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=4.5
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <21ee79ce938127f88fe07e409c1817f477dbe7ea
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <3e851448078f5b01f6264915df3cfef75e323a12
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <7b7387650dcf2881fd8bb55bcf3c8bd6c9542dd7
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <910d7749346c4b0acdc6e4adfdc4a9984281a206
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <91f548e920fbf8be3f285bfa3fa045ae017e836d
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <bc1c9ce8aeff45318332035dbef9713fb9e982d7
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <c1dc0524ab2cc3982d4e0d2bfac71a0cd4d65c39
- Affected versionversion=4aae8d1c051ea00b456da6811bc36d1f69de5445 <c9c2a51f91aea70e89b496cac360cd795a2b3c26
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo