CVE-2026-72175: fs/proc/task_mmu: fix make_uffd_wp_huge_pte() prot-update race
In the Linux kernel, the following vulnerability has been resolved:
fs/proc/taskmmu: fix makeuffdwphugepte() prot-update race
Patch series "userfaultfd/pagemap: pre-existing fixes".
These are pre-existing bug fixes that were carried at the front of the userfaultfd RWP working-set-tracking series up to v5 [1]. Per review feedback that fixes should not sit in the middle of a feature series, they are split out and sent on their own; the RWP series is reposted rebased on top of this.
All six were flagged by the Sashiko AI review of the RWP series and carry independent of RWP, apply to mm-new directly, and carry Cc: stable@.
1: fs/proc/taskmmu: a missing hugeptepmodifyprotstart() in makeuffdwphugepte() can lose hardware Dirty/Accessed updates when PAGEMAPSCAN write-protects a hugetlb PTE.
2: fs/proc/taskmmu: pagemapscanhugetlbentry() compares the range against HPAGESIZE rather than the hstate page size, so it never write-protects gigantic hugetlb pages.
3: fs/proc/taskmmu: PAGEMAPSCAN with PMSCANWPMATCHING over an unpopulated hugetlb range self-deadlocks -- pagemapscanptehole() calls uffdwprange() while walkhugetlbrange() holds the hugetlb vma lock for read, and hugetlbchangeprotection() then takes it for write. Install the marker inline instead.
4: mm/hugememory: changenonpresenthugepmd() drops pmdswpuffdwp on a device-private PMD permission downgrade, silently losing the uffd-wp marker.
5: userfaultfd: mustwait() applies ptewrite() to a locklessly read PTE without checking ptepresent(), so swap/migration entries decode random offset bits and a thread can stay parked on a stale fault.
6: userfaultfd: VMAUFFDFLAGS feeds VMAUFFDMINORBIT (41) to mkvmaflags() unconditionally, an out-of-bounds write into the single-word vmaflagst on 32-bit. Build the mask from config-gated per-mode masks so an unavailable bit is never materialised.
This patch (of 6):
makeuffdwphugepte() arms the UFFDWP bit on a present HugeTLB PTE by calling hugeptepmodifyprotcommit() with a ptent snapshot that was fetched without the corresponding hugeptepmodifyprotstart(). The start helper is what atomically clears the entry so the kernel-owned snapshot stays consistent until the commit; without it, the hardware may set Dirty or Accessed in the live PTE between the original read and the commit, and hugeptepmodifyprotcommit() (whose generic implementation just calls sethugepteat()) then writes the stale snapshot back over the live hardware bits, losing the update.
The non-hugetlb sibling makeuffdwppte() does this correctly via ptepmodifyprotstart() / ptepmodifyprotcommit(). Mirror that pattern for the present-PTE branch. The migration case stays as-is -- migration entries are non-present, so there's no hardware update to race against.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch userfaultfd/pagemap: pre-existing fixes
Event History
Frequently Asked Questions
What is the severity of CVE-2026-72175?
The severity of CVE-2026-72175 is rated as 27.
How do I fix CVE-2026-72175?
To fix CVE-2026-72175, you should apply the latest patches from the Linux kernel release that includes the fix for this vulnerability.
What systems are affected by CVE-2026-72175?
CVE-2026-72175 affects Linux kernel versions prior to the implementation of the fix related to userfaultfd.
What does CVE-2026-72175 vulnerability involve?
CVE-2026-72175 involves a prot-update race condition in the Linux kernel's userfaultfd implementation.
Is CVE-2026-72175 under active exploitation?
As of now, there is no indication that CVE-2026-72175 is actively exploited in the wild.