cvelo
P2 · HighCVSS 7.8EPSS 0.2%

mm/huge_memory: fix truncate racing with PMD zapping

  • CVE-2026-99669
  • GHSA-p594-hgg6-6mw2
  • EUVD-2026-130962

Description

In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: fix truncate racing with PMD zapping zap_huge_pmd_folio() removes the rmap before calling folio_mark_dirty(). If this was the last mapping, truncation can skip unmapping the folio and proceed without waiting for the PMD lock, racing with dirtying. ifs_set_range_dirty() can oops if MADV_DONTNEED races with ftruncate() on XFS, when we get the folio set dirty after it was found to not be mapped anymore. Move folio_mark_dirty() and folio_mark_accessed() before rmap removal, matching the PTE zap path. This keeps the folio mapped while updating its state, so truncation must wait for the page table lock. Fix generated by an LLM and sent by Chris Mason in private. [ david: simplify comment and description ]

Text from the CVE.org record.

Recommendation

  • Linux

    • If you run 6.18.xupdate to 6.18.65 or laterPatch update: breaking changes are unlikely
    • If you run 6.12.xupdate to 6.12.119 or laterPatch update: breaking changes are unlikely
    • If you run 6.6.xupdate to 6.6.163 or laterPatch update: breaking changes are unlikely
    • If you run 6.1.xupdate to 6.1.193 or laterPatch update: breaking changes are unlikely
    • If you run 5.15.xupdate to 5.15.226 or laterPatch update: breaking changes are unlikely
    • If you run 5.10.xupdate to 5.10.275 or laterPatch update: breaking changes are unlikely

    Some affected versions have no stated fix.

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • Linux

    Affected versionsFixed in
    from 6.18.52 to before 6.18.656.18.65
    from 6.12.114 to before 6.12.1196.12.119
    from 6.6.160 to before 6.6.1636.6.163
    from 6.1.191 to before 6.1.1936.1.193
    from 5.15.224 to before 5.15.2265.15.226
    from 5.10.273 to before 5.10.2755.10.275
    from 7.2.5 to before 7.3none stated
    7.3none stated

    and 9 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.