# CVE-2025-39725: mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-09-05T17:27:18.719Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-476
- Assigned by: Linux

## 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()]

(As written by CVE List.)

## Affected

- Linux Linux: from 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0 before 656eaddbc952e1baae2f69281c22debe22140312; from 1b0449544c6482179ac84530b61fc192a6527bfd before c1101113d45838a823188ae25c61af97552a28ae; from 1b0449544c6482179ac84530b61fc192a6527bfd before 9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab; 912e9f0300c3564b72a8808db406e313193a37ad; from 6.12.26 before 6.12.41; from 6.14.5 before 6.15; 6.15 (not affected: before 6.15; from 6.12.41 up to 6.12.*; from 6.15.9 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.12.26 before 6.12.41; from 6.14.5 before 6.15.9; 6.16

## References

- <https://git.kernel.org/stable/c/656eaddbc952e1baae2f69281c22debe22140312> (patch)
- <https://git.kernel.org/stable/c/c1101113d45838a823188ae25c61af97552a28ae> (patch)
- <https://git.kernel.org/stable/c/9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab> (patch)

## Sources

- CVE List: [CVE-2025-39725](https://www.cve.org/CVERecord?id=CVE-2025-39725), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2025-39725](https://nvd.nist.gov/vuln/detail/CVE-2025-39725), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39725 · Whole record: https://cve.day/CVE-2025-39725.json · Rebuilt by cve.day 2026-11-25T22:59:04.284Z
