What’s Vulnerable › Vulnerabilities
CVE-2024-57881: mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-01-11 · updated 2026-06-17
- Weakness: CWE-476
Description
In the Linux kernel, the following vulnerability has been resolved: mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy() In split_large_buddy(), we might call pfn_to_page() on a PFN that might not exist. In corner cases, such as when freeing the highest pageblock in the last memory section, this could result with CONFIG_SPARSEMEM && !CONFIG_SPARSEMEM_EXTREME in __pfn_to_section() returning NULL and and __section_mem_map_addr() dereferencing that NULL pointer. Let's fix it, and avoid doing a pfn_to_page() call for the first iteration, where we already have the page. So far this was found by code inspection, but let's just CC stable as the fix is easy.
Affected products
- Linux kernel: from 6.10 before 6.12.7; 6.13-rc1, 6.13-rc2, 6.13-rc3 — fixed in 6.12.7
How to fix
Upgrade to a fixed version: Linux kernel 6.12.7. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/4234ca9884bcae9e48ed38652d91696ad5cd591d
- https://git.kernel.org/stable/c/faeec8e23c10bd30e8aa759a2eb3018dae00f924
Get alerted when CVE-2024-57881 or the next vulnerability affects your stack