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

Published Sep 4, 2025
·
Updated

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

mm/ptdump: take the memory hotplug lock inside ptdumpwalkpgd()

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/kernelpagetables.

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

Drop getonlinemems() and putonlinemems() combination from all existing platform ptdump code paths.

Affected Software

11 affected componentsFixes available
Linux Kernel
Microsoft azl3 kernel 6.6.96.2-2
Microsoft azl3 kernel 6.6.96.2-1
Linux Linux kernel>=5.7<5.10.241
Linux Linux kernel>=5.11<5.15.190
Linux Linux kernel>=5.16<6.1.149
Linux Linux kernel>=6.2<6.6.103
Linux Linux kernel>=6.7<6.12.43
Linux Linux kernel>=6.13<6.15.11
Linux Linux kernel>=6.16<6.16.2
Debian Debian Linux=11.0

Event History

Sep 4, 2025
CVE Published
via MITRE·03:32 PM
Data Sourced
via MITRE·03:32 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 6, 2025
Data Sourced
via Microsoft·01:03 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·01:03 AM
SeverityAffected Software
Updated
via Microsoft·08:03 AM
DescriptionSeverity
Updated
via Microsoft·08:03 AM
SeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38681?

CVE-2025-38681 has a high severity rating due to potential race conditions in the Linux kernel.

2

How do I fix CVE-2025-38681?

To mitigate CVE-2025-38681, update your Linux kernel to the latest patched version provided by the vendor.

3

What are the potential impacts of CVE-2025-38681?

CVE-2025-38681 may lead to memory corruption and instability in systems utilizing the affected Linux kernel.

4

Which versions of the Linux kernel are affected by CVE-2025-38681?

CVE-2025-38681 affects multiple versions of the Linux kernel, particularly those prior to the fix release.

5

Is CVE-2025-38681 exploitable remotely?

Exploitation of CVE-2025-38681 requires local access, making it primarily a local privilege escalation vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203