Skip to content
Heist/ feed
Back to feed
UnratedFix available

mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list

Type: advisorySources: OSV

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

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.41, 6.15.9
CVEs
CVE-2025-39725
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 02:35 UTC · Revision 1

Source evidence

mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list

core-osv · Original source

Published 5 Sept 2025, 17:27 UTC

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

osv:CVE-2025-39725

Kernel

Fixed versions: 6.12.41, 6.15.9

Complete source record
{
  "id": "3d918044b79397df218fc941ec92dbca8b20268fa28ce6145e84f047e8111954",
  "url": "https://osv.dev/vulnerability/CVE-2025-39725",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list",
    "summary": "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()]",
    "evidence": "osv:CVE-2025-39725",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.41",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-39725",
      "aliases": [
        "CVE-2025-39725"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0"
                },
                {
                  "fixed": "656eaddbc952e1baae2f69281c22debe22140312"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1b0449544c6482179ac84530b61fc192a6527bfd"
                },
                {
                  "fixed": "c1101113d45838a823188ae25c61af97552a28ae"
                },
                {
                  "fixed": "9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.12.26"
                },
                {
                  "fixed": "6.12.41"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.14.5"
                },
                {
                  "fixed": "6.15"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "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/cve-osv-conversion/osv-output/CVE-2025-39725.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.12.41"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.15.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39725.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.612227984Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/656eaddbc952e1baae2f69281c22debe22140312",
        "https://git.kernel.org/stable/c/9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab",
        "https://git.kernel.org/stable/c/c1101113d45838a823188ae25c61af97552a28ae",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39725.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-39725",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39725.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-39725",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 499716,
  "published_at": "2025-09-05T17:27:18.719+00:00"
}