CVE-2024-27007 userfaultfd: change src_folio after ensuring it's unpinned in UFFDIO_MOVE
A flaw in the Linux kernel's userfaultfd subsystem allows memory corruption during huge-page moves, potentially enabling privilege escalation or code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-27007?
CVE-2024-27007 is a high-severity memory corruption vulnerability in Linux kernel, published on 1 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
userfaultfd: change src_folio after ensuring it's unpinned in UFFDIO_MOVE
Commit d7a08838ab74 ("mm: userfaultfd: fix unexpected change to src_folio when UFFDIO_MOVE fails") moved the src_folio->{mapping, index} changing to after clearing the page-table and ensuring that it's not pinned. This avoids failure of swapout+migration and possibly memory corruption.
However, the commit missed fixing it in the huge-page case.
Which versions are affected by CVE-2024-27007?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-27007?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-27007 being exploited?
There is no known exploitation of CVE-2024-27007 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-27007, DEBIAN-CVE-2024-27007, GHSA-2848-825f-x8rx, UBUNTU-CVE-2024-27007.