Skip to main content

Linux Kernel CVE-2025-40006

HIGH
2025-10-20 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local user access
  2. Delivery
    Create hugetlbfs hugepage mapping
  3. Exploit
    Loop fallocate hole-punch during page migration
  4. Execution
    Win race so folio deleted while still mapped
  5. Persist
    Trigger BUG in filemap_unaccount_folio
  6. Impact
    Kernel panic / denial of service

Vulnerability Assessment

Exploitation Conditions

Requires local code execution on the host and the ability to use hugetlbfs - specifically creating a hugepage-backed mapping and invoking fallocate() hole-punch (FALLOC_FL_PUNCH_HOLE) on it - while concurrent folio migration converts the mapping's PTE to a migration entry. Limiting factors: hugepages must be configured/available (nr_hugepages > 0 or an accessible hugetlbfs mount, which is not universal), the attacker must run locally (AV:L, no remote path), and success is timing-dependent because the deletion path must interleave precisely with an in-progress migration - so this is a race, not a deterministic one-shot. Migration must actually occur (driven by compaction, NUMA balancing, CMA, or memory hotplug), meaning environments with hugepages but little migration pressure are harder to exploit.

Impact

The input CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, base 7.8) rates this High, but the signals are mixed. The observed manifestation is a kernel BUG()/bad-page-cache condition - a denial of service via crash - while the C:H/I:H claims rest on the theoretical memory-corruption potential of a folio remaining mapped after page-cache removal, which is not demonstrated in the report. AC:L in the input is questionable: winning a race between hole-punch fallocate and page migration is timing-dependent and non-trivial, which argues for AC:H. EPSS is low (0.24%, 15th percentile), there is no KEV listing and no known POC, all consistent with a hard-to-weaponize local race. Net: a legitimate reliability/stability defect worth patching in the normal stable-update cycle, not an emergency; realistic priority is elevated on multi-tenant hosts that expose hugetlbfs to untrusted local users, low elsewhere. Note the potential AC discrepancy (input says AC:L; race semantics suggest AC:H) - verify against the assessed vector below.

Exploit ScenarioDerived

A local user on a shared Linux host with hugetlbfs available maps a hugepage-backed file, then repeatedly issues fallocate hole-punch operations while inducing page migration (via memory compaction, NUMA balancing, or memory pressure). By winning the race so a folio is deleted while still mapped, the attacker trips the BUG in filemap_unaccount_folio, panicking or destabilizing the kernel. No public POC is known, and reliable exploitation for anything beyond a crash is not demonstrated.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 30, 2026

Local denial of service (and potential memory corruption) in the Linux kernel's hugetlbfs subsystem occurs because remove_inode_single_folio checks folio mapping state without holding the folio lock, racing with page migration; when a hugepage is migrated to a migration entry, folio_mapped() wrongly returns false, migration is then reverted, and the folio ends up mapped after deletion, tripping a BUG in filemap_unaccount_folio. Affected are kernels using hugetlbfs with hole-punch fallocate concurrent with migration (observed on 6.17-rc5 and backported to multiple stable branches). No public exploit identified at time of analysis; EPSS is low (0.24%, 15th percentile) and the issue is not in CISA KEV.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply the kernel update for your stable series that contains the fix (the commits at git.kernel.org/stable, e.g. https://git.kernel.org/stable/c/21ee79ce938127f88fe07e409c1817f477dbe7ea and the seven sibling commits, which move folio-lock acquisition before the folio_mapped() check). For distribution kernels, install the vendor-provided patched kernel (Ubuntu is explicitly tagged) once published and reboot. If patching must be deferred on a multi-tenant host, reduce exposure by restricting untrusted users' ability to create hugetlbfs mappings - for example unmount or do not expose a hugetlbfs mount, and gate MAP_HUGETLB usage via /proc/sys/vm/nr_hugepages set to 0 or via the hugetlb cgroup / group ownership of the mount so only trusted service accounts can allocate hugepages; the trade-off is that legitimate hugepage-dependent workloads (databases, DPDK, large-page VMs) will lose functionality. Reducing conditions that trigger migration (e.g., disabling automatic NUMA balancing via kernel.numa_balancing=0) narrows the race window but does not close it and can degrade NUMA performance.

Affected ProductsAI

