CVE-2026-143170: mm/page_alloc: don't undo another isolation in alloc_contig_range
In the Linux kernel, the following vulnerability has been resolved:
mm/pagealloc: don't undo another isolation in alloccontigrange
An alloccontigrange() that overlaps a block going offline can leave the offline spinning until it gets a signal, holding the device hotplug lock. When isolation fails, alloccontigfrozenrange() undoes it over the whole range, clearing the offline's MIGRATEISOLATE too:
CPU 1 (offlinepages) CPU 2 (alloccontigrange) startisolatepagerange() blocks are MIGRATEISOLATE startisolatepagerange() -EBUSY on CPU 1's blocks undoisolatepagerange() blocks are MIGRATEMOVABLE testpagesisolated() never succeeds again
startisolatepagerange() fails only on a block someone else isolated, after undoing its own, so this undo only ever clears another caller's. Return directly, as before alloccontigrange() went pageblock granular.
With offlinepages() parked after isolating a DIMM block and a 1G hugetlb allocation made over it, the offline on base still loops 30s later in 4 of 4 runs:
offlinepages+0x5b2/0x1570 memorysubsysoffline+0x17e/0x470 deviceoffline+0x250/0x340 statestore+0x88/0x110
With this patch the allocation still fails, and the offline completes in 3 of 3 runs.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
The issue requires alloc_contig_range() to overlap memory that is being taken offline. In the described case, offline_pages() has isolated a DIMM block while a contiguous allocation, such as a 1G hugetlb allocation, is attempted over that block.
What is the operational impact if the issue occurs?
The memory-offline operation can spin waiting for pages to become isolated, potentially until it receives a signal. It holds the device hotplug lock while stalled, which can block related device hotplug activity.
How can administrators recognize a system affected by this condition?
A memory-offline request may remain in offline_pages() for an extended period after an overlapping contiguous allocation attempt. The described stack includes offline_pages, memory_subsys_offline, device_offline, and state_store.
What happens after the fix when an allocation overlaps an offline operation?
The overlapping contiguous allocation still fails, but it no longer clears the isolation state established by the memory-offline operation. This allows the offline operation to proceed rather than continuing to loop.