{"id":"CVE-2025-39725","summary":"mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list\n\nIn shrink_folio_list(), the hwpoisoned folio may be large folio, which\ncan't be handled by unmap_poisoned_folio().  For THP, try_to_unmap_one()\nmust be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then\nretry.  Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of\npvmw.pte.  Even we passed TTU_SPLIT_HUGE_PMD, we will trigger a\nWARN_ON_ONCE due to the page isn't in swapcache.\n\nSince UCE is rare in real world, and race with reclaimation is more rare,\njust skipping the hwpoisoned large folio is enough.  memory_failure() will\nhandle it if the UCE is triggered again.\n\nThis happens when memory reclaim for large folio races with\nmemory_failure(), and will lead to kernel panic.  The race is as\nfollows:\n\ncpu0      cpu1\n shrink_folio_list memory_failure\n  TestSetPageHWPoison\n  unmap_poisoned_folio\n  --\u003e trigger BUG_ON due to\n  unmap_poisoned_folio couldn't\n   handle large folio\n\n[tujinjiang@huawei.com: add comment to unmap_poisoned_folio()]","modified":"2026-11-13T04:03:47.933031778Z","published":"2025-09-05T17:27:18.719Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39725.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/656eaddbc952e1baae2f69281c22debe22140312"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c1101113d45838a823188ae25c61af97552a28ae"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39725.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39725"},{"type":"PACKAGE","url":"https://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":"912e9f0300c3564b72a8808db406e313193a37ad"}]}],"versions":["v6.12.40","v6.12.39","v6.12.38","v6.12.37","v6.12.36","v6.12.35","v6.12.34","v6.12.33","v6.12.32","v6.12.31","v6.12.30","v6.12.29","v6.12.28","v6.12.27","v6.12.26","v6.14.11","v6.14.10","v6.14.9","v6.14.8","v6.14.7","v6.14.6","v6.14.5"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39725.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.12.26"},{"fixed":"6.12.41"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.14.5"},{"fixed":"6.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.15.0"},{"fixed":"6.15.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39725.json"}}],"schema_version":"1.9.2"}