Linux Kernel up to 6.17.8 proc_readdir_de use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.2 | $0-$5k | 0.00 |
Summary
A vulnerability, which was classified as critical, has been found in Linux Kernel up to 6.17.8. This impacts the function proc_readdir_de. Performing a manipulation results in use after free.
This vulnerability is cataloged as CVE-2025-40271. Furthermore, there is an exploit available.
It is advisable to upgrade the affected component.
Details
A vulnerability classified as critical has been found in Linux Kernel up to 6.17.8. This affects the function proc_readdir_de. The manipulation with an unknown input leads to a use after free vulnerability. CWE is classifying the issue as CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: fs/proc: fix uaf in proc_readdir_de() Pde is erased from subdir rbtree through rb_erase(), but not set the node to EMPTY, which may result in uaf access. We should use RB_CLEAR_NODE() set the erased node to EMPTY, then pde_subdir_next() will return NULL to avoid uaf access. We found an uaf issue while using stress-ng testing, need to run testcase getdent and tun in the same time. The steps of the issue is as follows: 1) use getdent to traverse dir /proc/pid/net/dev_snmp6/, and current pde is tun3; 2) in the [time windows] unregister netdevice tun3 and tun2, and erase them from rbtree. erase tun3 first, and then erase tun2. the pde(tun2) will be released to slab; 3) continue to getdent process, then pde_subdir_next() will return pde(tun2) which is released, it will case uaf access. CPU 0 | CPU 1 ------------------------------------------------------------------------- traverse dir /proc/pid/net/dev_snmp6/ | unregister_netdevice(tun->dev) //tun3 tun2 sys_getdents64() | iterate_dir() | proc_readdir() | proc_readdir_de() | snmp6_unregister_dev() pde_get(de); | proc_remove() read_unlock(&proc_subdir_lock); | remove_proc_subtree() | write_lock(&proc_subdir_lock); [time window] | rb_erase(&root->subdir_node, &parent->subdir); | write_unlock(&proc_subdir_lock); read_lock(&proc_subdir_lock); | next = pde_subdir_next(de); | pde_put(de); | de = next; //UAF | rbtree of dev_snmp6 | pde(tun3) / \ NULL pde(tun2)
The advisory is shared at git.kernel.org. This vulnerability is uniquely identified as CVE-2025-40271 since 04/16/2025. The exploitability is told to be easy. Technical details and a public exploit are known.
The exploit is shared for download at exploit-db.com. It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 278559 (Debian dla-4404 : ata-modules-5.10.0-35-armmp-di - security update), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 5.4.302, 5.10.247, 5.15.197, 6.1.159, 6.6.117, 6.12.59 or 6.17.9 eliminates this vulnerability. Applying the patch 1d1596d68a6f11d28f677eedf6cf5b17dbfeb491/c81d0385500446efe48c305bbb83d47f2ae23a50/4cba73c4c89219beef7685a47374bf88b1022369/6f2482745e510ae1dacc9b090194b9c5f918d774/67272c11f379d9aa5e0f6b16286b9d89b3f76046/623bb26127fb581a741e880e1e1a47d79aecb6f8/03de7ff197a3d0e17d0d5c58fdac99a63cba8110/895b4c0c79b092d732544011c3cecaf7322c36a1 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 Exploit-DB (52550), Tenable (278559), EUVD (EUVD-2025-201584) and CERT Bund (WID-SEC-2025-2756). If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Affected
- Google Container-Optimized OS
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- NetApp FAS
- NetApp AFF
- SUSE openSUSE
- RESF Rocky Linux
- Open Source Linux Kernel
- Microsoft Azure Linux
Product
Type
Vendor
Name
Version
- 5.4.301
- 5.10.246
- 5.15.196
- 6.1.158
- 6.6.116
- 6.12.0
- 6.12.1
- 6.12.2
- 6.12.3
- 6.12.4
- 6.12.5
- 6.12.6
- 6.12.7
- 6.12.8
- 6.12.9
- 6.12.10
- 6.12.11
- 6.12.12
- 6.12.13
- 6.12.14
- 6.12.15
- 6.12.16
- 6.12.17
- 6.12.18
- 6.12.19
- 6.12.20
- 6.12.21
- 6.12.22
- 6.12.23
- 6.12.24
- 6.12.25
- 6.12.26
- 6.12.27
- 6.12.28
- 6.12.29
- 6.12.30
- 6.12.31
- 6.12.32
- 6.12.33
- 6.12.34
- 6.12.35
- 6.12.36
- 6.12.37
- 6.12.38
- 6.12.39
- 6.12.40
- 6.12.41
- 6.12.42
- 6.12.43
- 6.12.44
- 6.12.45
- 6.12.46
- 6.12.47
- 6.12.48
- 6.12.49
- 6.12.50
- 6.12.51
- 6.12.52
- 6.12.53
- 6.12.54
- 6.12.55
- 6.12.56
- 6.12.57
- 6.12.58
- 6.17.0
- 6.17.1
- 6.17.2
- 6.17.3
- 6.17.4
- 6.17.5
- 6.17.6
- 6.17.7
- 6.17.8
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.0VulDB Meta Temp Score: 7.2
VulDB Base Score: 8.0
VulDB Temp Score: 7.2
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Partially
Availability: 🔒
Access: Public
Status: Proof-of-Concept
Download: 🔒
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 278559
Nessus Name: Debian dla-4404 : ata-modules-5.10.0-35-armmp-di - security update
Exploit-DB: 🔒
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 5.4.302/5.10.247/5.15.197/6.1.159/6.6.117/6.12.59/6.17.9
Patch: 1d1596d68a6f11d28f677eedf6cf5b17dbfeb491/c81d0385500446efe48c305bbb83d47f2ae23a50/4cba73c4c89219beef7685a47374bf88b1022369/6f2482745e510ae1dacc9b090194b9c5f918d774/67272c11f379d9aa5e0f6b16286b9d89b3f76046/623bb26127fb581a741e880e1e1a47d79aecb6f8/03de7ff197a3d0e17d0d5c58fdac99a63cba8110/895b4c0c79b092d732544011c3cecaf7322c36a1
Timeline
04/16/2025 CVE reserved12/07/2025 Advisory disclosed
12/07/2025 VulDB entry created
05/06/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2025-40271 (🔒)
GCVE (CVE): GCVE-0-2025-40271
GCVE (VulDB): GCVE-100-334629
EUVD: 🔒
CERT Bund: WID-SEC-2025-2756 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service
scip Labs: https://www.scip.ch/en/?labs.20161013
Entry
Created: 12/07/2025 08:53Updated: 05/06/2026 07:48
Changes: 12/07/2025 08:53 (58), 12/07/2025 09:27 (1), 12/09/2025 07:33 (7), 12/13/2025 08:43 (2), 01/04/2026 12:37 (1), 01/22/2026 07:09 (1), 02/23/2026 04:59 (1), 05/06/2026 07:48 (11)
Complete: 🔍
Cache ID: 216::103
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
No comments yet. Languages: en.
Please log in to comment.