# CVE-2024-57881: mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-01-11T15:10:43.786Z
- Modified: 2026-06-17T08:14:08.193Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from fd919a85cd55be5d00a6a7372071f44c8eafb825 before 4234ca9884bcae9e48ed38652d91696ad5cd591d; from fd919a85cd55be5d00a6a7372071f44c8eafb825 before faeec8e23c10bd30e8aa759a2eb3018dae00f924; 6.10 (not affected: before 6.10; from 6.12.7 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.10 before 6.12.7; 6.13

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/4234ca9884bcae9e48ed38652d91696ad5cd591d> (patch)
- <https://git.kernel.org/stable/c/faeec8e23c10bd30e8aa759a2eb3018dae00f924> (patch)

## Sources

- CVE List: [CVE-2024-57881](https://www.cve.org/CVERecord?id=CVE-2024-57881), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-57881](https://nvd.nist.gov/vuln/detail/CVE-2024-57881), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-57881 · Whole record: https://cve.day/CVE-2024-57881.json · Rebuilt by cve.day 2026-11-25T22:58:50.946Z
