AZL-117220: CVE-2026-139553 affecting package kernel 6.6.161.1-1
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.
- Compensating control
In __add_pages(), save the initial PFN and remove the range [start_pfn, pfn) on failure; exclude the current section because section_activate() already cleans it up.
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
A request to add multiple memory sections must encounter a sparse_add_section() failure after one or more earlier sections in the same request have already been added. The problem is particularly relevant to memremap_pages() because the failed range is not counted in pgmap->nr_range for later cleanup.
How can an affected system be recognized?
After a failed multi-section add-pages operation, previously added sections can retain vmemmap mappings and subsection bits. A retry using a section-aligned range may then fail with -EEXIST.
What happens if the first section in the request fails?
No previously added section needs rollback in that case. __remove_pages() receives an empty range and performs no action.