CVE-2024-57881
mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
Published:
1/11/2025
Last updated:
10/1/2025
Reserved:
1/11/2025
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.
CNA assigner:
Linux (416baaa9-dc9f-4396-8d5f-8c081fb06d67)
Requested by:
n/a
Products affected (4)
| Product |
Vendor |
Version |
| Linux |
Linux
|
2008 for 32-bit Systems Service Pack 2 (Core installation)
|
| Linux |
Linux
|
n/a
|
| Linux |
Linux
|
< iCloud for Windows 7.14
|
| Linux |
Linux
|
n/a
|