Back

MEDIUM

mm: memfd_luo: always dirty all folios

Published May 8, 2026

Description

A dirty folio is one which has been written to. A clean folio is its opposite. Since a clean folio has no user data, it can be freed under memory pressure.

memfd preservation with LUO saves the flag at preserve(). This is problematic. The folio might get dirtied later. Saving it at freeze() also doesn't work, since the dirty bit from PTE is normally synced at unmap and there might still be mappings of the file at freeze().

To see why this is a problem, say a folio is clean at preserve, but gets dirtied later. The serialized state of the folio will mark it as clean. After retrieve, the next kernel will see the folio as clean and might try to reclaim it under memory pressure. This will result in losing user data.

Mark all folios of the file as dirty, and always set the MEMFD_LUO_FOLIO_DIRTY flag. This comes with the side effect of making all clean folios un-reclaimable. This is a cost that has to be paid for participants of live update. It is not expected to be a common use case to preserve a lot of clean folios anyway.

Since the value of pfolio->flags is a constant now, drop the flags variable and set it directly.

Affected products

Remediation

No remediation recorded yet.

Weaknesses (1)

References (8)

Change history (0)

No recorded changes yet.

Sources

CVE.org / MITRE

Status PUBLISHED
Assigner Linux
Published May 8, 2026
Updated May 11, 2026
Reserved May 1, 2026

CISA Vulnrichment

No data

NVD

Status Analyzed
Modified Jun 17, 2026

Red Hat

Severity Moderate
Public date May 8, 2026
Bugzilla 2468205

ENISA EUVD

Assigner Linux
Published May 8, 2026
Updated May 11, 2026

GitHub

No data