{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "991135774c0e05a4734e6d32aa03b00355e4cac9"
            },
            {
              "fixed": "fb4752249623c6ac966a1a94a3f25456c0dfeea0"
            },
            {
              "fixed": "11afc840288ab10a95b41ce5e298ce415fef0204"
            },
            {
              "fixed": "956aeff185e7e16b989202bde0bb29859adba99d"
            }
          ],
          "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.0"
            },
            {
              "fixed": "6.18.64"
            }
          ],
          "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-138896.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm: hugetlb: return -ENOSPC on memcg charge failure\n\nPatch series \"Fix bugs in HugeTLB allocation when\nmem_cgroup_charge_hugetlb() fails\", v2.\n\nIn hugetlb_alloc_folio(), when mem_cgroup_charge_hugetlb() fails, there\nare 2 issues:\n\n1. free_huge_folio() expects a non-refcounted folio and will\n   VM_BUG_ON_FOLIO().\n\n2. -ENOMEM is returned, causing an infinite loop retrying the fault.\n\n\nThis patch (of 2):\n\nWhen mem_cgroup_charge_hugetlb() fails with -ENOMEM, alloc_hugetlb_folio()\ncurrently propagates this error.  This results in the page fault handler\nreturning VM_FAULT_OOM.\n\nBecause HugeTLB allocations are high-order and use __GFP_RETRY_MAYFAIL,\nthey bypass the OOM killer.  Returning VM_FAULT_OOM to the #PF handler\nwithout triggering the OOM killer (or having it make progress) leads to an\ninfinite loop of retrying the fault.\n\nAvoid this loop by returning -ENOSPC when charging fails, which maps to\nVM_FAULT_SIGBUS, terminating the process cleanly.\n\nMake mem_cgroup_charge_hugetlb() fault handling use a common error\nhandling path, the same handling used for\nhugetlb_cgroup_uncharge_cgroup{,_rsvd}(), which also don't trigger the OOM\nkiller and hence opt to terminate the process with a SIGBUS.",
  "id": "CVE-2026-138896",
  "modified": "2026-11-30T14:45:31.148978902Z",
  "published": "2026-11-30T13:25:59.770Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fb4752249623c6ac966a1a94a3f25456c0dfeea0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138896.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138896"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm: hugetlb: return -ENOSPC on memcg charge failure"
}