CVE-2026-138868

Source
https://cve.org/CVERecord?id=CVE-2026-138868
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138868.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-138868
Downstream
Published
2026-11-30T13:25:44Z
Modified
2026-11-30T15:01:14Z
Summary
mm/hugetlb: charge folios to the target mm's memcg
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138868.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8cba9576df601c384abd334a503c3f6e1e29eefb
Fixed
d0497a8491ebe5e8f8b53236e24adb3e9c9c5bd3
Fixed
0744fbc37eba382754056844253da10d3702babb
Fixed
ce8381ddd3877529d28b42b11b43ed214b0f5452
Fixed
c2deb1356d82c9d54bd2fcf1241cc97eb66fd81f

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138868.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.118
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.64
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138868.json"