cve.bz

CVE-2026-31648 linux linux kernel: Year 2038 problem, Y2K38, Y2038, Epochalypse

7.8 highEPSS 0.1%Fix available

High (7.8) in linux linux kernel. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
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---

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 2nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-190 Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-31648 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-31648?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-31648?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-31648 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linuxfrom 6.6.117 before 6.6.135
Linuxfrom 6.1.159 before 6.2
Linux6.12 and later

Fixed in

ProductRelease lineFixed in
Linux6.66.6.135
Linux6.126.12.82
Linux6.186.18.23
Linux6.196.19.13
Linuxlater releases7.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linuxno fix listedDEBIAN-CVE-2026-31648
Debian13linux6.12.85-1DEBIAN-CVE-2026-31648
Debian14linux6.19.13-1DEBIAN-CVE-2026-31648
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2026-31648
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2026-31648
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2026-31648
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1061.64~22.04.1UBUNTU-CVE-2026-31648 USN-8595-3
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1063.71~22.04.1UBUNTU-CVE-2026-31648 USN-8606-1
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1062.69~22.04.1UBUNTU-CVE-2026-31648 USN-8609-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1064.72~22.04.1UBUNTU-CVE-2026-31648 USN-8567-1
Ubuntu22.04:LTSlinux-hwe-6.86.8.0-136.136~22.04.1UBUNTU-CVE-2026-31648 USN-8619-1
Ubuntu22.04:LTSlinux-ibm-6.86.8.0-1061.62~22.04.1UBUNTU-CVE-2026-31648 USN-8574-3
Ubuntu22.04:LTSlinux-lowlatency-hwe-6.86.8.0-136.136.2~22.04.1UBUNTU-CVE-2026-31648 USN-8574-2
Ubuntu22.04:LTSlinux-nvidia-6.86.8.0-1059.62~22.04.1UBUNTU-CVE-2026-31648 USN-8596-1
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1058.61~22.04.1UBUNTU-CVE-2026-31648 USN-8595-1
30 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 16.0kernel-default6.12.0-160000.35.1SUSE-SU-2026:22099-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0kernel-64kb, kernel-docs, kernel-syms and 6 more6.12.0-160000.35.1SUSE-SU-2026:22127-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0kernel-default-base6.12.0-160000.35.1.160000.2.16SUSE-SU-2026:22127-1
SUSELinux Micro 6.2kernel-default-base6.12.0-160000.35.1.160000.2.16SUSE-SU-2026:22112-1
SUSELinux Micro 6.2kernel-rt, kernel-64kb, kernel-source and 1 more6.12.0-160000.35.1SUSE-SU-2026:22112-1
SUSELinux Micro Extras 6.2kernel-syms, kernel-obs-build6.12.0-160000.35.1SUSE-SU-2026:22117-1
openSUSELeap 16.0kernel-default-base6.12.0-160000.35.1.160000.2.16openSUSE-SU-2026:20965-1
openSUSELeap 16.0kernel-rt, dtb-aarch64, kernel-64kb and 9 more6.12.0-160000.35.1openSUSE-SU-2026:20965-1
Azure Linux3kernel6.6.137.1-1AZL-84581
Alpaquita23linux-ltsno fix listedBELL-CVE-2026-31648
Alpaquita25linux-lts6.12.85-r0BELL-CVE-2026-31648
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2026-31648

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A `vm_fault_t` vs page-count type mix-up could overflow `nr_pages` in `filemap_map_pages()` under races, skipping needed prefault work or mis-sizing loops. Red Hat treats this as core MM correctness with local trigger.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelFix deferred
Red Hat Enterprise Linux 7kernel-rtFix deferred
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-31648.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON