CVE-2026-31648

HIGHNVD 7.87.8
EchelonGraph scoreMEDIUM confidence

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

Triggered by: GitHub Security Advisory CVSS
Sources: epss, ghsa, nvd
7.8EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: 0%CVSS: 7.8Exploit: None knownExposed: 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: filemap: fix nr_pages calculation overflow in filemap_map_pages()

When running stress-ng on my Arm64 machine with v7.0-rc3 kernel, I encountered some very strange crash issues showing up as "Bad page state":

" [ 734.496287] BUG: Bad page state in process stress-ng-env pfn:415735fb [ 734.496427] page: refcount:0 mapcount:1 mapping:0000000000000000 index:0x4cf316 pfn:0x415735fb [ 734.496434] flags: 0x57fffe000000800(owner_2|node=1|zone=2|lastcpupid=0x3ffff) [ 734.496439] raw: 057fffe000000800 0000000000000000 dead000000000122 0000000000000000 [ 734.496440] raw: 00000000004cf316 0000000000000000 0000000000000000 0000000000000000 [ 734.496442] page dumped because: nonzero mapcount "

After analyzing this page’s state, it is hard to understand why the mapcount is not 0 while the refcount is 0, since this page is not where the issue first occurred. By enabling the CONFIG_DEBUG_VM config, I can reproduce the crash as well and captured the first warning where the issue appears:

" [ 734.469226] page: refcount:33 mapcount:0 mapping:00000000bef2d187 index:0x81a0 pfn:0x415735c0 [ 734.469304] head: order:5 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 734.469315] memcg:ffff000807a8ec00 [ 734.469320] aops:ext4_da_aops ino:100b6f dentry name(?):"stress-ng-mmaptorture-9397-0-2736200540" [ 734.469335] flags: 0x57fffe400000069(locked|uptodate|lru|head|node=1|zone=2|lastcpupid=0x3ffff) ...... [ 734.469364] page dumped because: VM_WARN_ON_FOLIO((_Generic((page + nr_pages - 1), const struct page *: (const struct folio *)_compound_head(page + nr_pages - 1), struct page *: (struct folio *)_compound_head(page + nr_pages - 1))) != folio) [ 734.469390] ------------[ cut here ]------------ [ 734.469393] WARNING: ./include/linux/rmap.h:351 at folio_add_file_rmap_ptes+0x3b8/0x468, CPU#90: stress-ng-mlock/9430 [ 734.469551] folio_add_file_rmap_ptes+0x3b8/0x468 (P) [ 734.469555] set_pte_range+0xd8/0x2f8 [ 734.469566] filemap_map_folio_range+0x190/0x400 [ 734.469579] filemap_map_pages+0x348/0x638 [ 734.469583] do_fault_around+0x140/0x198 ...... [ 734.469640] el0t_64_sync+0x184/0x188 "

The code that triggers the warning is: "VM_WARN_ON_FOLIO(page_folio(page + nr_pages - 1) != folio, folio)", which indicates that set_pte_range() tried to map beyond the large folio’s size.

By adding more debug information, I found that 'nr_pages' had overflowed in filemap_map_pages(), causing set_pte_range() to establish mappings for a range exceeding the folio size, potentially corrupting fields of pages that do not belong to this folio (e.g., page->_mapcount).

After above analysis, I think the possible race is as follows:

CPU 0 CPU 1 filemap_map_pages() ext4_setattr() //get and lock folio with old inode->i_size next_uptodate_folio()

....... //shrink the inode->i_size i_size_write(inode, attr->ia_size);

//calculate the end_pgoff with the new inode->i_size file_end = DIV_ROUND_UP(i_size_read(mapping->host), PAGE_SIZE) - 1; end_pgoff = min(end_pgoff, file_end);

...... //nr_pages can be overflowed, cause xas.xa_index > end_pgoff end = folio_next_index(folio) - 1; nr_pages = min(end, end_pgoff) - xas.xa_index + 1;

...... //map large folio filemap_map_folio_range() ...... //truncate folios truncate_pagecache(inode, inode->i_size);

To fix this issue, move the 'end_pgoff' calculation before next_uptodate_folio(), so the retrieved folio stays consistent with the file end to avoid ---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 PROB
0%
EPSS %ILE
2%
KEV
Not listed

Published

April 24, 2026

Last Modified

April 27, 2026

Advisory Details (5)

Auto-updated Jun 4, 2026
No patch confirmed yet.
generic

mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() - kernel/git/stable/linux.git - Linux kernel stable tree

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

mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/9316a820b9aae07d44469d6485376dad824c5b3f
generic

mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/88591194df736a508dd5461ab2167a61e98caac1
generic

mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/633ab680c405ac390e6bec5b74aaf46197c837b6
generic

mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/576543bedd616254032d4ebe54a90076f9e31740

Vendor Advisories for CVE-2026-31648(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.6.135osv

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 12× in last 7d / 41× 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 156 total refreshes for this CVE.

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

Frequently asked(5)

What is CVE-2026-31648?
CVE-2026-31648 is a high vulnerability published on April 24, 2026. In the Linux kernel, the following vulnerability has been resolved: mm: filemap: fix nrpages calculation overflow in filemapmap_pages() When running stress-ng on my Arm64 machine with v7.0-rc3 kernel, I encountered some very strange crash issues showing up as "Bad page state": " [ 734.496287] BUG:…
When was CVE-2026-31648 disclosed?
CVE-2026-31648 was first published in the National Vulnerability Database on April 24, 2026, with the most recent update on April 27, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2026-31648 actively exploited?
CVE-2026-31648 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 0% probability of exploitation in the next 30 days, which ranks it in the top 97.9% of all scored CVEs.
What is the CVSS score of CVE-2026-31648?
CVE-2026-31648 has a CVSS v3 base score of 7.8 (NVD).
How do I remediate CVE-2026-31648?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-31648, 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-31648

Explore →

Is Your Infrastructure Affected by CVE-2026-31648?

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