Skip to content
Noroxi
NVD / CVE Program· CNA Linux

CVE-2026-31648: mm: filemap: fix nr_pages calculation overflow in filemap_map_pages()

HighCVSS 7.8 · v3.1—No exploit Fix available

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

Report tools

JSON

Action score

31

Monitor

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.

Follow CVE-2026-31648

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Is your version affected? Check it

Noroxi 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 help

Affected 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.

VendorProduct
linuxlinux 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

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12linuxfrom 0—
Debian:13linuxbefore 6.12.85-16.12.85-1
Debian:14linuxbefore 6.19.13-16.19.13-1
openSUSE:Leap 16.0dtb-aarch64before 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-64kbbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-azurebefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-defaultbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-default-basebefore 6.12.0-160000.35.1.160000.2.166.12.0-160000.35.1.160000.2.16
openSUSE:Leap 16.0kernel-docsbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-kvmsmallbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-obs-buildbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-obs-qabefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-rtbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-sourcebefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-symsbefore 6.12.0-160000.35.16.12.0-160000.35.1
openSUSE:Leap 16.0kernel-zfcpdumpbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise High Availability Extension 16.0kernel-defaultbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise Server 16.0kernel-azurebefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise Server 16.0kernel-docsbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise Server 16.0kernel-kvmsmallbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise Server 16.0kernel-obs-qabefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Enterprise Server 16.0kernel-zfcpdumpbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Micro 6.2kernel-64kbbefore 6.12.0-160000.35.16.12.0-160000.35.1
SUSE:Linux Micro 6.2kernel-default-basebefore 6.12.0-160000.35.1.160000.2.166.12.0-160000.35.1.160000.2.16

+4

Other highest-scoring records for the same primary product.

  • CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV
    90Now
  • 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…KEV
    89Now
  • CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV
    85Now

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 handling
    22Monitor
  • Later →CVE-2026-31649Apr 24, 2026 · net: stmmac: fix integer underflow in chain mode
    39Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Linux Linux576543bedd616254032d4ebe54a90076f9e31740Vendor (CNA)
Linux Linux6.2Vendor (CNA)
Linux Linux6.6.135Vendor (CNA)
Linux Linux633ab680c405ac390e6bec5b74aaf46197c837b6Vendor (CNA)
Linux Linux88591194df736a508dd5461ab2167a61e98caac1Vendor (CNA)
Linux Linux9316a820b9aae07d44469d6485376dad824c5b3fVendor (CNA)
Linux Linuxf58df566524ebcdfa394329c64f47e3c9257516eVendor (CNA)
azl3 kernel 6.6.134.1-2 on Azure Linux 3.06.6.137.1-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
debian:linux6.12.85-1 · Debian:13Package registry (OSV)
opensuse:dtb-aarch646.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-64kb6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-azure6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-default6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-default-base6.12.0-160000.35.1.160000.2.16 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-docs6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-kvmsmall6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-obs-build6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-obs-qa6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-rt6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-source6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
opensuse:kernel-syms6.12.0-160000.35.1 · openSUSE:Leap 16.0Package registry (OSV)
suse:kernel-64kb6.12.0-160000.35.1 · SUSE:Linux Micro 6.2Package registry (OSV)
suse:kernel-azure6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0Package registry (OSV)
suse:kernel-default6.12.0-160000.35.1 · SUSE:Linux Enterprise High Availability Extension 16.0Package registry (OSV)
suse:kernel-default-base6.12.0-160000.35.1.160000.2.16 · SUSE:Linux Micro 6.2Package registry (OSV)
suse:kernel-docs6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0Package registry (OSV)
suse:kernel-kvmsmall6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0Package registry (OSV)
suse:kernel-obs-build6.12.0-160000.35.1 · SUSE:Linux Micro Extras 6.2Package registry (OSV)
suse:kernel-obs-qa6.12.0-160000.35.1 · SUSE:Linux Enterprise Server 16.0Package registry (OSV)
suse:kernel-rt6.12.0-160000.35.1 · SUSE:Linux Micro 6.2Package 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 mode
    39Monitor
  • CVE-2026-316590 days apartbatman-adv: reject oversized global TT response buffers
    39Monitor
  • CVE-2026-4334114 days apartnet/ipv6: ioam6: prevent schema length wraparound in trace fill
    39Monitor
  • CVE-2026-4603933 days apartrxgk: Fix potential integer overflow in length check
    39Monitor
  • CVE-2026-4632546 days apartRDMA/rxe: Fix iova-to-va conversion for MR page sizes != PAGE_SIZE
    39Monitor

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

CVSS 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.

ATT&CK techniques

—

References

All records