The Linux kernel hugetlbfs/mm-hugetlb subsystem is affected; the crash was reproduced on 6.17.0-rc5 (commit 7aac71907bde) and the fix was propagated across multiple stable branches, as evidenced by the eight git.kernel.org/stable commits in the references (e.g., 21ee79ce9381, 3e851448078f, 7b7387650dcf, 910d7749346c, 91f548e920fb, bc1c9ce8aeff, c1dc0524ab2c, c9c2a51f91ae). No CPE strings were provided in the input, so exact version ranges per stable series are not enumerable from this data; the tags indicate Linux/Ubuntu distributions are in scope. Consult the per-branch commits above and your distribution's kernel advisory for the precise fixed version in each series.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in mm/hugetlb (hugetlbfs page-cache management). When hugetlbfs_fallocate() punches a hole, remove_inode_hugepages() calls remove_inode_single_folio() to remove and, if necessary, unmap each folio. The bug is a locking/ordering error: the mapped-state check (folio_mapped()) runs before the folio lock is acquired, so it races with folio migration. During migration a present PTE is temporarily converted to a swap-like migration entry, making folio_mapped() report the folio as unmapped; the extra refcount held by the removal path then causes migration to fail and restore the normal PTE, leaving the folio mapped after it has been removed from the page cache. This is a classic time-of-check/time-of-use race (CWE-362, Concurrent Execution using Shared Resource with Improper Synchronization) even though the input lists CWE as N/A. The fix moves folio lock acquisition ahead of the folio_mapped() check to serialize against migration.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Local hugetlbfs access needed (AV:L/PR:L); winning the migration-vs-deletion race is timing-dependent (AC:H); demonstrated crash plus potential use-after-free justify high C/I/A.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 4.7 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat 4.7 MEDIUM

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A local denial of service vulnerability in the Linux kernel's hugetlbfs subsystem (CVE-2025-40006) allows local attackers to crash systems via memory management race conditions, affecting availability of servers relying on hugepage allocation. Organizations running Linux with hugetlbfs enabled face potential interruption if attackers gain local access to trigger concurrent fallocate and migration operations.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: disable hugetlbfs on systems not requiring large-page support; restrict local user access via privilege escalation controls and container isolation; monitor system logs for BUG messages in filemap_unaccount_folio as early-warning indicators of exploitation attempts; deploy in-place kernel patches via livepatch technology once fixes are backported to your distribution's stable kernel branches.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Ubiquitous
Linux kernel underpins nearly all server, cloud, and container hosts
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/sl-micro/6.0/baremetal-os-container:latest Container suse/sl-micro/6.1/baremetal-os-container:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.95 Container suse/sl-micro/6.1/base-os-container:2.2.1-5.80 Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.115 Container suse/sl-micro/6.1/kvm-os-container:2.2.1-5.83 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.146 Container suse/sl-micro/6.1/rt-os-container:2.2.1-5.91 Affected
Image SL-Micro-Azure Image SL-Micro-BYOS-Azure Image SL-Micro-BYOS-EC2 Image SL-Micro-BYOS-GCE Image SL-Micro-EC2 Image SLE-Micro Image SLE-Micro-Azure Image SLE-Micro-BYOS Image SLE-Micro-BYOS-Azure Image SLE-Micro-BYOS-EC2 Image SLE-Micro-BYOS-GCE Image SLE-Micro-EC2 Image SLE-Micro-GCE Image SUSE-Multi-Linux-Manager-Proxy-BYOS-Azure Image SUSE-Multi-Linux-Manager-Proxy-BYOS-EC2 Image SUSE-Multi-Linux-Manager-Proxy-BYOS-GCE Image SUSE-Multi-Linux-Manager-Server-Azure-llc Image SUSE-Multi-Linux-Manager-Server-Azure-ltd Image SUSE-Multi-Linux-Manager-Server-BYOS-Azure Image SUSE-Multi-Linux-Manager-Server-BYOS-EC2 Image SUSE-Multi-Linux-Manager-Server-BYOS-GCE Image SUSE-Multi-Linux-Manager-Server-EC2-llc Image SUSE-Multi-Linux-Manager-Server-EC2-ltd Affected

References

Advisories & patches
ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:0278/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:0281/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:0293/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:0315/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:0316/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20012/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20015/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20021/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20477/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20479/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20498/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20520/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20562/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20772/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20794/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20819/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20845/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20872/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20876/ REF https://git.kernel.org/stable/c/21ee79ce938127f88fe07e409c1817f477dbe7ea REF https://git.kernel.org/stable/c/3e851448078f5b01f6264915df3cfef75e323a12 REF https://git.kernel.org/stable/c/7b7387650dcf2881fd8bb55bcf3c8bd6c9542dd7 REF https://git.kernel.org/stable/c/910d7749346c4b0acdc6e4adfdc4a9984281a206 REF https://git.kernel.org/stable/c/91f548e920fbf8be3f285bfa3fa045ae017e836d REF https://git.kernel.org/stable/c/bc1c9ce8aeff45318332035dbef9713fb9e982d7 REF https://git.kernel.org/stable/c/c1dc0524ab2cc3982d4e0d2bfac71a0cd4d65c39 REF https://git.kernel.org/stable/c/c9c2a51f91aea70e89b496cac360cd795a2b3c26

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy