cve.bz

CVE-2025-40006 linux linux

7.8 highEPSS 0.2%Fix available

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

On this page
In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix folio is still mapped when deleted Migration may be raced with fallocating hole. remove_inode_single_folio will unmap the folio if the folio is still mapped. However, it's called without folio lock. If the folio is migrated and the mapped pte has been converted to migration entry, folio_mapped() returns false, and won't unmap it. Due to extra refcount held by remove_inode_single_folio, migration fails, restores migration entry to normal pte, and the folio is mapped again. As a result, we triggered BUG in filemap_unaccount_folio. The log is as follows: BUG: Bad page cache in process hugetlb pfn:156c00 page: refcount:515 mapcount:0 mapping:0000000099fef6e1 index:0x0 pfn:0x156c00 head: order:9 mapcount:1 entire_mapcount:1 nr_pages_mapped:0 pincount:0 aops:hugetlbfs_aops ino:dcc dentry name(?):"my_hugepage_file" flags: 0x17ffffc00000c1(locked|waiters|head|node=0|zone=2|lastcpupid=0x1fffff) page_type: f4(hugetlb) page dumped because: still mapped when deleted CPU: 1 UID: 0 PID: 395 Comm: hugetlb Not tainted 6.17.0-rc5-00044-g7aac71907bde-dirty #484 NONE Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 Call Trace: <TASK> dump_stack_lvl+0x4f/0x70 filemap_unaccount_folio+0xc4/0x1c0 __filemap_remove_folio+0x38/0x1c0 filemap_remove_folio+0x41/0xd0 remove_inode_hugepages+0x142/0x250 hugetlbfs_fallocate+0x471/0x5a0 vfs_fallocate+0x149/0x380 Hold folio lock before checking if the folio is mapped to avold race with migration.

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.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 11th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • Linux Linux: fixed in 5.4.300
  • Linux Linux: fixed in 5.10.245
  • Linux Linux: fixed in 5.15.194
  • Linux Linux: fixed in 6.1.155
  • Linux Linux: fixed in 6.6.109
  • Linux Linux: fixed in 6.12.50
  • Linux Linux: fixed in 6.16.10
  • Linux Linux: fixed in 6.17
  • Debian, Ubuntu, SUSE, openSUSE, Alpaquita: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2025-40006 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-40006?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-40006?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-2025-40006 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
Linux4.5 and later

Fixed in

ProductRelease lineFixed in
Linux5.45.4.300
Linux5.105.10.245
Linux5.155.15.194
Linux6.16.1.155
Linux6.66.6.109
Linux6.126.12.50
Linux6.166.16.10
Linuxlater releases6.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux5.10.247-1DLA-4404-1
Debian11linux-6.16.1.158-1~deb11u1DLA-4379-1
Debian12linux6.1.158-1DEBIAN-CVE-2025-40006 DSA-6053-1
Debian13linux6.12.57-1DEBIAN-CVE-2025-40006
Debian14linux6.16.10-1DEBIAN-CVE-2025-40006
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-40006
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-40006
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-40006
Ubuntu22.04:LTSlinux, linux-lowlatency5.15.0-170.180UBUNTU-CVE-2025-40006 USN-8033-1
Ubuntu22.04:LTSlinux-aws5.15.0-1100.107UBUNTU-CVE-2025-40006 USN-8033-1
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1050.53~22.04.1UBUNTU-CVE-2025-40006 USN-8095-4
Ubuntu22.04:LTSlinux-azure5.15.0-1109.118UBUNTU-CVE-2025-40006 USN-8163-2
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-40006 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1109.118.1UBUNTU-CVE-2025-40006
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1058.65~22.04.1UBUNTU-CVE-2025-40006
Ubuntu22.04:LTSlinux-gcp5.15.0-1100.109UBUNTU-CVE-2025-40006 USN-8033-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1052.55~22.04.1UBUNTU-CVE-2025-40006 USN-8095-1
72 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6kernel-default6.4.0-150600.23.84.1SUSE-SU-2026:0293-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.28.1SUSE-SU-2026:0315-1
SUSELinux Enterprise High Availability Extension 16.0kernel-default6.12.0-160000.8.1SUSE-SU-2026:20021-1
SUSELinux Enterprise Live Patching 12 SP5kernel-default4.12.14-122.290.1SUSE-SU-2026:0316-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_761-8.7.1SUSE-SU-2026:0316-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_191-150600.13.3.1SUSE-SU-2026:0293-1
SUSELinux Enterprise Live Patching 15 SP7kernel-livepatch-SLE15-SP7-RT_Update_81-150700.1.3.1SUSE-SU-2026:0278-1
SUSELinux Enterprise Live Patching 15 SP7kernel-livepatch-SLE15-SP7_Update_81-150700.15.3.1SUSE-SU-2026:0315-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-64kb, kernel-source, kernel-default and 1 more6.4.0-150700.53.28.1SUSE-SU-2026:0315-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-default-base6.4.0-150700.53.28.1.150700.17.19.1SUSE-SU-2026:0315-1
SUSELinux Enterprise Module for Development Tools 15 SP7kernel-docs, kernel-syms, kernel-source and 1 more6.4.0-150700.53.28.1SUSE-SU-2026:0315-1
SUSELinux Enterprise Module for Public Cloud 15 SP7kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150700.20.24.1SUSE-SU-2026:0281-1
16 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.84.1SUSE-SU-2026:0293-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.84.1.150600.12.38.1SUSE-SU-2026:0293-1
openSUSELeap 16.0kernel-default-base6.12.0-160000.8.1.160000.2.5openSUSE-SU-2025:20172-1
openSUSELeap 16.0kernel-rt, dtb-aarch64, kernel-64kb and 8 more6.12.0-160000.8.1openSUSE-SU-2025:20172-1
Alpaquita23linux-lts6.1.155-r0BELL-CVE-2025-40006
Alpaquita25linux-lts6.12.51-r0BELL-CVE-2025-40006
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-40006

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; 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 race between hugetlbfs hole-punch and page migration could let remove_inode_hugepages() observe an unmapped page without holding the page lock and proceed while the page gets re-mapped, triggering a kernel BUG (DoS). Triggering requires local access with permissions to create/modify hugetlbfs files and precise timing to win the race. There is no data leakage or privilege escalation.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelOut of support scope
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
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Fix deferred
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Fix deferred
Red Hat OpenShift Container Platform 5openshift/ose-rhel-coreos-10Fix deferred
Red Hat OpenShift Container Platform 5openshift/ose-rhel-coreos-9Fix 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-2025-40006.

References

Check your stackJSON