{"id":"CVE-2026-138896","aliases":["CVE-2026-138896"],"related":[],"kind":"vulnerability","state":"published","title":"mm: hugetlb: return -ENOSPC on memcg charge failure","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:25:59.770Z","modified":"2026-11-30T14:17:47.503Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"fb4752249623c6ac966a1a94a3f25456c0dfeea0","status":"affected"},{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"11afc840288ab10a95b41ce5e298ce415fef0204","status":"affected"},{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"956aeff185e7e16b989202bde0bb29859adba99d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.14","status":"unaffected"},{"type":"semver","introduced":"6.18.64","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/fb4752249623c6ac966a1a94a3f25456c0dfeea0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138896","url":"https://www.cve.org/CVERecord?id=CVE-2026-138896","licence":"CVE Terms of Use","modified":"2026-11-30T13:25:59.770Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138896","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138896","licence":"Public domain","modified":"2026-11-30T14:17:47.503Z"}],"updatedAt":"2026-11-30T14:32:31.632Z","epss":{"score":0.0022,"percentile":0.13314,"date":"2026-12-01T12:00:22.000Z"}}