CVE-2024-40948 mm/page_table_check: fix crash on ZONE_DEVICE
A null pointer dereference in the Linux kernel page table checker causes a crash when mapping ZONE_DEVICE pages, leading to 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-40948?
CVE-2024-40948 is a medium-severity vulnerability in Linux kernel, published on 12 Jul 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:
mm/page_table_check: fix crash on ZONE_DEVICE
Not all pages may apply to pgtable check. One example is ZONE_DEVICE pages: they map PFNs directly, and they don't allocate page_ext at all even if there's struct page around. One may reference devm_memremap_pages().
When both ZONE_DEVICE and page-table-check enabled, then try to map some dax memories, one can trigger kernel bug constantly now when the kernel was trying to inject some pfn maps on the dax device:
kernel BUG at mm/page_table_check.c:55!
While it's pretty legal to use set_pxx_at() for ZONE_DEVICE pages for page fault resolutions, skip all the checks if page_ext doesn't even exist in pgtable checker, which applies to ZONE_DEVICE but maybe more.
Which versions are affected by CVE-2024-40948?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-40948?
Apply the vendor's patch.
Is CVE-2024-40948 being exploited?
There is no known exploitation of CVE-2024-40948 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-40948, DEBIAN-CVE-2024-40948, GHSA-5jwr-2vm6-6gqr, UBUNTU-CVE-2024-40948.