{"id":69582,"date":"2025-09-05T23:32:05","date_gmt":"2025-09-05T20:02:05","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-39725-mm-vmscan-fix-hwpoisoned-large-folio-handling-in-shrink_folio_list\/"},"modified":"2025-09-05T23:32:05","modified_gmt":"2025-09-05T20:02:05","slug":"cve-2025-39725-mm-vmscan-fix-hwpoisoned-large-folio-handling-in-shrink_folio_list","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-39725-mm-vmscan-fix-hwpoisoned-large-folio-handling-in-shrink_folio_list\/","title":{"rendered":"CVE-2025-39725 &#8211; mm\/vmscan: fix hwpoisoned large folio handling in shrink_folio_list"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-39725<br \/>\n<br \/>\n<strong>Published : <\/strong> Sept. 5, 2025, 6:15 p.m. | 1\u00a0hour ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/vmscan: fix hwpoisoned large folio handling in shrink_folio_list<\/p>\n<p>In shrink_folio_list(), the hwpoisoned folio may be large folio, which<br \/>\ncan&#8217;t be handled by unmap_poisoned_folio().  For THP, try_to_unmap_one()<br \/>\nmust be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then<br \/>\nretry.  Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of<br \/>\npvmw.pte.  Even we passed TTU_SPLIT_HUGE_PMD, we will trigger a<br \/>\nWARN_ON_ONCE due to the page isn&#8217;t in swapcache.<\/p>\n<p>Since UCE is rare in real world, and race with reclaimation is more rare,<br \/>\njust skipping the hwpoisoned large folio is enough.  memory_failure() will<br \/>\nhandle it if the UCE is triggered again.<\/p>\n<p>This happens when memory reclaim for large folio races with<br \/>\nmemory_failure(), and will lead to kernel panic.  The race is as<br \/>\nfollows:<\/p>\n<p>cpu0      cpu1<br \/>\n shrink_folio_list memory_failure<br \/>\n  TestSetPageHWPoison<br \/>\n  unmap_poisoned_folio<br \/>\n  &#8211;&gt; trigger BUG_ON due to<br \/>\n  unmap_poisoned_folio couldn&#8217;t<br \/>\n   handle large folio<\/p>\n[tujinjiang@huawei.com: add comment to unmap_poisoned_folio()]\n<br \/>\n<strong>Severity:<\/strong> 0.0 | NA<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-39725 Published : Sept. 5, 2025, 6:15 p.m. | 1\u00a0hour ago 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&#8217;t be handled by unmap_poisoned_folio(). For THP, try_to_unmap_one() must be passed &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-69582","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=69582"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69582\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=69582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=69582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=69582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}