CVE-2026-64514: userfaultfd: gate must_wait writability check on pte_present()
Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:52:11 +0200
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026072555-CVE-2026-64514-11d4@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: userfaultfd: gate must_wait writability check on pte_present() userfaultfd_must_wait() and userfaultfd_huge_must_wait() read the PTE without taking the page table lock and then apply pte_write() / huge_pte_write() to it. Those accessors decode bits from the present encoding only; on a swap or migration entry they read the offset bits that happen to share the same position and return an undefined result. The intent of the check is "is this fault still WP-blocked?". A non-marker swap entry means the page is in transit -- the userfault context the original fault delivered against is no longer the same, and the swap-in or migration completion path will re-deliver a fresh fault if userspace still needs to handle it. Worst case under the current code the garbage write bit says "wait", and the thread stays asleep until a UFFDIO_WAKE that may never arrive. Gate the writability check on pte_present() so the lockless re-check only inspects present-PTE bits when the entry is actually present. The non-present, non-marker case returns "don't wait" and lets the fault path retry. The Linux kernel CVE team has assigned CVE-2026-64514 to this issue. Affected and fixed versions =========================== Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 5.10.261 with commit a5700a4c1c9099ac2ac73fe8a09cf059972e0d2f Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 5.15.212 with commit d4026417e8184d13850a0bad4d96ceb6ed9f7152 Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 6.1.178 with commit 29e6f952c5fb7dc1d6b90fe5b7f36063d44ddae0 Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 6.6.145 with commit 5f4dbdb0a87596214076b20b94f2b71b522170b3 Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 6.12.96 with commit a6e9a4939e359599701b1da351e84f72e021443a Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 6.18.39 with commit 60d696a037eeeedfb57756dfe7ec08a1587c8631 Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 7.1.4 with commit 710183888174639a15fcec16cd1af766b8480bb7 Issue introduced in 4.11 with commit 369cd2121be440543280b91056de187f625d0dbb and fixed in 7.2-rc1 with commit 8e80af52db652fbc41320eee45a4f73bc029faf2 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-64514 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: mm/userfaultfd.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/a5700a4c1c9099ac2ac73fe8a09cf059972e0d2f https://git.kernel.org/stable/c/d4026417e8184d13850a0bad4d96ceb6ed9f7152 https://git.kernel.org/stable/c/29e6f952c5fb7dc1d6b90fe5b7f36063d44ddae0 https://git.kernel.org/stable/c/5f4dbdb0a87596214076b20b94f2b71b522170b3 https://git.kernel.org/stable/c/a6e9a4939e359599701b1da351e84f72e021443a https://git.kernel.org/stable/c/60d696a037eeeedfb57756dfe7ec08a1587c8631 https://git.kernel.org/stable/c/710183888174639a15fcec16cd1af766b8480bb7 https://git.kernel.org/stable/c/8e80af52db652fbc41320eee45a4f73bc029faf2