CVE-2026-64295: mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access
In the Linux kernel, the following vulnerability has been resolved:
mm: pageext: add count limit to pageextiternext to prevent invalid PFN access
The pageext iteration API does not validate if the PFN still belongs to a valid section while advancing the iterator. When dynamically adding memory in the hotplug path, it can lead to a NULL pointer dereference during pageextlookup at the boundary of the last valid section when iterator count equals pgcount.
The foreachpageext() macro calls pageextiternext() as its loop increment. foreachpageext() does a "pageext = pageextiternext(&iter)" at the end. This causes pageextiternext() to increment iter->index past pgcount and call pageextlookup(startpfn + pgcount). During memory hotplug (online), the PFN at startpfn + pgcount may belong to a section that has not yet been initialized, causing pageextlookup() to trigger a NULL pointer dereference.
[ 14.555124][ T846] Call trace: [ 14.555125][ T846] lookuppageext+0x6c/0x108 (P) [ 14.555127][ T846] pageextlookup+0x30/0x3c [ 14.555129][ T846] resetpageowner+0x11c/0x260 [ 14.571201][ T846] freepagesok+0x5e8/0x8e0 [ 14.571204][ T846] freepagescore+0x78/0xf0 [ 14.571206][ T846] genericonlinepage+0x14/0x24 [ 14.597782][ T846] onlinepages+0x178/0x30c [ 14.597784][ T846] memoryblockchangestate+0x284/0x32c [ 14.597787][ T846] memorysubsysonline+0x4c/0x64 [ 14.597789][ T846] deviceonline+0x88/0xb0 [ 14.597791][ T846] onlinememoryblock+0x30/0x40 [ 14.597793][ T846] walkmemoryblocks+0xac/0xe8 [ 14.597794][ T846] addmemoryresource+0x280/0x298 [ 14.656161][ T846] addmemory+0x60/0x98
Move the iteration boundary enforcement inside the iterator functions, so callers cannot inadvertently access beyond the requested range.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access
Event History
Frequently Asked Questions
What is the severity of CVE-2026-64295?
CVE-2026-64295 has a medium severity rating of 5.5 according to the CVSS 3.1 metrics.
How do I fix CVE-2026-64295?
To fix CVE-2026-64295, update your Linux kernel to the patched version that resolves the issue.
What impact does CVE-2026-64295 have on my system?
CVE-2026-64295 could allow access to invalid page frame numbers, potentially leading to denial of service due to system crashes or instability.
Is CVE-2026-64295 exploitable remotely?
CVE-2026-64295 is not known to be remotely exploitable as it requires local access to the system.
Which versions of Linux are affected by CVE-2026-64295?
CVE-2026-64295 affects specific versions of the Linux kernel that use the page_ext iteration API without proper validation.