CVE-2026-64295

Source
https://cve.org/CVERecord?id=CVE-2026-64295
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64295.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64295
Downstream
Published
2026-07-25T08:49:33.194Z
Modified
2026-07-27T04:03:21.382533887Z
Summary
mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access
Details

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 pageext_lookup at the boundary of the last valid section when iterator count equals __pgcount.

The foreachpageext() macro calls pageextiternext() as its loop increment. foreachpage_ext() does a "__pageext = pageextiternext(&__iter)" at the end. This causes pageextiter_next() to increment iter->index past __pgcount and call pageextlookup(start_pfn + __pgcount). During memory hotplug (online), the PFN at start_pfn + __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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64295.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
9039b9096ea27a20f0349d1537537663c935c8ed
Fixed
8dcaa0f87a88d720d13106f3a306c6b61d189d86
Fixed
377b1cd6bbcf327338cd951cc2fd74bc75540235
Fixed
ffd017237cfe99e6e5602ab14179b0e6878a0840

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64295.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.15.0
Fixed
6.18.39
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64295.json"