Look up another CVE · open CVE-2025-21696 in the interactive tracker
CVE-2025-21696
mm: clear uffd-wp PTE/PMD state on mremap()
Published 2025-02-12 (20 months ago) by the Linux kernel CNA. Subsystem include/linux. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-21696 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.11-1 | Update the kernel and reboot. Fixed in 6.12.11-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.11-1 | Update the kernel and reboot. Fixed in 6.12.11-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.11-1 | Update the kernel and reboot. Fixed in 6.12.11-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
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.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
include/linux/userfaultfd_k.h
mm/huge_memory.c
mm/hugetlb.c
mm/mremap.c
- What this is
- MEMORY MANAGEMENT - USERFAULTFDMAINTAINERS section matched on include/linux/userfaultfd_k.h · linux-mm@kvack.org · Maintained
Check it on the machine
grep -w CONFIG_TRANSPARENT_HUGEPAGE /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormYnot built on amd64/rt/amd64, arm64/rt/arm64, armhf/armmp, armhf/rt/armmp, i386/rt/686-pae
- trixieYnot built on amd64/rt/amd64, arm64/rt/arm64, armel/rpi, armhf/armmp, armhf/rt/armmp
- forky, sidYnot built on amd64/rt-amd64, arm64/rt-arm64, armhf/armmp
- Y
- built in where it is built at all; some flavours do not build it
- Build switch
- CONFIG_TRANSPARENT_HUGEPAGE
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-02-12 (20 months ago)source
- CVSS
- no vector published, unrated
- Attack vector
- not published
- EPSS
- 0.19%, higher than 8.2% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- include/linux
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.7 | 6.12.11 | 310ac886d68d |
| 5.7 | 6.13 | 0cef0bb836e3 |
Why the CNA scored it this way
The kernel CNA published no CVSS vector and no reasoning for CVE-2025-21696, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.