CVE-2024-57881: mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
In the Linux kernel, the following vulnerability has been resolved:
mm/pagealloc: don't call pfntopage() on possibly non-existent PFN in splitlargebuddy()
In splitlargebuddy(), we might call pfntopage() 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 CONFIGSPARSEMEM && !CONFIGSPARSEMEMEXTREME in pfntosection() returning NULL and and sectionmemmapaddr() dereferencing that NULL pointer.
Let's fix it, and avoid doing a pfntopage() 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.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-57881?
CVE-2024-57881 has a moderate severity level due to potential issues arising from calling pfn_to_page() on non-existent PFNs.
How do I fix CVE-2024-57881?
To fix CVE-2024-57881, ensure your Linux kernel is updated to version 6.12.8 or later.
Which versions of the Linux kernel are affected by CVE-2024-57881?
CVE-2024-57881 affects Linux kernel versions between 6.10 and 6.12.7, as well as 6.13 release candidates.
What is the impact of CVE-2024-57881 on system security?
The impact of CVE-2024-57881 could lead to system instability or security vulnerabilities during memory management.
Where can I find more details about CVE-2024-57881?
Details about CVE-2024-57881 can be found in the changelogs and announcements related to the Linux kernel updates.