Skip to content
OpenAdvisories
Unscored CVE-2026-99669 EUVD-2026-130962GHSA-p594-hgg6-6mw2

mm/huge_memory: fix truncate racing with PMD zapping

Published Nov 20, 2026 · Assigned by Linux

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 ]

Affected products

VendorProductAffectedFixed
Linux Linux 5.10.273 – < 5.11, 5.15.224 – < 5.16, 6.1.191 – < 6.2, 6.6.160 – < 6.7, 6.12.114 – < 6.13, 6.18.52 – < 6.19, 7.2.5 – < 7.3, 7.3 5.11

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux No fix yet —
Debian 13 linux No fix yet —
Debian 12 linux No fix yet —

Advisories 1

References