PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-31398 Linux CVE debrief

CVE-2026-31398 is a Linux kernel mm/rmap flaw in lazyfree folio PTE restoration. When anonymous lazyfree folios are unmapped in batches, a mix of writable and non-writable entries can be restored as writable, and soft-dirty state may also be lost. The supplied report shows this can violate anonymous memory/CoW semantics and trigger a page_table_check BUG_ON during reclaim, crashing affected kernels.

Vendor
Linux
Product
Unknown
CVSS
HIGH 7.8
CISA KEV
Not listed in stored evidence
Original CVE published
2026-04-03
Original CVE updated
2026-05-20
Advisory published
2026-04-03
Advisory updated
2026-05-20

Who should care

Linux kernel maintainers, distribution security teams, and operators running affected kernels in the listed version ranges: 6.15 through 6.18.20, 6.19 through 6.19.10, and 7.0-rc1 through 7.0-rc4. Systems that use MADV_FREE/lazyfree memory reclaim and mTHP deserve particular attention.

Technical summary

The bug is in folio_unmap_pte_batch() / lazyfree folio handling during anonymous unmap batching. If a batch contains both writable and non-writable PTEs, the restoration path can incorrectly treat the entire batch as writable. The report also notes that soft-dirty preservation was inconsistent on successful unmap, so the fix must respect both writable and soft-dirty bits during batching. In the provided reproducer, reclaim reaches try_to_unmap_one() and page_table_check_set() detects an invalid writable anonymous mapping shared across processes, resulting in a kernel BUG.

Defensive priority

High

Recommended defensive actions

  • Apply a kernel build or vendor backport that includes the upstream fix referenced by the official stable patch links.
  • Prioritize remediation on systems running kernels in the vulnerable ranges listed by NVD.
  • If you maintain custom kernels, verify the mm/rmap lazyfree folio batching fix is present in your tree.
  • After patching, regression-test workloads that use MADV_FREE, lazyfree reclaim, and mTHP for stability and unexpected kernel warnings or crashes.

Evidence notes

Source evidence is limited to the CVE description and NVD metadata. The CVE text describes incorrect PTE restoration for lazyfree folios, a crash reproducer, and the page_table_check BUG_ON trace. NVD marks the record analyzed, assigns CVSS 3.1 7.8 HIGH (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), and lists CWE-617. NVD also provides official stable kernel patch references. The supplied dates are CVE publishedAt 2026-04-03T16:16:38.240Z and modifiedAt 2026-05-20T13:03:52.863Z.

Official resources

Publicly disclosed via the CVE/NVD record on 2026-04-03; last modified in NVD on 2026-05-20.