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

- Severity: Medium 4.7 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-09-04T15:32:36.681Z
- Modified: 2026-11-10T13:17:47.597Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before 3ee9a8c27bfd72c3f465004fa8455785d61be5e8; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before 69bea84b06b5e779627e7afdbf4b60a7d231c76f; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before ac25ec5fa2bf6e606dc7954488e4dded272fa9cd; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before 1636b5e9c3543b87d673e32a47e7c18698882425; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before ff40839e018b82c4d756d035f34a63aa2d93be83; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before 67995d4244694928ce701928e530b5b4adeb17b4; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before ca8c414499f2e5337a95a76be0d21b728ee31c6b; from bbd6ec605c0fc286c3f8ce60b4ed44635361d58b before 59305202c67fea50378dcad0cc199dbc13a0e99a; 5.7 (not affected: before 5.7; from 5.10.241 up to 5.10.*; from 5.15.190 up to 5.15.*; from 6.1.149 up to 6.1.*; from 6.6.103 up to 6.6.*; from 6.12.43 up to 6.12.*; from 6.15.11 up to 6.15.*; from 6.16.2 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 5.7 before 5.10.241; from 5.11 before 5.15.190; from 5.16 before 6.1.149; from 6.2 before 6.6.103; from 6.7 before 6.12.43; from 6.13 before 6.15.11; from 6.16 before 6.16.2
- debian debian_linux: 11.0

## References

- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)
- <https://cert-portal.siemens.com/productcert/html/ssa-032379.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Sources

- CVE List: [CVE-2025-38681](https://www.cve.org/CVERecord?id=CVE-2025-38681), CVE Terms of Use, modified 2026-11-10
- NVD: [CVE-2025-38681](https://nvd.nist.gov/vuln/detail/CVE-2025-38681), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2025-38681 · Whole record: https://cve.day/CVE-2025-38681.json · Rebuilt by cve.day 2026-11-25T22:59:04.130Z
