CVE-2026-31398

HIGHNVD 7.87.8
EchelonGraph scoreMEDIUM confidence

Score 7.8 from GitHub Security Advisory (severity: HIGH) published 2026-04-03. NVD baseline CVSS 7.8; sources differ by 0.0.

Triggered by: GitHub Security Advisory CVSS
Sources: epss, ghsa, nvd
Trending — 3 sources updated this week
7.8
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS: 0%CVSS: 7.8Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

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

mm/rmap: fix incorrect pte restoration for lazyfree folios

We batch unmap anonymous lazyfree folios by folio_unmap_pte_batch. If the batch has a mix of writable and non-writable bits, we may end up setting the entire batch writable. Fix this by respecting writable bit during batching.

Although on a successful unmap of a lazyfree folio, the soft-dirty bit is lost, preserve it on pte restoration by respecting the bit during batching, to make the fix consistent w.r.t both writable bit and soft-dirty bit.

I was able to write the below reproducer and crash the kernel. Explanation of reproducer (set 64K mTHP to always):

Fault in a 64K large folio. Split the VMA at mid-point with MADV_DONTFORK. fork() - parent points to the folio with 8 writable ptes and 8 non-writable ptes. Merge the VMAs with MADV_DOFORK so that folio_unmap_pte_batch() can determine all the 16 ptes as a batch. Do MADV_FREE on the range to mark the folio as lazyfree. Write to the memory to dirty the pte, eventually rmap will dirty the folio. Then trigger reclaim, we will hit the pte restoration path, and the kernel will crash with the trace given below.

The BUG happens at:

BUG_ON(atomic_inc_return(&ptc->anon_map_count) > 1 && rw);

The code path is asking for anonymous page to be mapped writable into the pagetable. The BUG_ON() firing implies that such a writable page has been mapped into the pagetables of more than one process, which breaks anonymous memory/CoW semantics.

[ 21.134473] kernel BUG at mm/page_table_check.c:118! [ 21.134497] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP [ 21.135917] Modules linked in: [ 21.136085] CPU: 1 UID: 0 PID: 1735 Comm: dup-lazyfree Not tainted 7.0.0-rc1-00116-g018018a17770 #1028 PREEMPT [ 21.136858] Hardware name: linux,dummy-virt (DT) [ 21.137019] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 21.137308] pc : page_table_check_set+0x28c/0x2a8 [ 21.137607] lr : page_table_check_set+0x134/0x2a8 [ 21.137885] sp : ffff80008a3b3340 [ 21.138124] x29: ffff80008a3b3340 x28: fffffdffc3d14400 x27: ffffd1a55e03d000 [ 21.138623] x26: 0040000000000040 x25: ffffd1a55f7dd000 x24: 0000000000000001 [ 21.139045] x23: 0000000000000001 x22: 0000000000000001 x21: ffffd1a55f217f30 [ 21.139629] x20: 0000000000134521 x19: 0000000000134519 x18: 005c43e000040000 [ 21.140027] x17: 0001400000000000 x16: 0001700000000000 x15: 000000000000ffff [ 21.140578] x14: 000000000000000c x13: 005c006000000000 x12: 0000000000000020 [ 21.140828] x11: 0000000000000000 x10: 005c000000000000 x9 : ffffd1a55c079ee0 [ 21.141077] x8 : 0000000000000001 x7 : 005c03e000040000 x6 : 000000004000ffff [ 21.141490] x5 : ffff00017fffce00 x4 : 0000000000000001 x3 : 0000000000000002 [ 21.141741] x2 : 0000000000134510 x1 : 0000000000000000 x0 : ffff0000c08228c0 [ 21.141991] Call trace: [ 21.142093] page_table_check_set+0x28c/0x2a8 (P) [ 21.142265] __page_table_check_ptes_set+0x144/0x1e8 [ 21.142441] __set_ptes_anysz.constprop.0+0x160/0x1a8 [ 21.142766] contpte_set_ptes+0xe8/0x140 [ 21.142907] try_to_unmap_one+0x10c4/0x10d0 [ 21.143177] rmap_walk_anon+0x100/0x250 [ 21.143315] try_to_unmap+0xa0/0xc8 [ 21.143441] shrink_folio_list+0x59c/0x18a8 [ 21.143759] shrink_lruvec+0x664/0xbf0 [ 21.144043] shrink_node+0x218/0x878 [ 21.144285] __node_reclaim.constprop.0+0x98/0x338 [ 21.144763] user_proactive_reclaim+0x2a4/0x340 [ 21.145056] reclaim_store+0x3c/0x60 [ 21.145216] dev_attr_store+0x20/0x40 [ 21.145585] sysfs_kf_write+0x84/0xa8 [ 21.145835] kernfs_fop_write_iter+0x130/0x1c8 [ 21.145994] vfs_write+0x2b8/0x368 [ 21.146119] ksys_write+0x70/0x110 [ 21.146240] __arm64_sys_write+0x24/0x38 [ 21.146380] invoke_syscall+0x50/0x120 [ 21.146513] el0_svc_common.constprop.0+0x48/0xf8 [ 21.146679] do_el0_svc+0x28/0x40 [ 21.146798] el0_svc+0x34/0x110 [ 21.146926] el0t ---truncated---

