CVE-2025-37958 mm/huge_memory: fix dereferencing invalid pmd migration entry
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- Linux KernelUbuntuDebian
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.
Upgrade path
11 packages: 10 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| azure linux kernel(Azure Linux 3.0) | < 6.6.96.1-1 | 6.6.96.1-1 | Fixed |
| debian/linux(Debian 12) | < 6.1.147-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +38 more | 6.1.147-1 | Fixed |
| debian/linux(Debian 13) | < 6.12.29-1 | 6.12.29-1 | Fixed |
| debian/linux(Debian 14) | < 6.12.29-1 | 6.12.29-1 | Fixed |
| Linux kernel | < 5.4.295; < 5.10.239; < 5.15.186; < 6.1.142 +25 more | 5.4.295, 5.10.239, 5.15.186, 6.1.142, 6.6.95, 6.12.29, 6.14.7, 6.15, 22f6368768340260e862f35151d2e1c55cb1dc75, 753f142f7ff7d2223a47105b61e1efd91587d711, 6166c3cf405441f7147b322980144feb3cefc617, 9468afbda3fbfcec21ac8132364dff3dab945faf, 3977946f61cdba87b6b5aaf7d7094e96089583a5, be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7, ef5706bed97e240b4abf4233ceb03da7336bc775, fbab262b0c8226c697af1851a424896ed47dedcc | Fixed |
| ubuntu/linux(Ubuntu 22.04) | < 5.15.0-156.166 | 5.15.0-156.166 | Fixed |
| ubuntu/linux(Ubuntu 24.04) | < 6.8.0-90.91 | 6.8.0-90.91 | Fixed |
| ubuntu/linux-kvm(Ubuntu 22.04) | < 5.15.0-1088.93 | 5.15.0-1088.93 | Fixed |
| ubuntu/linux-raspi(Ubuntu 22.04) | < 5.15.0-1086.89 | 5.15.0-1086.89 | Fixed |
| ubuntu/linux-raspi(Ubuntu 24.04) | < 6.8.0-1044.48 | 6.8.0-1044.48 | Fixed |
| debian linux | = 11.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux kernel(Azure Linux:3.0) | < 6.6.96.1-1 | 6.6.96.1-1 |
| debian/linux(Debian:12) | < 6.1.147-1 | 6.1.147-1 |
| debian/linux(Debian:12) | = 6.1.106-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.112-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.115-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.119-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.123-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.124-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.128-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.129-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.133-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.135-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.137-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.139-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.140-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.27-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.37-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4~bpo11+1 | No fix listed |
Show 55 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/linux(Debian:12) | = 6.1.52-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.64-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.66-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.67-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.82-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.85-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.98-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.99-1 | No fix listed |
| debian/linux(Debian:13) | < 6.12.29-1 | 6.12.29-1 |
| debian/linux(Debian:14) | < 6.12.29-1 | 6.12.29-1 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 753f142f7ff7d2223a47105b61e1efd91587d711 | 753f142f7ff7d2223a47105b61e1efd91587d711 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 9468afbda3fbfcec21ac8132364dff3dab945faf | 9468afbda3fbfcec21ac8132364dff3dab945faf |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < ef5706bed97e240b4abf4233ceb03da7336bc775 | ef5706bed97e240b4abf4233ceb03da7336bc775 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 22f6368768340260e862f35151d2e1c55cb1dc75 | 22f6368768340260e862f35151d2e1c55cb1dc75 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 3977946f61cdba87b6b5aaf7d7094e96089583a5 | 3977946f61cdba87b6b5aaf7d7094e96089583a5 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < 6166c3cf405441f7147b322980144feb3cefc617 | 6166c3cf405441f7147b322980144feb3cefc617 |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < fbab262b0c8226c697af1851a424896ed47dedcc | fbab262b0c8226c697af1851a424896ed47dedcc |
| Linux kernel | >= 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3, < be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7 | be6e843fc51a584672dfd9c4a6a24c8cb81d5fb7 |
| Linux kernel | = 4.14 | No fix listed |
| Linux kernel | < 5.4.295 | 5.4.295 |
| Linux kernel | < 5.10.239 | 5.10.239 |
| Linux kernel | < 5.15.186 | 5.15.186 |
| Linux kernel | < 6.1.142 | 6.1.142 |
| Linux kernel | < 6.6.95 | 6.6.95 |
| Linux kernel | < 6.12.29 | 6.12.29 |
| Linux kernel | < 6.14.7 | 6.14.7 |
| Linux kernel | < 6.15 | 6.15 |
| ubuntu/linux(Ubuntu:22.04) | < 5.15.0-156.166 | 5.15.0-156.166 |
| ubuntu/linux-kvm(Ubuntu:22.04) | < 5.15.0-1088.93 | 5.15.0-1088.93 |
| ubuntu/linux-raspi(Ubuntu:22.04) | < 5.15.0-1086.89 | 5.15.0-1086.89 |
| ubuntu/linux(Ubuntu:24.04) | < 6.8.0-90.91 | 6.8.0-90.91 |
| ubuntu/linux-raspi(Ubuntu:24.04) | < 6.8.0-1044.48 | 6.8.0-1044.48 |
| Linux kernel | >= 4.14, < 5.4.295 | 5.4.295 |
| Linux kernel | >= 5.5, < 5.10.239 | 5.10.239 |
| Linux kernel | >= 5.11, < 5.15.186 | 5.15.186 |
| Linux kernel | >= 5.16, < 6.1.142 | 6.1.142 |
| Linux kernel | >= 6.2, < 6.6.95 | 6.6.95 |
| Linux kernel | >= 6.7, < 6.12.29 | 6.12.29 |
| Linux kernel | >= 6.13, < 6.14.7 | 6.14.7 |
| Linux kernel | = 6.15-rc1 | No fix listed |
| Linux kernel | = 6.15-rc2 | No fix listed |
| Linux kernel | = 6.15-rc3 | No fix listed |
| Linux kernel | = 6.15-rc4 | No fix listed |
| Linux kernel | = 6.15-rc5 | No fix listed |
| debian linux | = 11.0 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-37958 vendor-advisory
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- lists.debian.org third-party-advisory
- lists.debian.org third-party-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7699-1 vendor-advisory
- USN-7699-2 vendor-advisory
- USN-7721-1 vendor-advisory
- USN-7774-1 vendor-advisory
- USN-7774-2 vendor-advisory
- USN-7774-3 vendor-advisory
- USN-7775-1 vendor-advisory
- USN-7776-1 vendor-advisory
- USN-7775-2 vendor-advisory
- USN-7775-3 vendor-advisory
- USN-7774-4 vendor-advisory
- USN-7774-5 vendor-advisory
- USN-7907-1 vendor-advisory
- USN-7907-2 vendor-advisory
- USN-7907-3 vendor-advisory
- USN-7907-4 vendor-advisory
- USN-7922-1 vendor-advisory
- USN-7922-2 vendor-advisory
- USN-7907-5 vendor-advisory
- USN-7931-1 vendor-advisory
- USN-7931-2 vendor-advisory
- USN-7931-3 vendor-advisory
- USN-7935-1 vendor-advisory
- USN-7937-1 vendor-advisory
- USN-7939-1 vendor-advisory
- USN-7939-2 vendor-advisory
- USN-7940-1 vendor-advisory
- USN-7922-3 vendor-advisory
- USN-7931-4 vendor-advisory
- USN-7922-4 vendor-advisory
- USN-7931-5 vendor-advisory
- USN-7940-2 vendor-advisory
- USN-7922-5 vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2025-15893 third-party-advisory