Skip to content
OpenAdvisories
Unscored CVE-2026-99656 EUVD-2026-130949GHSA-8q4m-w2j7-32xv

mm/madvise: fix data loss from MADV_FREE on a KSM page

Published Nov 20, 2026 · Assigned by Linux

Description

In the Linux kernel, the following vulnerability has been resolved:

mm/madvise: fix data loss from MADV_FREE on a KSM page

MADV_FREE can clear the dirty flag of a singly mapped KSM folio. The
folio remains in the stable tree and can gain new mappings without being
dirtied again. Once marked lazyfree, reclaim can discard data that those
mappings still need.

KSM always marks a folio dirty when converting it to a KSM folio in
try_to_merge_one_page(). Marking a folio lazyfree clears PG_swapbacked
but leaves PG_dirty unchanged. Preserving PG_dirty makes reclaim restore
PG_swapbacked instead of discarding the folio. This also protects folios
that were already lazyfree when KSM converted them.

Skip KSM folios before clearing their dirty flag, checking under the
folio lock to serialize with KSM conversion.

Affected products

VendorProductAffectedFixed
Linux Linux 4.5 6.12.118

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