Linux kernel charges HugeTLB folios to the wrong memory cgroup
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 6.7 charges HugeTLB folios to the memory cgroup of the allocating task instead of the target process. When a userfaultfd handler populates a HugeTLB mapping of another process with UFFDIO_COPY, the hugepage usage is reported in the handler's memory cgroup rather than the target's.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
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 UFFDIO_COPY ioctl operates on the userfaultfd context's mm, but get_mem_cgroup_from_current() 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 UFFDIO_COPY. 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 dst_vma->vm_mm. Pass the target mm through hugetlb_alloc_folio() and charge the folio by using get_mem_cgroup_from_mm(). This preserves the existing charge timing and error handling while making HugeTLB userfaultfd population consistent with the generic path.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
The fixed versions of the Linux kernel are 6.12.118, 6.18.64, 7.3.4 and 7.4-rc1.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 6.12.118, 6.18.64, 7.3.4, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-138868
- 2026-11-30 Alias added: GHSA-g5g6-2cg2-vgwc
References
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-138868 · CVE Program
- CVE-2026-138868 · NVD
- GHSA-g5g6-2cg2-vgwc · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences