PT-2026-162728
CVE-2026-138868
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
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.
Found an issue in the description? Have something to add? Feel free to write us 👾