CVE-2025-39725

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-39725
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39725.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39725
Downstream
Published
2025-09-05T17:27:18.719Z
Modified
2025-11-28T02:35:40.522979Z
Summary
mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list
Details

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

mm/vmscan: fix hwpoisoned large folio handling in shrinkfoliolist

In shrinkfoliolist(), the hwpoisoned folio may be large folio, which can't be handled by unmappoisonedfolio(). For THP, trytounmapone() must be passed with TTUSPLITHUGEPMD to split huge PMD first and then retry. Without TTUSPLITHUGEPMD, we will trigger null-ptr deref of pvmw.pte. Even we passed TTUSPLITHUGEPMD, we will trigger a WARNONONCE 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 shrinkfoliolist memoryfailure TestSetPageHWPoison unmappoisonedfolio --> trigger BUGON due to unmappoisonedfolio couldn't handle large folio

[tujinjiang@huawei.com: add comment to unmappoisonedfolio()]

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39725.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0
Fixed
656eaddbc952e1baae2f69281c22debe22140312
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1b0449544c6482179ac84530b61fc192a6527bfd
Fixed
c1101113d45838a823188ae25c61af97552a28ae
Fixed
9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
912e9f0300c3564b72a8808db406e313193a37ad

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.41
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.15.9