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.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"function": "move_ptes",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-013ac6af",
"signature_type": "Function",
"digest": {
"length": 1208.0,
"function_hash": "236977285983785899620535476934688271009"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"file": "mm/hugetlb.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-03e99aac",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"25842114185487299857265983642391716077",
"283202145690778682205889966677599971782",
"1126880549686419687480597959488351932",
"159953546146322371939794924619458022528",
"251789530843864452737865912197023686358",
"33484173707173575315223521318948967075",
"264310326518866034983334344500519070563",
"45174390059216371439901562844392836823"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"file": "include/linux/userfaultfd_k.h"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-05d020e2",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"122496953266106657411296278150343235011",
"97646567325986264998455196834339787648",
"303134716301366665141759707499190762182",
"111429716191227378384538057677408244665",
"37124437733065523744626765438005028683",
"269896746848011924705202535478236247024"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"function": "move_huge_pte",
"file": "mm/hugetlb.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-0dc309ea",
"signature_type": "Function",
"digest": {
"length": 528.0,
"function_hash": "25000743885793043519079084991761688283"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"function": "move_huge_pte",
"file": "mm/hugetlb.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-0ee776e3",
"signature_type": "Function",
"digest": {
"length": 528.0,
"function_hash": "25000743885793043519079084991761688283"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"function": "move_normal_pud",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-29a300e4",
"signature_type": "Function",
"digest": {
"length": 657.0,
"function_hash": "116646138050024284335220658378814236583"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"file": "mm/huge_memory.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-2fbbfb1f",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"91936663029407752367720425455572430786",
"289695046339000709935878581016054217476",
"95031663997129128183644384946199459791",
"75603698926618389534692407574612787939",
"75390098543085922742325765452291878611",
"225355819055729223206047935745585168222",
"303194006010623952293019741748162955319"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-455954da",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"285331956068422426821364071296164100856",
"303263670064760027164580851423941003889",
"179568766286867245346198615141208561718",
"1778323555658950331150022930673110629",
"218141713657156208584777354509506017059",
"93891877448246695382110314337423251804",
"146893735436428800983312940882824895790",
"104434984268440644783913251904285434208",
"220108759961020368734651141979724048901",
"330609615285100139244318045395130620478",
"137586252339255593434059259461491086792",
"76540239746408621566418371452237330464",
"72077477271127323564964972754895758269",
"81625688981858205294951127328772885772"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"file": "mm/huge_memory.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-4beaff4e",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"91936663029407752367720425455572430786",
"289695046339000709935878581016054217476",
"95031663997129128183644384946199459791",
"75603698926618389534692407574612787939",
"75390098543085922742325765452291878611",
"225355819055729223206047935745585168222",
"303194006010623952293019741748162955319"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"function": "move_huge_pmd",
"file": "mm/huge_memory.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-55d4acd4",
"signature_type": "Function",
"digest": {
"length": 873.0,
"function_hash": "20385993018323934398546413385871146379"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"file": "mm/hugetlb.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-57c29705",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"25842114185487299857265983642391716077",
"283202145690778682205889966677599971782",
"1126880549686419687480597959488351932",
"159953546146322371939794924619458022528",
"251789530843864452737865912197023686358",
"33484173707173575315223521318948967075",
"264310326518866034983334344500519070563",
"45174390059216371439901562844392836823"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"file": "include/linux/userfaultfd_k.h"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-9acb8c50",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"122496953266106657411296278150343235011",
"97646567325986264998455196834339787648",
"303134716301366665141759707499190762182",
"111429716191227378384538057677408244665",
"37124437733065523744626765438005028683",
"269896746848011924705202535478236247024"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"function": "move_ptes",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-abbe7190",
"signature_type": "Function",
"digest": {
"length": 1228.0,
"function_hash": "316861109032863551341186972360618216868"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@310ac886d68de661c3a334198d8604b722d7fdf8",
"target": {
"function": "move_normal_pmd",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-bc4d01da",
"signature_type": "Function",
"digest": {
"length": 779.0,
"function_hash": "18486648587798982774578673734504010103"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"function": "move_normal_pmd",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-ca1181ac",
"signature_type": "Function",
"digest": {
"length": 779.0,
"function_hash": "18486648587798982774578673734504010103"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"function": "move_huge_pmd",
"file": "mm/huge_memory.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-e0bc724a",
"signature_type": "Function",
"digest": {
"length": 873.0,
"function_hash": "20385993018323934398546413385871146379"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-f3e805f9",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"285331956068422426821364071296164100856",
"303263670064760027164580851423941003889",
"179568766286867245346198615141208561718",
"229550621851677837860588493776218675389",
"218141713657156208584777354509506017059",
"93891877448246695382110314337423251804",
"146893735436428800983312940882824895790",
"104434984268440644783913251904285434208",
"220108759961020368734651141979724048901",
"330609615285100139244318045395130620478",
"137586252339255593434059259461491086792",
"76540239746408621566418371452237330464",
"72077477271127323564964972754895758269",
"81625688981858205294951127328772885772"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0bb836e3cfe00f08f9606c72abd72fe78ca3",
"target": {
"function": "move_normal_pud",
"file": "mm/mremap.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2025-21696-fc1ba0e2",
"signature_type": "Function",
"digest": {
"length": 657.0,
"function_hash": "116646138050024284335220658378814236583"
}
}
]