Linux Kernel up to 6.16.9 hugetlb folio_mapped reference count

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.6$0-$5k0.00

Summaryinfo

A vulnerability has been found in Linux Kernel up to 6.16.9 and classified as critical. Impacted is the function folio_mapped of the component hugetlb. This manipulation causes reference count. The identification of this vulnerability is CVE-2025-40006. There is no exploit available. The affected component should be upgraded.

Detailsinfo

A vulnerability classified as critical was found in Linux Kernel up to 6.16.9. Affected by this vulnerability is the function folio_mapped of the component hugetlb. The manipulation with an unknown input leads to a reference count vulnerability. The CWE definition for the vulnerability is CWE-911. The product uses a reference count to manage a resource, but it does not update or incorrectly updates the reference count. As an impact it is known to affect availability. The summary by CVE is:

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

It is possible to read the advisory at git.kernel.org. This vulnerability is known as CVE-2025-40006 since 04/16/2025. The exploitation appears to be difficult. Technical details of the vulnerability are known, but there is no available exploit.

The vulnerability scanner Nessus provides a plugin with the ID 271668 (Linux Distros Unpatched Vulnerability : CVE-2025-40006), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 5.4.300, 5.10.245, 5.15.194, 6.1.155, 6.6.109, 6.12.50 or 6.16.10 eliminates this vulnerability. Applying the patch bc1c9ce8aeff45318332035dbef9713fb9e982d7/91f548e920fbf8be3f285bfa3fa045ae017e836d/3e851448078f5b01f6264915df3cfef75e323a12/c1dc0524ab2cc3982d4e0d2bfac71a0cd4d65c39/c9c2a51f91aea70e89b496cac360cd795a2b3c26/910d7749346c4b0acdc6e4adfdc4a9984281a206/21ee79ce938127f88fe07e409c1817f477dbe7ea/7b7387650dcf2881fd8bb55bcf3c8bd6c9542dd7 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at Tenable (271668) and CERT Bund (WID-SEC-2025-2350). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Affected

  • Debian Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • SUSE openSUSE
  • Open Source Linux Kernel

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.8
VulDB Meta Temp Score: 4.6

VulDB Base Score: 4.8
VulDB Temp Score: 4.6
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Reference count
CWE: CWE-911 / CWE-664
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 271668
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-40006

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 5.4.300/5.10.245/5.15.194/6.1.155/6.6.109/6.12.50/6.16.10
Patch: bc1c9ce8aeff45318332035dbef9713fb9e982d7/91f548e920fbf8be3f285bfa3fa045ae017e836d/3e851448078f5b01f6264915df3cfef75e323a12/c1dc0524ab2cc3982d4e0d2bfac71a0cd4d65c39/c9c2a51f91aea70e89b496cac360cd795a2b3c26/910d7749346c4b0acdc6e4adfdc4a9984281a206/21ee79ce938127f88fe07e409c1817f477dbe7ea/7b7387650dcf2881fd8bb55bcf3c8bd6c9542dd7

Timelineinfo

04/16/2025 CVE reserved
10/20/2025 +187 days Advisory disclosed
10/20/2025 +0 days VulDB entry created
02/12/2026 +115 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-40006 (🔒)
GCVE (CVE): GCVE-0-2025-40006
GCVE (VulDB): GCVE-100-329059
CERT Bund: WID-SEC-2025-2350 - Linux Kernel: Mehrere Schwachstellen

Entryinfo

Created: 10/20/2025 22:19
Updated: 02/12/2026 16:56
Changes: 10/20/2025 22:19 (59), 10/27/2025 20:59 (2), 02/12/2026 16:56 (7)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!