{"id":"CVE-2026-99923","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:20:28.587","lastModified":"2026-11-30T14:20:28.587","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/memfd: fix hugetlb reservation accounting in error paths\n\nIf hugetlb_add_to_page_cache() in memfd_alloc_folio() fails with -EEXIST,\na concurrent fault has already instantiated the folio in the page cache,\nand the reservation now belongs to that folio.  Calling\nhugetlb_unreserve_pages() in that case incorrectly removes the region\nbacking the cached folio and releases one reservation more than it should,\nleaving that folio in the page cache with no region recording it.\n\nThat leaves resv_huge_pages one page short until that folio is removed\nfrom the page cache, so available_huge_pages() reports a page that is not\nactually free and the pool can grant one reservation more than it can\nback.  Applications using hugetlb memfds can then fail to allocate or\nfault in a page they already reserved.  They see -ENOMEM or -ENOSPC from\nthe allocation or fault path even though the reservation and\nHugePages_Free still look healthy.\n\nSo hold the hugetlb fault mutex from hugetlb_reserve_pages() until the\nerror-path unreserve completes to make the reserve, allocate and\ninstantiate steps atomic against concurrent faults.  With the mutex held\nfrom the start, a concurrent fault can no longer consume the reservation\nbetween reserve and allocate/instantiate.  If a fault completed before the\nmutex was taken, it has already added the region for that index, so\nhugetlb_reserve_pages() returns 0 and the error path leaves the region in\nplace."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["mm/memfd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"717cf9357325055ab6b41c4e0581f4d67601eb58","lessThan":"ef619ce17a4a0f5f85649ced1ce96fe53737e4f3","versionType":"git","status":"affected"},{"version":"717cf9357325055ab6b41c4e0581f4d67601eb58","lessThan":"90f2f099e69bfb341c714751369c36cf3a420f6c","versionType":"git","status":"affected"},{"version":"717cf9357325055ab6b41c4e0581f4d67601eb58","lessThan":"50ee565c1e900e247e439e4139839b060c968343","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["mm/memfd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.17","status":"affected"},{"version":"0","lessThan":"6.17","versionType":"semver","status":"unaffected"},{"version":"6.18.64","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/50ee565c1e900e247e439e4139839b060c968343","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/90f2f099e69bfb341c714751369c36cf3a420f6c","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/ef619ce17a4a0f5f85649ced1ce96fe53737e4f3","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}