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/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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.7
- CVEs
- CVE-2024-57881
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:16 UTC · Revision 1
Source evidence
mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
core-osv · Original sourcePublished 11 Jan 2025, 15:10 UTC
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.
osv:CVE-2024-57881
Kernel
Fixed versions: 6.12.7
Complete source record
{
"id": "e9a5144dda5fdb79dcf0ae0892e9ea2498fd7bf04ec80ac81f5fd4c9295b4754",
"url": "https://osv.dev/vulnerability/CVE-2024-57881",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()",
"summary": "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.",
"evidence": "osv:CVE-2024-57881",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2024-57881",
"aliases": [
"CVE-2024-57881"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "fd919a85cd55be5d00a6a7372071f44c8eafb825"
},
{
"fixed": "4234ca9884bcae9e48ed38652d91696ad5cd591d"
},
{
"fixed": "faeec8e23c10bd30e8aa759a2eb3018dae00f924"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57881.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.10.0"
},
{
"fixed": "6.12.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57881.json"
}
}
],
"modified": "2026-10-28T02:30:37.607686303Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/4234ca9884bcae9e48ed38652d91696ad5cd591d",
"https://git.kernel.org/stable/c/faeec8e23c10bd30e8aa759a2eb3018dae00f924",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57881.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-57881",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57881.json"
}
},
"related_cves": [
{
"value": "CVE-2024-57881",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504590,
"published_at": "2025-01-11T15:10:43.786+00:00"
}