CVE-2026-138868: mm/hugetlb: charge folios to the target mm's memcg

Published Nov 30, 2026
·
Updated

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

mm/hugetlb: charge folios to the target mm's memcg

HugeTLB folios are currently charged to the memcg of the allocating task. This gives the wrong result when a userfaultfd handler populates a HugeTLB VMA that belongs to another process. The UFFDIOCOPY ioctl operates on the userfaultfd context's mm, but getmemcgroupfromcurrent() charges the folio to the handler's memcg instead.

This can be reproduced by placing the faulting process and its userfaultfd handler in different memory cgroups. Have the target process register a HugeTLB mapping with userfaultfd, trigger a missing fault, and let the handler resolve it with UFFDIOCOPY. The hugepage usage is then reported in the handler's memory.current instead of the target's.

The generic userfaultfd population path avoids this problem by charging folios to dstvma->vmmm.

Pass the target mm through hugetlballocfolio() and charge the folio by using getmemcgroupfrommm(). This preserves the existing charge timing and error handling while making HugeTLB userfaultfd population consistent with the generic path.

Affected Software

7 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.7.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux<6.12.118-1
6.12.118-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.12.117-1
6.12.118-17.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.12.118
  2. Upgrade

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

    Fixed in 6.18.64
  3. Upgrade

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

    Fixed in 7.3.4
  4. Upgrade

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

    Fixed in 6.12.118-1
  5. Upgrade

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

    Fixed in 7.3.4-1
  6. Upgrade

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

    Fixed in 6.12.118-1Fixed in 7.3.4-1

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

Which environments are exposed to the incorrect accounting?

The issue requires HugeTLB memory populated through userfaultfd, with the process owning the HugeTLB mapping and the userfaultfd handler placed in different memory cgroups. Configurations where both run in the same memory cgroup would not show the described cross-cgroup accounting result.

2

What must an attacker or triggering workload be able to do?

It must register a HugeTLB mapping with userfaultfd in a target process, trigger a missing-page fault, and resolve that fault from a handler using the UFFDIO_COPY ioctl. The handler must run in a different memory cgroup from the target process for the charge to be assigned to the wrong cgroup.

3

How can administrators identify the issue in an affected setup?

In a test with the target process and userfaultfd handler in separate memory cgroups, resolve a missing fault in a HugeTLB mapping using UFFDIO_COPY. If HugeTLB usage increases in the handler's memory.current rather than the target process's memory.current, the system exhibits the described behavior.

4

Is the generic userfaultfd population path affected?

No. The described issue is specific to HugeTLB userfaultfd population; the generic userfaultfd population path already charges folios to the destination VMA's target memory-management context.

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