{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "a833a693a490ecff8ba377654c6d4d333718b6b1"
            },
            {
              "fixed": "4b10d04a68b8e17bb805df65f81a36a9041dd7bd"
            },
            {
              "fixed": "156cd6874ed93737820d7818f09aff59ae50f6c7"
            },
            {
              "fixed": "e4949a80f3b07e52dca76c34ce353633927a28a5"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "adb5c2e55524e3a96b02c3904b0bb6d5a5404d21"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.14.8"
            },
            {
              "fixed": "6.15"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.15.0"
            },
            {
              "fixed": "6.18.63"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138865.json"
  },
  "details": "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-\u003eresv_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.",
  "id": "CVE-2026-138865",
  "modified": "2026-12-01T20:45:22.896724796Z",
  "published": "2026-11-30T13:25:42.582Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/156cd6874ed93737820d7818f09aff59ae50f6c7"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/4b10d04a68b8e17bb805df65f81a36a9041dd7bd"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e4949a80f3b07e52dca76c34ce353633927a28a5"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138865.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138865"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm/hugetlb: fix subpool minimum reservation rollback"
}