Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-40006— mm/hugetlb: fix folio is still mapped when deleted

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于迁移操作与fallocating hole竞争时可能导致folio仍被映射而未正确解除映射,可能触发文件映射计数错误。

CVSS 7.8 · High EPSS 0.20% · P10

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 18

VendorProduct Version RangeStatus
Linux Linux 4aae8d1c051ea00b456da6811bc36d1f69de5445< bc1c9ce8aeff45318332035dbef9713fb9e982d7 affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< 91f548e920fbf8be3f285bfa3fa045ae017e836d affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< 3e851448078f5b01f6264915df3cfef75e323a12 affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< c1dc0524ab2cc3982d4e0d2bfac71a0cd4d65c39 affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< c9c2a51f91aea70e89b496cac360cd795a2b3c26 affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< 910d7749346c4b0acdc6e4adfdc4a9984281a206 affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< 21ee79ce938127f88fe07e409c1817f477dbe7ea affected
4aae8d1c051ea00b456da6811bc36d1f69de5445< 7b7387650dcf2881fd8bb55bcf3c8bd6c9542dd7 affected
… +10 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-40006

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
mm/hugetlb: fix folio is still mapped when deleted
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于迁移操作与fallocating hole竞争时可能导致folio仍被映射而未正确解除映射,可能触发文件映射计数错误。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 4aae8d1c051ea00b456da6811bc36d1f69de5445 ~ bc1c9ce8aeff45318332035dbef9713fb9e982d7 -
Linux Linux 4.5 -

II. Public POCs for CVE-2025-40006

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-40006

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-10-20 · 13 CVEs total

CVE-2025-40012 7.8 HIGH net/smc: fix warning in smc_rx_splice() when calling get_page()
CVE-2025-40017 media: iris: Fix memory leak by freeing untracked persist buffer
CVE-2025-40015 media: stm32-csi: Fix dereference before NULL check
CVE-2025-40016 media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID
CVE-2025-40013 ASoC: qcom: audioreach: fix potential null pointer dereference
CVE-2025-40011 drm/gma500: Fix null dereference in hdmi teardown
CVE-2025-40010 afs: Fix potential null pointer dereference in afs_put_server
CVE-2025-40009 fs/proc/task_mmu: check p->vec_buf for NULL
CVE-2025-40008 kmsan: fix out-of-bounds access to shadow memory
CVE-2025-40007 netfs: fix reference leak
CVE-2025-40005 spi: cadence-quadspi: Implement refcount to handle unbind during busy
CVE-2025-40004 net/9p: Fix buffer overflow in USB transport layer

IV. Related Vulnerabilities

V. Comments for CVE-2025-40006

No comments yet


Leave a comment