CVE-2024-46838 userfaultfd: don't BUG_ON() if khugepaged yanks our page table
A local attacker can trigger a kernel crash by exploiting a race condition between userfaultfd and khugepaged, causing a denial of service.
- 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-46838?
CVE-2024-46838 is a medium-severity denial of service vulnerability in Linux kernel, published on 27 Sep 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: don't BUG_ON() if khugepaged yanks our page table
Since khugepaged was changed to allow retracting page tables in file mappings without holding the mmap lock, these BUG_ON()s are wrong - get rid of them.
We could also remove the preceding "if (unlikely(...))" block, but then we could reach pte_offset_map_lock() with transhuge pages not just for file mappings but also for anonymous mappings - which would probably be fine but I think is not necessarily expected.
Which versions are affected by CVE-2024-46838?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-46838?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-46838 being exploited?
There is no known exploitation of CVE-2024-46838 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-46838, DEBIAN-CVE-2024-46838, GHSA-vq28-2hrg-3rf4, UBUNTU-CVE-2024-46838.