# CVE-2025-38681: mm/ptdump: take the memory hotplug lock inside ptdump\_walk\_pgd()

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

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2025-09-04T15:32:36.681Z
- **Modified:** 2026-11-10T13:17:47.597Z

## Who should check

- Anyone running Linux \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 3ee9a8c27bfd72c3f465004fa8455785d61be5e8; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 69bea84b06b5e779627e7afdbf4b60a7d231c76f; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ac25ec5fa2bf6e606dc7954488e4dded272fa9cd; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 1636b5e9c3543b87d673e32a47e7c18698882425; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ff40839e018b82c4d756d035f34a63aa2d93be83; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 67995d4244694928ce701928e530b5b4adeb17b4; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ca8c414499f2e5337a95a76be0d21b728ee31c6b; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 59305202c67fea50378dcad0cc199dbc13a0e99a
- Anyone running Linux 5.7

## Description

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

mm/ptdump: take the memory hotplug lock inside ptdump\_walk\_pgd()

Memory hot remove unmaps and tears down various kernel page table regions
as required.  The ptdump code can race with concurrent modifications of
the kernel page tables.  When leaf entries are modified concurrently, the
dump code may log stale or inconsistent information for a VA range, but
this is otherwise not harmful.

But when intermediate levels of kernel page table are freed, the dump code
will continue to use memory that has been freed and potentially
reallocated for another purpose.  In such cases, the ptdump code may
dereference bogus addresses, leading to a number of potential problems.

To avoid the above mentioned race condition, platforms such as arm64,
riscv and s390 take memory hotplug lock, while dumping kernel page table
via the sysfs interface /sys/kernel/debug/kernel\_page\_tables.

Similar race condition exists while checking for pages that might have
been marked W+X via /sys/kernel/debug/kernel\_page\_tables/check\_wx\_pages
which in turn calls ptdump\_check\_wx().  Instead of solving this race
condition again, let's just move the memory hotplug lock inside generic
ptdump\_check\_wx() which will benefit both the scenarios.

Drop get\_online\_mems() and put\_online\_mems() combination from all existing
platform ptdump code paths.

## Affected and fixed versions

- Linux: \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 3ee9a8c27bfd72c3f465004fa8455785d61be5e8; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 69bea84b06b5e779627e7afdbf4b60a7d231c76f; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ac25ec5fa2bf6e606dc7954488e4dded272fa9cd; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 1636b5e9c3543b87d673e32a47e7c18698882425; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ff40839e018b82c4d756d035f34a63aa2d93be83; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 67995d4244694928ce701928e530b5b4adeb17b4; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ca8c414499f2e5337a95a76be0d21b728ee31c6b; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 59305202c67fea50378dcad0cc199dbc13a0e99a (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- Upgrade Linux to 59305202c67fea50378dcad0cc199dbc13a0e99a 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-38681. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38681.md
Affected: Linux >= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, < 3ee9a8c27bfd72c3f465004fa8455785d61be5e8; >= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, < 69bea84b06b5e779627e7afdbf4b60a7d231c76f; >= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, < ac25ec5fa2bf6e606dc7954488e4dded272fa9cd; >= bbd6ec605c0fc286c3f8ce6…
Fixed in: Linux 3ee9a8c27bfd72c3f465004fa8455785d61be5e8, Linux 69bea84b06b5e779627e7afdbf4b60a7d231c76f, Linux 1636b5e9c3543b87d673e32a47e7c18698882425, Linux 67995d4244694928ce701928e530b5b4adeb17b4, Linux 59305202c67fea50378dcad0cc199dbc13a0e99a

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

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

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

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

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

Linux \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 3ee9a8c27bfd72c3f465004fa8455785d61be5e8; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 69bea84b06b5e779627e7afdbf4b60a7d231c76f; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ac25ec5fa2bf6e606dc7954488e4dded272fa9cd; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 1636b5e9c3543b87d673e32a47e7c18698882425; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ff40839e018b82c4d756d035f34a63aa2d93be83; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 67995d4244694928ce701928e530b5b4adeb17b4; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< ca8c414499f2e5337a95a76be0d21b728ee31c6b; \>= bbd6ec605c0fc286c3f8ce60b4ed44635361d58b, \< 59305202c67fea50378dcad0cc199dbc13a0e99a; Linux 5.7.

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

Yes. Fixed in Linux 3ee9a8c27bfd72c3f465004fa8455785d61be5e8, Linux 69bea84b06b5e779627e7afdbf4b60a7d231c76f, Linux 1636b5e9c3543b87d673e32a47e7c18698882425, Linux 67995d4244694928ce701928e530b5b4adeb17b4, Linux 59305202c67fea50378dcad0cc199dbc13a0e99a. Upgrade Linux to 59305202c67fea50378dcad0cc199dbc13a0e99a or later.

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

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/3ee9a8c27bfd72c3f465004fa8455785d61be5e8>
- patch: <https://git.kernel.org/stable/c/69bea84b06b5e779627e7afdbf4b60a7d231c76f>
- patch: <https://git.kernel.org/stable/c/ac25ec5fa2bf6e606dc7954488e4dded272fa9cd>
- patch: <https://git.kernel.org/stable/c/1636b5e9c3543b87d673e32a47e7c18698882425>
- patch: <https://git.kernel.org/stable/c/ff40839e018b82c4d756d035f34a63aa2d93be83>
- patch: <https://git.kernel.org/stable/c/67995d4244694928ce701928e530b5b4adeb17b4>
- patch: <https://git.kernel.org/stable/c/ca8c414499f2e5337a95a76be0d21b728ee31c6b>
- patch: <https://git.kernel.org/stable/c/59305202c67fea50378dcad0cc199dbc13a0e99a>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-032379.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.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-38681>

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