{"id":"CVE-2026-138865","aliases":["CVE-2026-138865"],"related":[],"kind":"vulnerability","state":"published","title":"mm/hugetlb: fix subpool minimum reservation rollback","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix subpool minimum reservation rollback\n\nWhen a reservation request is partially covered by a subpool minimum and\nthe remaining global reservation fails, the error path first calls\nhugepage_subpool_put_pages() for the subpool-backed portion.  It removes\nthe failed global portion from used_hpages only afterwards.\n\nhugepage_subpool_put_pages() uses used_hpages to decide whether rsv_hpages\nshould be restored.  Since used_hpages still includes the global portion,\nit can remain at or above min_hpages and prevent that restoration.  It\nthen reports the subpool reservation as releasable, causing\nhugetlb_acct_memory() to incorrectly decrement h->resv_huge_pages.\n\nThis was reproduced with four 2 MB huge pages and a hugetlbfs mount with\nsize=10M,min_size=8M.  After a successful three-page reservation, a\ntwo-page reservation which needed one subpool page and one global page\nfailed with -ENOMEM.  HugePages_Rsvd incorrectly dropped from four to\nthree even though the subpool minimum was still four pages.\n\nRoll back the failed global portion from used_hpages first, so that\nhugepage_subpool_put_pages() evaluates the minimum reservation against the\ncurrent usage and returns the correct global adjustment.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix subpool minimum reservation rollback\n\nWhen a reservation request is partially covered by a subpool minimum and\nthe remaining global reservation fails, the error path first calls\nhugepage_subpool_put_pages() for the subpool-backed portion.  It removes\nthe failed global portion from used_hpages only afterwards.\n\nhugepage_subpool_put_pages() uses used_hpages to decide whether rsv_hpages\nshould be restored.  Since used_hpages still includes the global portion,\nit can remain at or above min_hpages and prevent that restoration.  It\nthen reports the subpool reservation as releasable, causing\nhugetlb_acct_memory() to incorrectly decrement h->resv_huge_pages.\n\nThis was reproduced with four 2 MB huge pages and a hugetlbfs mount with\nsize=10M,min_size=8M.  After a successful three-page reservation, a\ntwo-page reservation which needed one subpool page and one global page\nfailed with -ENOMEM.  HugePages_Rsvd incorrectly dropped from four to\nthree even though the subpool minimum was still four pages.\n\nRoll back the failed global portion from used_hpages first, so that\nhugepage_subpool_put_pages() evaluates the minimum reservation against the\ncurrent usage and returns the correct global adjustment.","source":"cvelist"}],"published":"2026-11-30T13:25:42.582Z","modified":"2026-11-30T14:17:42.990Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"a833a693a490ecff8ba377654c6d4d333718b6b1","fixed":"4b10d04a68b8e17bb805df65f81a36a9041dd7bd","status":"affected"},{"type":"git","introduced":"a833a693a490ecff8ba377654c6d4d333718b6b1","fixed":"156cd6874ed93737820d7818f09aff59ae50f6c7","status":"affected"},{"type":"git","introduced":"a833a693a490ecff8ba377654c6d4d333718b6b1","fixed":"e4949a80f3b07e52dca76c34ce353633927a28a5","status":"affected"},{"type":"git","version":"adb5c2e55524e3a96b02c3904b0bb6d5a5404d21","status":"affected"},{"type":"semver","introduced":"6.14.8","fixed":"6.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/4b10d04a68b8e17bb805df65f81a36a9041dd7bd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/156cd6874ed93737820d7818f09aff59ae50f6c7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e4949a80f3b07e52dca76c34ce353633927a28a5","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138865","url":"https://www.cve.org/CVERecord?id=CVE-2026-138865","licence":"CVE Terms of Use","modified":"2026-11-30T13:25:42.582Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138865","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138865","licence":"Public domain","modified":"2026-11-30T14:17:42.990Z"}],"updatedAt":"2026-11-30T14:32:25.685Z","epss":{"score":0.00207,"percentile":0.11434,"date":"2026-12-01T12:00:22.000Z"}}