CVE-2025-39725
mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list
Check your servers for CVE-2025-39725
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-39725 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list
In shrink_folio_list(), the hwpoisoned folio may be large folio, which can't be handled by unmap_poisoned_folio(). For THP, try_to_unmap_one() must be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then retry. Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of pvmw.pte. Even we passed TTU_SPLIT_HUGE_PMD, we will trigger a WARN_ON_ONCE due to the page isn't in swapcache.
Since UCE is rare in real world, and race with reclaimation is more rare, just skipping the hwpoisoned large folio is enough. memory_failure() will handle it if the UCE is triggered again.
This happens when memory reclaim for large folio races with memory_failure(), and will lead to kernel panic. The race is as follows:
cpu0 cpu1 shrink_folio_list memory_failure TestSetPageHWPoison unmap_poisoned_folio --> trigger BUG_ON due to unmap_poisoned_folio couldn't handle large folio
[tujinjiang@huawei.com: add comment to unmap_poisoned_folio()]
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.74% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0, before 656eaddbc952e1baae2f69281c22debe22140312 affected from 1b0449544c6482179ac84530b61fc192a6527bfd, before c1101113d45838a823188ae25c61af97552a28ae affected from 1b0449544c6482179ac84530b61fc192a6527bfd, before 9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab affected 912e9f0300c3564b72a8808db406e313193a37ad affected from 6.12.26, before 6.12.41 affected from 6.14.5, before 6.15
Other versions: unaffected
|
| Linux |
affected 6.15 unaffected before 6.15 unaffected from 6.12.41 up to and including 6.12.* unaffected from 6.15.9 up to and including 6.15.* unaffected 6.16 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-39725 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-39725
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-39725
trivy image --scanners vuln IMAGE | grep CVE-2025-39725
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/656eaddbc952e1baae2f69281c22debe22140312 git.kernel.org
- https://git.kernel.org/stable/c/c1101113d45838a823188ae25c61af97552a28ae git.kernel.org
- https://git.kernel.org/stable/c/9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab git.kernel.org
Source: the record CVE-2025-39725 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse