CVE-2026-99927: mm/hugetlb: fix endless write fault on a leftover uffd bit
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: fix endless write fault on a leftover uffd bit
hugetlbfault() resolves the uffd bit on a write fault only if the VMA is registered for userfaultfd write protection, and hugetlbwp() bails out for any entry with the uffd bit set assuming hugetlbfault() has already resolved it.
When a read-only hugetlb entry with the uffd bit set is mapped in a VMA that is not registered for uffd-wp, a write fault to it never makes progress. If the access comes from the kernel, e.g. read(2) from /dev/zero into such page, the task spins in the page fault handler, ignores SIGKILL and keeps holding the locks taken by the system call.
Such entries should not exist, but an unprivileged user can create them, for example with MADVDONTNEED of a page protected with UFFDIORWPROTECT or with UFFDIOCOPY in MODEWP racing with UFFDIOUNREGISTER.
Clear the uffd bit when the VMA is not registered for uffd-wp and let the fault proceed to hugetlbwp(), like dowppage() does for regular pages.
Note that a FOLLFORCE write to a page protected with UFFDIORWPROTECT in a private VMA that was made PROTNONE now drops the RWP protection of that page.
Original fix generated by an LLM and sent in private by Josef.
[rppt@kernel.org: massage commit message] [david@kernel.org: convert comment into a TODO]
Affected Software
Event History
Frequently Asked Questions
Who can trigger this issue?
An unprivileged user can create the problematic hugetlb entries. The described paths include using MADV_DONTNEED on a page protected with UFFDIO_RWPROTECT, or racing UFFDIO_COPY in MODE_WP with UFFDIO_UNREGISTER.
What conditions are needed for the fault loop?
A read-only hugetlb entry must retain its userfaultfd bit while mapped in a VMA that is not registered for userfaultfd write protection. A write fault on that entry then fails to make progress.
What is the practical impact of exploitation?
If the write access originates in the kernel, such as a read(2) from /dev/zero into the affected page, the task can spin in the page-fault handler. It ignores SIGKILL and continues holding locks acquired by the system call.
Is userfaultfd write protection involved?
Yes. The affected state is associated with a leftover userfaultfd write-protection bit on a hugetlb entry, including entries created through UFFDIO_RWPROTECT or UFFDIO_COPY in MODE_WP.