CVE-2026-138896: mm: hugetlb: return -ENOSPC on memcg charge failure

Published Nov 30, 2026
·
Updated

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 memcgroupchargehugetlb() fails", v2.

In hugetlballocfolio(), when memcgroupchargehugetlb() fails, there are 2 issues:

1. freehugefolio() expects a non-refcounted folio and will VMBUGONFOLIO().

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

This patch (of 2):

When memcgroupchargehugetlb() fails with -ENOMEM, allochugetlbfolio() currently propagates this error. This results in the page fault handler returning VMFAULTOOM.

Because HugeTLB allocations are high-order and use GFPRETRYMAYFAIL, they bypass the OOM killer. Returning VMFAULTOOM 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 VMFAULTSIGBUS, terminating the process cleanly.

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

Affected Software

5 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.14.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux<7.3.4-1
7.3.4-1
debian/linux
7.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  3. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  4. Compensating control

    In hugetlb_alloc_folio(), return -ENOSPC when mem_cgroup_charge_hugetlb() fails, so the fault maps to VM_FAULT_SIGBUS instead of retrying indefinitely.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description
Data Sourced
via OSV·01:25 PM
DescriptionAffected Software
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the faulty behavior?

A HugeTLB allocation must encounter a failure from mem_cgroup_charge_hugetlb() with -ENOMEM during hugetlb_alloc_folio(). The affected path occurs while handling a page fault for a HugeTLB allocation.

2

What is the operational impact of a failed HugeTLB memory-cgroup charge?

The page-fault handler can return VM_FAULT_OOM even though these high-order HugeTLB allocations bypass the OOM killer. Because no OOM-killer progress is made, the kernel can repeatedly retry the fault in an infinite loop rather than terminating the process.

3

How does the fix change behavior when the charge fails?

It returns -ENOSPC instead of -ENOMEM. This maps to VM_FAULT_SIGBUS, causing the faulting process to terminate cleanly rather than continuously retrying the fault.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203