CVE-2026-139553: mm/memory_hotplug: fix missing rollback in __add_pages()
In the Linux kernel, the following vulnerability has been resolved:
mm/memoryhotplug: fix missing rollback in addpages()
addpages() returns on a sparseaddsection() failure without removing the sections already added in the same request.
For memremappages(), the failed range is not counted in pgmap->nrrange, so memunmappages() skips it. The sections already added in that range retain their vmemmap mappings and subsection bits. Retrying a section-aligned range can then fail with -EEXIST.
Save the initial PFN and remove [startpfn, pfn) on failure. For a vmemmap population failure, sectionactivate() already cleans up the current section, so the rollback excludes it. If the first section fails, removepages() receives an empty range and does nothing.
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.12.119 - 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.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In __add_pages(), save the initial PFN and, on failure, remove the sections already added in the range [start_pfn, pfn).
Event History
Frequently Asked Questions
What condition is required to trigger the inconsistent state?
A call to __add_pages() must encounter a sparse_add_section() failure after one or more sections have already been added in the same request. The issue is specifically relevant to memremap_pages() because the failed range is not included in pgmap->nr_range for later cleanup.
What is the practical symptom after a failed request?
Sections added before the failure can retain vmemmap mappings and subsection bits. A subsequent attempt to add a section-aligned range can then fail with -EEXIST.
Does a failure in the first section leave previously added sections behind?
No. If the first section fails, the rollback range is empty and __remove_pages() does nothing because no earlier section was added.