{"api_version":"1","generated_at":"2026-12-01T14:01:16+00:00","cve":"CVE-2026-138896","urls":{"html":"https://cve.report/CVE-2026-138896","api":"https://cve.report/api/cve/CVE-2026-138896.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138896","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138896"},"summary":{"title":"mm: hugetlb: return -ENOSPC on memcg charge failure","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:47","updated_at":"2026-11-30 14:17:47"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/fb4752249623c6ac966a1a94a3f25456c0dfeea0","name":"https://git.kernel.org/stable/c/fb4752249623c6ac966a1a94a3f25456c0dfeea0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204","name":"https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d","name":"https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138896","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138896","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 991135774c0e05a4734e6d32aa03b00355e4cac9 fb4752249623c6ac966a1a94a3f25456c0dfeea0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 991135774c0e05a4734e6d32aa03b00355e4cac9 11afc840288ab10a95b41ce5e298ce415fef0204 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 991135774c0e05a4734e6d32aa03b00355e4cac9 956aeff185e7e16b989202bde0bb29859adba99d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.14","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.14 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/hugetlb.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"fb4752249623c6ac966a1a94a3f25456c0dfeea0","status":"affected","version":"991135774c0e05a4734e6d32aa03b00355e4cac9","versionType":"git"},{"lessThan":"11afc840288ab10a95b41ce5e298ce415fef0204","status":"affected","version":"991135774c0e05a4734e6d32aa03b00355e4cac9","versionType":"git"},{"lessThan":"956aeff185e7e16b989202bde0bb29859adba99d","status":"affected","version":"991135774c0e05a4734e6d32aa03b00355e4cac9","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/hugetlb.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.14"},{"lessThan":"6.14","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.14","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:25:59.770Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/fb4752249623c6ac966a1a94a3f25456c0dfeea0"},{"url":"https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204"},{"url":"https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d"}],"title":"mm: hugetlb: return -ENOSPC on memcg charge failure","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138896","datePublished":"2026-11-30T13:25:59.770Z","dateReserved":"2026-11-30T13:22:15.902Z","dateUpdated":"2026-11-30T13:25:59.770Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:47","lastModifiedDate":"2026-11-30 14:17:47","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138896","Ordinal":"1","Title":"mm: hugetlb: return -ENOSPC on memcg charge failure","CVE":"CVE-2026-138896","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138896","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"mm: hugetlb: return -ENOSPC on memcg charge failure"}]}}}