mm/memory_hotplug: fix missing rollback in __add_pages()

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

mm/memory_hotplug: fix missing rollback in __add_pages()

__add_pages() returns on a sparse_add_section() failure without removing the sections already added in the same request.

For memremap_pages(), the failed range is not counted in pgmap->nr_range, so memunmap_pages() 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 [start_pfn, pfn) on failure. For a vmemmap population failure, section_activate() already cleans up the current section, so the rollback excludes it. If the first section fails, __remove_pages() receives an empty range and does nothing.

ProductVersions
Linux Linuxba72b4c8cf60e452cf6f0258ed9ee697957b7dfd to before 23c6b72ae412271a937d3b9706ee13ba9c84bc92 Affectedba72b4c8cf60e452cf6f0258ed9ee697957b7dfd to before 5853ffdd61233bc7c0061d80ec6dc4c4cd969851 Affectedba72b4c8cf60e452cf6f0258ed9ee697957b7dfd to before 2062695c28db539725e4882ad9ffac969ee29db3 Affectedba72b4c8cf60e452cf6f0258ed9ee697957b7dfd to before c31bb839fb829958101250ee5acfa4f94fdb7ecd Affected
Linux Linux5.3 Affectedbefore 5.3 Not Affected6.12.119 through 6.12.* Not Affected6.18.66 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.