CVE-2026-138896
mm: hugetlb: return -ENOSPC on memcg charge failure
Check your servers for CVE-2026-138896
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138896 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.3% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 991135774c0e05a4734e6d32aa03b00355e4cac9, before fb4752249623c6ac966a1a94a3f25456c0dfeea0 affected from 991135774c0e05a4734e6d32aa03b00355e4cac9, before 11afc840288ab10a95b41ce5e298ce415fef0204 affected from 991135774c0e05a4734e6d32aa03b00355e4cac9, before 956aeff185e7e16b989202bde0bb29859adba99d
Other versions: unaffected
|
| Linux |
affected 6.14 unaffected before 6.14 unaffected from 6.18.64 up to and including 6.18.* unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138896 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138896
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-138896
trivy image --scanners vuln IMAGE | grep CVE-2026-138896
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/fb4752249623c6ac966a1a94a3f25456c0dfeea0 git.kernel.org
- https://git.kernel.org/stable/c/11afc840288ab10a95b41ce5e298ce415fef0204 git.kernel.org
- https://git.kernel.org/stable/c/956aeff185e7e16b989202bde0bb29859adba99d git.kernel.org
Source: the record CVE-2026-138896 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse