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

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description

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