CVE-2026-138896

Source
https://cve.org/CVERecord?id=CVE-2026-138896
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138896.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-138896
Downstream
Published
2026-11-30T13:25:59Z
Modified
2026-11-30T15:01:22Z
Summary
mm: hugetlb: return -ENOSPC on memcg charge failure
Details

In the Linux kernel, the following vulnerability has been resolved:

mm: hugetlb: return -ENOSPC on memcg charge failure

Patch series "Fix bugs in HugeTLB allocation when mem_cgroup_charge_hugetlb() fails", v2.

In hugetlb_alloc_folio(), when mem_cgroup_charge_hugetlb() fails, there are 2 issues:

  1. free_huge_folio() expects a non-refcounted folio and will VM_BUG_ON_FOLIO().

  2. -ENOMEM is returned, causing an infinite loop retrying the fault.

This patch (of 2):

When mem_cgroup_charge_hugetlb() fails with -ENOMEM, alloc_hugetlb_folio() currently propagates this error. This results in the page fault handler returning VM_FAULT_OOM.

Because HugeTLB allocations are high-order and use __GFP_RETRY_MAYFAIL, they bypass the OOM killer. Returning VM_FAULT_OOM to the #PF handler without triggering the OOM killer (or having it make progress) leads to an infinite loop of retrying the fault.

Avoid this loop by returning -ENOSPC when charging fails, which maps to VM_FAULT_SIGBUS, terminating the process cleanly.

Make mem_cgroup_charge_hugetlb() fault handling use a common error handling path, the same handling used for hugetlb_cgroup_uncharge_cgroup{,_rsvd}(), which also don't trigger the OOM killer and hence opt to terminate the process with a SIGBUS.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138896.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
991135774c0e05a4734e6d32aa03b00355e4cac9
Fixed
fb4752249623c6ac966a1a94a3f25456c0dfeea0
Fixed
11afc840288ab10a95b41ce5e298ce415fef0204
Fixed
956aeff185e7e16b989202bde0bb29859adba99d

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138896.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.14.0
Fixed
6.18.64
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138896.json"