# CVE-2025-21696: mm: clear uffd-wp PTE/PMD state on mremap()

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-02-12 · Modified: 2026-10-30
- Aliases: UBUNTU-CVE-2025-21696, DEBIAN-CVE-2025-21696
- Record: https://cvemate.com/vulnerability/CVE-2025-21696 · JSON: https://cvemate.com/vulnerability/CVE-2025-21696/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

mm: clear uffd-wp PTE/PMD state on mremap()

When mremap()ing a memory region previously registered with userfaultfd as
write-protected but without UFFD_FEATURE_EVENT_REMAP, an inconsistency in
flag clearing leads to a mismatch between the vma flags (which have
uffd-wp cleared) and the pte/pmd flags (which do not have uffd-wp
cleared).  This mismatch causes a subsequent mprotect(PROT_WRITE) to
trigger a warning in page_table_check_pte_flags() due to setting the pte
to writable while uffd-wp is still set.

Fix this by always explicitly clearing the uffd-wp pte/pmd flags on any
such mremap() so that the values are consistent with the existing clearing
of VM_UFFD_WP.  Be careful to clear the logical flag regardless of its
physical form; a PTE bit, a swap PTE bit, or a PTE marker.  Cover PTE,
huge PMD and hugetlb paths.
```

## Signals

- CVSS: 5.5 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.262%, percentile 19.158%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 131)

- debian linux (Debian): All versions (No fix recorded) \| \< 6.1.192-1 \| \< 6.12.11-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-151.151
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1070.76
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1070.76~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1070.76+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1074.83
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/310ac886d68de661c3a334198d8604b722d7fdf8>
- <https://git.kernel.org/stable/c/0cef0bb836e3cfe00f08f9606c72abd72fe78ca3>
- <https://ubuntu.com/security/CVE-2025-21696>
- <https://www.cve.org/CVERecord?id=CVE-2025-21696>
- <https://git.kernel.org/linus/0cef0bb836e3cfe00f08f9606c72abd72fe78ca3>
- <https://ubuntu.com/security/notices/USN-7445-1>
- <https://ubuntu.com/security/notices/USN-7448-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-21696>
- <https://git.kernel.org/stable/c/8e2f6ba256dd1e590addc48e6e9577bf39c482f2>
- <https://git.kernel.org/stable/c/96fed9f20481d07eba8a7fe93bc77abef178198c>
- <https://ubuntu.com/security/notices/USN-9173-1>
- <https://ubuntu.com/security/notices/USN-9175-1>
- <https://ubuntu.com/security/notices/USN-9174-1>
- <https://ubuntu.com/security/notices/USN-9183-1>
- <https://ubuntu.com/security/notices/USN-9173-2>
- <https://ubuntu.com/security/notices/USN-9192-1>
- <https://ubuntu.com/security/notices/USN-9173-3>
- <https://ubuntu.com/security/notices/USN-9174-2>
- <https://ubuntu.com/security/notices/USN-9191-1>

---

Data as of 2026-12-05T03:14:56.517Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
