Local privilege escalation via swap-cache race
Published Jul 9, 2025 · Updated Aug 5, 2026
Race condition in the Linux kernel userfaultfd subsystem allows local users to gain kernel-level control through UFFDIO_MOVE. In move_pages_pte(), a lockless swap-cache lookup can return a folio for a recycled swap entry, and the code re-parents it after locking without verifying that it still belongs to that entry. An unprivileged local process can coordinate UFFDIO_MOVE, page faults, and MADV_PAGEOUT in its own address space to corrupt reverse mappings and RSS accounting, expose or overwrite kernel memory, or panic the kernel.
Summary
What happened
Race condition in the Linux kernel userfaultfd subsystem allows local users to gain kernel-level control through UFFDIO_MOVE. In move_pages_pte(), a lockless swap-cache lookup can return a folio for a recycled swap entry, and the code re-parents it after locking without verifying that it still belongs to that entry. An unprivileged local process can coordinate UFFDIO_MOVE, page faults, and MADV_PAGEOUT in its own address space to corrupt reverse mappings and RSS accounting, expose or overwrite kernel memory, or panic the kernel.
The record
- CVE
- CVE-2025-38242
- Published
- Jul 9, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Jul 9, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record 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=6.8
- Affected versionversion=adef440691bab824e39c1b17382322d195e1fab0 <0ea148a799198518d8ebab63ddd0bb6114a103bc
- Affected versionversion=adef440691bab824e39c1b17382322d195e1fab0 <4c443046d8c9ed8724a4f4c3c2457d3ac8814b2f
- Affected versionversion=adef440691bab824e39c1b17382322d195e1fab0 <db2ca8074955ca64187a4fb596dd290b9c446cd3
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
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