CVE-2026-93227: mm/mm_init: deferred_grow_zone(): fix out-of-range first_deferred_pfn
In the Linux kernel, the following vulnerability has been resolved:
mm/mminit: deferredgrowzone(): fix out-of-range firstdeferredpfn
With CONFIGDEFERREDSTRUCTPAGEINIT enabled, deferredgrowzone() initializes struct pages early in boot to satisfy an allocation.
With a large CMA reservation in place, the ranges deferredinitmemmap() finds may not add up to the allocation it was asked for, and the function ends up initializing the memory map of the entire zone and still falls short.
That is fine in itself: the function accounts for it and leaves the caller to decide whether it now has enough memory.
However, the update of pgdat->firstdeferredpfn that tracks where uninitialized memory map starts could overflow.
If the node's RAM end is not aligned on PAGESPERSECTION boundaries and some deferred struct pages were initialized, pgdat->firstdeferredpfn would point past the end of the node's memory.
deferredinitmemmap() later picks up from pgdat->firstdeferredpfn and hits a BUGON(), because it expects a pfn within its node.
For example, when running a kernel with CONFIGDEFERREDSTRUCTPAGEINIT=y and CONFIGCMA=y using the following qemu command line
qemu-system-x8664 -enable-kvm -m 8032M -kernel bzImage \ -append "nokaslr cma=4768M@0x100000000"
the kernel panics:
kernel BUG at mm/mminit.c:2131! CPU: 3 UID: 0 PID: 36 Comm: pgdatinit0 Not tainted 7.2.0-rc6 #1 RIP: 0010:deferredinitmemmap+0x1b8/0x1c0 RAX: 0000000000236000 R13: 0000000000238000 Call Trace: kthread+0xdf/0x120 retfromfork+0x187/0x250
Make sure that the update of pgdta->firstdeferredpfn does not overflow when the entire zone's (and therefore node's) memory map is initialized.
[rppt: massaged the changelog]
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this condition?
Systems need CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled and a CMA reservation. The described failure requires a large CMA reservation, deferred struct-page initialization activity, and a node whose RAM end is not aligned to PAGES_PER_SECTION boundaries.
How can I recognize that this issue has been triggered?
A later call to deferred_init_memmap() can encounter pgdat->first_deferred_pfn beyond the end of its node's memory and hit its BUG_ON() check. Check whether the affected boot path includes deferred_grow_zone() followed by deferred_init_memmap().