CVE-2026-31648: mm: filemap: fix nr_pages calculation overflow in filemap_map_pages()
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.12% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 576543bedd616254032d4ebe54a90076f9e31740, 6.2, 6.6.135; azl3 kernel 6.6.134.1-2 on Azure Linux 3.0 6.6.137.1-1.
Low priority for now. Upgrade to Linux Linux 576543bedd616254032d4ebe54a90076f9e31740, 6.2, 6.6.135; azl3 kernel 6.6.134.1-2 on Azure Linux 3.0 6.6.137.1-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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---
- Published
- Apr 24, 2026
- Updated
- Nov 11, 2026
- EPSS
- 0.1% · 1th percentile
- CWE
- CWE-190
Report tools
Action score
31
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · Linux
- 7.8
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 84ede15f27c06b111d1398dfa80b6fac4b135e34, 6.12affected
- fe601b70eac6cd266e8d7d55030e90a73ed0e339 and later · before 88591194df736a508dd5461ab2167a61e98caac1affected · git
- 743a2753a02e805347969f6f89f38b736850d808 and later · before 633ab680c405ac390e6bec5b74aaf46197c837b6affected · git
- 743a2753a02e805347969f6f89f38b736850d808 and later · before 576543bedd616254032d4ebe54a90076f9e31740affected · git
- 743a2753a02e805347969f6f89f38b736850d808 and later · before 9316a820b9aae07d44469d6485376dad824c5b3faffected · git
- 743a2753a02e805347969f6f89f38b736850d808 and later · before f58df566524ebcdfa394329c64f47e3c9257516eaffected · git
- 6.6.117 and later · before 6.6.135affected · semver
- 6.1.159 and later · before 6.2affected · semver
- before 6.12not affected · semver
- 6.6.135 and later · up to and including 6.6.*not affected · semver
Affected versions · NVD (7)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel6.1.159 and later · before 6.2
- linux linux kernel6.6.117 and later · before 6.6.135
- linux linux kernel6.12.1 and later · before 6.12.82
- linux linux kernel6.13 and later · before 6.18.23
- linux linux kernel6.19 and later · before 6.19.13
- linux linux kernel6.12
- linux linux kernel7.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | from 0 | — |
| Debian:13 | linux | before 6.12.85-1 | 6.12.85-1 |
| Debian:14 | linux | before 6.19.13-1 | 6.19.13-1 |
| openSUSE:Leap 16.0 | dtb-aarch64 | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-64kb | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-azure | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-default | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-default-base | before 6.12.0-160000.35.1.160000.2.16 | 6.12.0-160000.35.1.160000.2.16 |
| openSUSE:Leap 16.0 | kernel-docs | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-rt | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-source | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-syms | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise High Availability Extension 16.0 | kernel-default | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise Server 16.0 | kernel-azure | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise Server 16.0 | kernel-docs | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise Server 16.0 | kernel-kvmsmall | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise Server 16.0 | kernel-obs-qa | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Enterprise Server 16.0 | kernel-zfcpdump | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Micro 6.2 | kernel-64kb | before 6.12.0-160000.35.1 | 6.12.0-160000.35.1 |
| SUSE:Linux Micro 6.2 | kernel-default-base | before 6.12.0-160000.35.1.160000.2.16 | 6.12.0-160000.35.1.160000.2.16 |
+4
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe…KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2026-31646Apr 24, 2026 · net: lan966x: fix page_pool error handling in lan966x_fdma_rx_alloc_page_pool()22Monitor
- ← EarlierCVE-2026-31647Apr 24, 2026 · idpf: fix PREEMPT_RT raw/bh spinlock nesting for async VC handling22Monitor
- Later →CVE-2026-31649Apr 24, 2026 · net: stmmac: fix integer underflow in chain mode39Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 576543bedd616254032d4ebe54a90076f9e31740 | Vendor (CNA) |
| Linux Linux | 6.2 | Vendor (CNA) |
| Linux Linux | 6.6.135 | Vendor (CNA) |
| Linux Linux | 633ab680c405ac390e6bec5b74aaf46197c837b6 | Vendor (CNA) |
| Linux Linux | 88591194df736a508dd5461ab2167a61e98caac1 | Vendor (CNA) |
| Linux Linux | 9316a820b9aae07d44469d6485376dad824c5b3f | Vendor (CNA) |
| Linux Linux | f58df566524ebcdfa394329c64f47e3c9257516e | Vendor (CNA) |
| azl3 kernel 6.6.134.1-2 on Azure Linux 3.0 | 6.6.137.1-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| debian:linux | 6.12.85-1 · Debian:13 | Package registry (OSV) |
| opensuse:dtb-aarch64 | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-64kb | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-azure | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-default | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-default-base | 6.12.0-160000.35.1.160000.2.16 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-docs | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-kvmsmall | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-obs-build | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-obs-qa | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-rt | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-source | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| opensuse:kernel-syms | 6.12.0-160000.35.1 · openSUSE:Leap 16.0 | Package registry (OSV) |
| suse:kernel-64kb | 6.12.0-160000.35.1 · SUSE:Linux Micro 6.2 | Package registry (OSV) |
| suse:kernel-azure | 6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0 | Package registry (OSV) |
| suse:kernel-default | 6.12.0-160000.35.1 · SUSE:Linux Enterprise High Availability Extension 16.0 | Package registry (OSV) |
| suse:kernel-default-base | 6.12.0-160000.35.1.160000.2.16 · SUSE:Linux Micro 6.2 | Package registry (OSV) |
| suse:kernel-docs | 6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0 | Package registry (OSV) |
| suse:kernel-kvmsmall | 6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0 | Package registry (OSV) |
| suse:kernel-obs-build | 6.12.0-160000.35.1 · SUSE:Linux Micro Extras 6.2 | Package registry (OSV) |
| suse:kernel-obs-qa | 6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0 | Package registry (OSV) |
| suse:kernel-rt | 6.12.0-160000.35.1 · SUSE:Linux Micro 6.2 | Package registry (OSV) |
+3
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-316330 days apartrxrpc: Fix integer overflow in rxgk_verify_response()39Monitor
- CVE-2026-316490 days apartnet: stmmac: fix integer underflow in chain mode39Monitor
- CVE-2026-316590 days apartbatman-adv: reject oversized global TT response buffers39Monitor
- CVE-2026-4334114 days apartnet/ipv6: ioam6: prevent schema length wraparound in trace fill39Monitor
- CVE-2026-4603933 days apartrxgk: Fix potential integer overflow in length check39Monitor
- CVE-2026-4632546 days apartRDMA/rxe: Fix iova-to-va conversion for MR page sizes != PAGE_SIZE39Monitor
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-190 · Integer Overflow or WraparoundCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (2)
- SSVC exploitation— → none
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (4 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.