CVSS v3
7.8
EG Score
7.8(medium)
EG Risk
40(Track)
EG Risk 40/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity78% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS
2.3%
KEV
Not listed

Published

April 3, 2026

Last Modified

May 20, 2026

Advisory Details (3)

Auto-updated May 20, 2026
No patch confirmed yet.
generic

mm/rmap: fix incorrect pte restoration for lazyfree folios - kernel/git/stable/linux.git - Linux kernel stable tree

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

mm/rmap: fix incorrect pte restoration for lazyfree folios - kernel/git/stable/linux.git - Linux kernel stable tree

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

mm/rmap: fix incorrect pte restoration for lazyfree folios - kernel/git/stable/linux.git - Linux kernel stable tree

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

Vendor Advisories for CVE-2026-31398(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Patch Availability(1)

Vendor / EcosystemFixed in / PatchReleasedSource
linuxKernel @ 6.18.20osv

Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.

Weakness Classification(1)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

Data Freshness Timeline

(refreshed 14× in last 7d / 45× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

Showing the most recent 100 of 119 total refreshes for this CVE.

  1. 2026-07-23 14:18 UTCEPSS rescore
  2. 2026-07-23 14:18 UTCEPSS rescore
  3. 2026-07-23 03:08 UTCEG score recompute
  4. 2026-07-22 14:08 UTCEPSS rescore
  5. 2026-07-22 14:08 UTCEPSS rescore
  6. 2026-07-21 15:24 UTCEPSS rescore
  7. 2026-07-21 15:24 UTCEPSS rescore
  8. 2026-07-20 17:08 UTCEPSS rescore
  9. 2026-07-20 17:08 UTCEPSS rescore
  10. 2026-07-19 14:31 UTCEPSS rescore
  11. 2026-07-19 14:31 UTCEPSS rescore
  12. 2026-07-18 10:04 UTCEPSS rescore
  13. 2026-07-18 10:04 UTCEPSS rescore
  14. 2026-07-17 03:24 UTCOSV refresh
  15. 2026-07-16 17:03 UTCEPSS rescore
  16. 2026-07-16 17:03 UTCEPSS rescore
  17. 2026-07-15 16:57 UTCEPSS rescore
  18. 2026-07-15 16:57 UTCEPSS rescore
  19. 2026-07-15 02:00 UTCEPSS rescore
  20. 2026-07-15 02:00 UTCEPSS rescore
  21. 2026-07-13 22:30 UTCEPSS rescore
  22. 2026-07-13 06:13 UTCEPSS rescore
  23. 2026-07-13 06:13 UTCEPSS rescore
  24. 2026-07-12 05:46 UTCEPSS rescore
  25. 2026-07-11 08:27 UTCEPSS rescore
Show 75 more
  1. 2026-07-09 19:10 UTCEPSS rescore
  2. 2026-07-08 15:15 UTCEPSS rescore
  3. 2026-07-07 13:46 UTCEPSS rescore
  4. 2026-07-06 16:27 UTCEPSS rescore
  5. 2026-07-06 16:27 UTCEPSS rescore
  6. 2026-07-06 02:23 UTCEPSS rescore
  7. 2026-07-06 02:23 UTCEPSS rescore
  8. 2026-07-04 06:31 UTCEPSS rescore
  9. 2026-07-01 15:06 UTCEPSS rescore
  10. 2026-06-30 23:22 UTCEPSS rescore
  11. 2026-06-29 14:06 UTCEPSS rescore
  12. 2026-06-29 14:06 UTCEPSS rescore
  13. 2026-06-28 14:07 UTCEPSS rescore
  14. 2026-06-28 14:07 UTCEPSS rescore
  15. 2026-06-28 04:56 UTCEPSS rescore
  16. 2026-06-28 04:56 UTCEPSS rescore
  17. 2026-06-27 03:08 UTCEPSS rescore
  18. 2026-06-25 13:49 UTCEPSS rescore
  19. 2026-06-25 13:49 UTCEPSS rescore
  20. 2026-06-24 14:05 UTCEPSS rescore
  21. 2026-06-23 21:33 UTCEPSS rescore
  22. 2026-06-23 21:33 UTCEPSS rescore
  23. 2026-06-22 14:25 UTCEPSS rescore
  24. 2026-06-22 14:25 UTCEPSS rescore
  25. 2026-06-21 14:56 UTCEPSS rescore
  26. 2026-06-21 14:56 UTCEPSS rescore
  27. 2026-06-21 01:59 UTCEPSS rescore
  28. 2026-06-19 19:25 UTCEPSS rescore
  29. 2026-06-19 19:25 UTCEPSS rescore
  30. 2026-06-18 17:52 UTCEPSS rescore
  31. 2026-06-18 17:52 UTCEPSS rescore
  32. 2026-06-17 17:53 UTCEPSS rescore
  33. 2026-06-16 17:52 UTCEPSS rescore
  34. 2026-06-15 17:49 UTCEPSS rescore
  35. 2026-06-14 23:18 UTCEPSS rescore
  36. 2026-06-13 23:00 UTCEPSS rescore
  37. 2026-06-12 23:12 UTCEPSS rescore
  38. 2026-06-12 23:12 UTCEPSS rescore
  39. 2026-06-11 21:59 UTCGHSA enrichment
  40. 2026-06-11 14:00 UTCEPSS rescore
  41. 2026-06-10 22:18 UTCEPSS rescore
  42. 2026-06-10 14:13 UTCGHSA enrichment
  43. 2026-06-10 13:22 UTCEPSS rescore
  44. 2026-06-10 02:18 UTCGHSA enrichment
  45. 2026-06-09 14:29 UTCGHSA enrichment
  46. 2026-06-08 14:17 UTCEPSS rescore
  47. 2026-06-08 14:17 UTCEPSS rescore
  48. 2026-06-08 10:43 UTCGHSA enrichment
  49. 2026-06-07 22:40 UTCGHSA enrichment
  50. 2026-06-07 15:25 UTCEPSS rescore
  51. 2026-06-07 15:25 UTCEPSS rescore
  52. 2026-06-07 15:25 UTCEPSS rescore
  53. 2026-06-07 10:51 UTCGHSA enrichment
  54. 2026-06-06 13:47 UTCEPSS rescore
  55. 2026-06-06 13:47 UTCEPSS rescore
  56. 2026-06-05 22:47 UTCEPSS rescore
  57. 2026-06-05 22:47 UTCEPSS rescore
  58. 2026-06-05 06:10 UTCEPSS rescore
  59. 2026-06-05 06:10 UTCEPSS rescore
  60. 2026-06-04 13:12 UTCEPSS rescore
  61. 2026-06-04 13:12 UTCEPSS rescore
  62. 2026-06-02 20:13 UTCEPSS rescore
  63. 2026-06-02 20:13 UTCEPSS rescore
  64. 2026-06-01 13:51 UTCEPSS rescore
  65. 2026-06-01 13:51 UTCEPSS rescore
  66. 2026-05-31 22:30 UTCEPSS rescore
  67. 2026-05-31 22:30 UTCEPSS rescore
  68. 2026-05-31 00:16 UTCEPSS rescore
  69. 2026-05-31 00:16 UTCEPSS rescore
  70. 2026-05-29 13:44 UTCEPSS rescore
  71. 2026-05-29 13:44 UTCEPSS rescore
  72. 2026-05-28 13:44 UTCEPSS rescore
  73. 2026-05-28 13:44 UTCEPSS rescore
  74. 2026-05-28 13:44 UTCEPSS rescore
  75. 2026-05-27 13:40 UTCEPSS rescore

Frequently asked(5)

What is CVE-2026-31398?
CVE-2026-31398 is a high vulnerability published on April 3, 2026. In the Linux kernel, the following vulnerability has been resolved: mm/rmap: fix incorrect pte restoration for lazyfree folios We batch unmap anonymous lazyfree folios by foliounmappte_batch. If the batch has a mix of writable and non-writable bits, we may end up setting the entire batch writable.…
When was CVE-2026-31398 disclosed?
CVE-2026-31398 was first published in the National Vulnerability Database on April 3, 2026, with the most recent update on May 20, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2026-31398 actively exploited?
CVE-2026-31398 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 2.3% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2026-31398?
CVE-2026-31398 has a CVSS v3 base score of 7.8 (NVD).
How do I remediate CVE-2026-31398?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-31398, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-31398

Explore →

Is Your Infrastructure Affected by CVE-2026-31398?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.