# CVE-2025-38085: mm/hugetlb: fix huge\_pmd\_unshare() vs GUP-fast race

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.26% (percentile 10, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2025-06-28T07:44:26.178Z
- **Modified:** 2026-08-05T11:59:23.457Z

## Who should check

- Anyone running Linux \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 952596b08c74e8fe9e2883d1dc8a8f54a37384ec; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a3d864c901a300c295692d129159fc3001a56185; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< b7754d3aa7bf9f62218d096c0c8f6c13698fac8b; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< fe684290418ef9ef76630072086ee530b92f02b8; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 034a52b5ef57c9c8225d94e9067f3390bb33922f; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a6bfeb97941a9187833b526bc6cc4ff5706d0ce9; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 1013af4f585fccc4d3e5c5824d174de2257f7d6d
- Anyone running Linux 2.6.20

## Description

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

mm/hugetlb: fix huge\_pmd\_unshare() vs GUP-fast race

huge\_pmd\_unshare() drops a reference on a page table that may have
previously been shared across processes, potentially turning it into a
normal page table used in another process in which unrelated VMAs can
afterwards be installed.

If this happens in the middle of a concurrent gup\_fast(), gup\_fast() could
end up walking the page tables of another process.  While I don't see any
way in which that immediately leads to kernel memory corruption, it is
really weird and unexpected.

Fix it with an explicit broadcast IPI through tlb\_remove\_table\_sync\_one(),
just like we do in khugepaged when removing page tables for a THP
collapse.

## Affected and fixed versions

- Linux: \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 952596b08c74e8fe9e2883d1dc8a8f54a37384ec; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a3d864c901a300c295692d129159fc3001a56185; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< b7754d3aa7bf9f62218d096c0c8f6c13698fac8b; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< fe684290418ef9ef76630072086ee530b92f02b8; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 034a52b5ef57c9c8225d94e9067f3390bb33922f; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a6bfeb97941a9187833b526bc6cc4ff5706d0ce9; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 1013af4f585fccc4d3e5c5824d174de2257f7d6d (cvelist)
- Linux: 2.6.20 (cvelist)

## Mitigation

- Upgrade Linux to 1013af4f585fccc4d3e5c5824d174de2257f7d6d or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38085.md
Affected: Linux >= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, < 952596b08c74e8fe9e2883d1dc8a8f54a37384ec; >= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, < a3d864c901a300c295692d129159fc3001a56185; >= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, < b7754d3aa7bf9f62218d096c0c8f6c13698fac8b; >= 39dde65c9940c97fcd178a3…
Fixed in: Linux 952596b08c74e8fe9e2883d1dc8a8f54a37384ec, Linux 034a52b5ef57c9c8225d94e9067f3390bb33922f, Linux 1013af4f585fccc4d3e5c5824d174de2257f7d6d

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-38085 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 952596b08c74e8fe9e2883d1dc8a8f54a37384ec; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a3d864c901a300c295692d129159fc3001a56185; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< b7754d3aa7bf9f62218d096c0c8f6c13698fac8b; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< fe684290418ef9ef76630072086ee530b92f02b8; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 034a52b5ef57c9c8225d94e9067f3390bb33922f; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< a6bfeb97941a9187833b526bc6cc4ff5706d0ce9; \>= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \< 1013af4f585fccc4d3e5c5824d174de2257f7d6d; Linux 2.6.20.

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

Yes. Fixed in Linux 952596b08c74e8fe9e2883d1dc8a8f54a37384ec, Linux 034a52b5ef57c9c8225d94e9067f3390bb33922f, Linux 1013af4f585fccc4d3e5c5824d174de2257f7d6d. Upgrade Linux to 1013af4f585fccc4d3e5c5824d174de2257f7d6d or later.

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

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/952596b08c74e8fe9e2883d1dc8a8f54a37384ec>
- patch: <https://git.kernel.org/stable/c/a3d864c901a300c295692d129159fc3001a56185>
- patch: <https://git.kernel.org/stable/c/b7754d3aa7bf9f62218d096c0c8f6c13698fac8b>
- patch: <https://git.kernel.org/stable/c/fe684290418ef9ef76630072086ee530b92f02b8>
- patch: <https://git.kernel.org/stable/c/034a52b5ef57c9c8225d94e9067f3390bb33922f>
- patch: <https://git.kernel.org/stable/c/a6bfeb97941a9187833b526bc6cc4ff5706d0ce9>
- patch: <https://git.kernel.org/stable/c/1013af4f585fccc4d3e5c5824d174de2257f7d6d>
- other: <https://project-zero.issues.chromium.org/issues/420715744>
- 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-38085>

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