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.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-31398 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-31398

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-31398 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-31398

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Mitigation or vendor reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/29f40594a28114b9a9bc87f6cf7bbee9609628f2

    416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch

  • Mitigation or vendor reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/99888a4f340ca8e839a0524556bd4db76d63f4e0

    416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch

  • Mitigation or vendor reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/a0911ccdba41b0871abbf8412857bafedec3dbe1

    416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.