CVE-2026-99923: mm/memfd: fix hugetlb reservation accounting in error paths

Published Nov 30, 2026
·
Updated

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

mm/memfd: fix hugetlb reservation accounting in error paths

If hugetlbaddtopagecache() in memfdallocfolio() fails with -EEXIST, a concurrent fault has already instantiated the folio in the page cache, and the reservation now belongs to that folio. Calling hugetlbunreservepages() in that case incorrectly removes the region backing the cached folio and releases one reservation more than it should, leaving that folio in the page cache with no region recording it.

That leaves resvhugepages one page short until that folio is removed from the page cache, so availablehugepages() reports a page that is not actually free and the pool can grant one reservation more than it can back. Applications using hugetlb memfds can then fail to allocate or fault in a page they already reserved. They see -ENOMEM or -ENOSPC from the allocation or fault path even though the reservation and HugePagesFree still look healthy.

So hold the hugetlb fault mutex from hugetlbreservepages() until the error-path unreserve completes to make the reserve, allocate and instantiate steps atomic against concurrent faults. With the mutex held from the start, a concurrent fault can no longer consume the reservation between reserve and allocate/instantiate. If a fault completed before the mutex was taken, it has already added the region for that index, so hugetlbreservepages() returns 0 and the error path leaves the region in place.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Hold the hugetlb fault mutex from hugetlb_reserve_pages() until the error-path hugetlb_unreserve_pages() completes, making the reserve, allocate/instantiate, and unreserve steps atomic against concurrent faults.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:18 PM
Data Sourced
via MITRE·01:18 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203