# CVE-2025-37958: mm/huge\_memory: fix dereferencing invalid pmd migration entry

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-05-20T16:01:51.740Z
- **Modified:** 2026-11-05T21:17:59.400Z

## Who should check

- Anyone running Linux \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 753f142f7ff7d2223a47105b61e1efd91587d711; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 9468afbda3fbfcec21ac8132364dff3dab945faf; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< ef5706bed97e240b4abf4233ceb03da7336bc775; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 22f6368768340260e862f35151d2e1c55cb1dc75; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 3977946f61cdba87b6b5aaf7d7094e96089583a5; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 6166c3cf405441f7147b322980144feb3cefc617; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< fbab262b0c8226c697af1851a424896ed47dedcc; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7
- Anyone running Linux 4.14

## Description

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

mm/huge\_memory: fix dereferencing invalid pmd migration entry

When migrating a THP, concurrent access to the PMD migration entry during
a deferred split scan can lead to an invalid address access, as
illustrated below.  To prevent this invalid access, it is necessary to
check the PMD migration entry and return early.  In this context, there is
no need to use pmd\_to\_swp\_entry and pfn\_swap\_entry\_to\_page to verify the
equality of the target folio.  Since the PMD migration entry is locked, it
cannot be served as the target.

Mailing list discussion and explanation from Hugh Dickins: "An anon\_vma
lookup points to a location which may contain the folio of interest, but
might instead contain another folio: and weeding out those other folios is
precisely what the "folio != pmd\_folio((\*pmd)" check (and the "risk of
replacing the wrong folio" comment a few lines above it) is for."

BUG: unable to handle page fault for address: ffffea60001db008
CPU: 0 UID: 0 PID: 2199114 Comm: tee Not tainted 6.14.0+ \#4 NONE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:split\_huge\_pmd\_locked+0x3b5/0x2b60
Call Trace:
\<TASK\>
try\_to\_migrate\_one+0x28c/0x3730
rmap\_walk\_anon+0x4f6/0x770
unmap\_folio+0x196/0x1f0
split\_huge\_page\_to\_list\_to\_order+0x9f6/0x1560
deferred\_split\_scan+0xac5/0x12a0
shrinker\_debugfs\_scan\_write+0x376/0x470
full\_proxy\_write+0x15c/0x220
vfs\_write+0x2fc/0xcb0
ksys\_write+0x146/0x250
do\_syscall\_64+0x6a/0x120
entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

The bug is found by syzkaller on an internal kernel, then confirmed on
upstream.

## Affected and fixed versions

- Linux: \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 753f142f7ff7d2223a47105b61e1efd91587d711; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 9468afbda3fbfcec21ac8132364dff3dab945faf; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< ef5706bed97e240b4abf4233ceb03da7336bc775; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 22f6368768340260e862f35151d2e1c55cb1dc75; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 3977946f61cdba87b6b5aaf7d7094e96089583a5; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 6166c3cf405441f7147b322980144feb3cefc617; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< fbab262b0c8226c697af1851a424896ed47dedcc; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7 (cvelist)
- Linux: 4.14 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37958. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37958.md
Affected: Linux >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 753f142f7ff7d2223a47105b61e1efd91587d711; >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 9468afbda3fbfcec21ac8132364dff3dab945faf; >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < ef5706bed97e240b4abf4233ceb03da7336bc775; >= 84c3fc4e9c563d8fb91cfdf…
Fixed in: Linux 753f142f7ff7d2223a47105b61e1efd91587d711, Linux 9468afbda3fbfcec21ac8132364dff3dab945faf, Linux 22f6368768340260e862f35151d2e1c55cb1dc75, Linux 3977946f61cdba87b6b5aaf7d7094e96089583a5, Linux 6166c3cf405441f7147b322980144feb3cefc617

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-37958 being exploited?

There is no confirmed exploitation: CVE-2025-37958 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-37958?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37958?

Linux \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 753f142f7ff7d2223a47105b61e1efd91587d711; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 9468afbda3fbfcec21ac8132364dff3dab945faf; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< ef5706bed97e240b4abf4233ceb03da7336bc775; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 22f6368768340260e862f35151d2e1c55cb1dc75; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 3977946f61cdba87b6b5aaf7d7094e96089583a5; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< 6166c3cf405441f7147b322980144feb3cefc617; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< fbab262b0c8226c697af1851a424896ed47dedcc; \>= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, \< be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7; Linux 4.14.

### Is there a fix for CVE-2025-37958?

Yes. Fixed in Linux 753f142f7ff7d2223a47105b61e1efd91587d711, Linux 9468afbda3fbfcec21ac8132364dff3dab945faf, Linux 22f6368768340260e862f35151d2e1c55cb1dc75, Linux 3977946f61cdba87b6b5aaf7d7094e96089583a5, Linux 6166c3cf405441f7147b322980144feb3cefc617. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-37958?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/753f142f7ff7d2223a47105b61e1efd91587d711>
- patch: <https://git.kernel.org/stable/c/9468afbda3fbfcec21ac8132364dff3dab945faf>
- patch: <https://git.kernel.org/stable/c/ef5706bed97e240b4abf4233ceb03da7336bc775>
- patch: <https://git.kernel.org/stable/c/22f6368768340260e862f35151d2e1c55cb1dc75>
- patch: <https://git.kernel.org/stable/c/3977946f61cdba87b6b5aaf7d7094e96089583a5>
- patch: <https://git.kernel.org/stable/c/6166c3cf405441f7147b322980144feb3cefc617>
- patch: <https://git.kernel.org/stable/c/fbab262b0c8226c697af1851a424896ed47dedcc>
- patch: <https://git.kernel.org/stable/c/be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37958>

HTML: <https://flawdb.com/CVE-2025-37958> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37958>
