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

Published Feb 12, 2025
·
Updated

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 UFFDFEATUREEVENTREMAP, 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(PROTWRITE) to trigger a warning in pagetablecheckpteflags() 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 VMUFFDWP. 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.

Affected Software

19 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=5.7<6.12.11
Linux Linux kernel=6.13-rc1
Linux Linux kernel=6.13-rc2
Linux Linux kernel=6.13-rc3
Linux Linux kernel=6.13-rc4
Linux Linux kernel=6.13-rc5
Linux Linux kernel=6.13-rc6
Linux Linux kernel=6.13-rc7
debian/linux<=5.10.223-1, <=5.10.234-1, <=6.1.129-1, <=6.1.135-1
6.12.27-1
Microsoft azl3 kernel 6.6.96.2-1
Microsoft azl3 kernel 6.6.104.2-4
Microsoft azl3 kernel 6.6.112.1-2
Microsoft azl3 kernel 6.6.96.2-2
Microsoft azl3 kernel 6.6.117.1-1
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.27-1

Event History

Feb 12, 2025
CVE Published
via MITRE·01:27 PM
Data Sourced
via MITRE·01:27 PM
Description
Data Sourced
via Red Hat·02:09 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·02:32 PM
RemedyDescriptionSeverityAffected Software
Sep 3, 2025
Data Sourced
via Microsoft·10:03 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·10:03 PM
Affected Software
Updated
via Microsoft·10:03 PM
Description
Updated
via Microsoft·10:03 PM
DescriptionSeverity
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21696?

CVE-2025-21696 is classified as a low-severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-21696?

To resolve CVE-2025-21696, update your Linux kernel to the latest version where this vulnerability has been patched.

3

What software is affected by CVE-2025-21696?

CVE-2025-21696 affects the Linux kernel across various distributions.

4

What type of vulnerability is CVE-2025-21696?

CVE-2025-21696 is a memory handling vulnerability related to inconsistent flag clearing during the mremap() operation.

5

Is CVE-2025-21696 exploitable?

The exploitability of CVE-2025-21696 is considered limited, primarily affecting scenarios involving userfaultfd.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203