fs/proc: fix uaf in proc_readdir_de()
Published Dec 6, 2025
7.8
HIGHCVSS 3.1
EPSS 0.46%
Description
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)
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 3.19StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<3.19
- Version 5.10.247StatusunaffectedConstraints<=5.10.*
- Version 5.15.197StatusunaffectedConstraints<=5.15.*
- Version 5.4.302StatusunaffectedConstraints<=5.4.*
- Version 6.1.159StatusunaffectedConstraints<=6.1.*
- Version 6.12.59StatusunaffectedConstraints<=6.12.*
- Version 6.17.9StatusunaffectedConstraints<=6.17.*
- Version 6.18StatusunaffectedConstraints<=*
- Version 6.6.117StatusunaffectedConstraints<=6.6.*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux | unaffected |
| |||||||||||||||||||||||||||||||||
| Linux | Linux | affected |
|
No data.
No data.
Red Hat Enterprise Linux 10
kernel-0:6.12.0-124.31.1.el10_1
Fixed · RHSA-2026:1690
Red Hat Enterprise Linux 10.0 Extended Update Support
kernel-0:6.12.0-55.60.1.el10_0
Fixed · RHSA-2026:2761
Red Hat Enterprise Linux 7 Extended Lifecycle Support
kernel-0:3.10.0-1160.147.1.el7
Fixed · RHSA-2026:3685
Red Hat Enterprise Linux 7 Extended Lifecycle Support
kernel-rt-0:3.10.0-1160.147.1.rt56.1299.el7
Fixed · RHSA-2026:3634
Red Hat Enterprise Linux 8
kernel-0:4.18.0-553.100.1.el8_10
Fixed · RHSA-2026:1662
Red Hat Enterprise Linux 8
kernel-rt-0:4.18.0-553.100.1.rt7.441.el8_10
Fixed · RHSA-2026:1661
Red Hat Enterprise Linux 8.2 Advanced Update Support
kernel-0:4.18.0-193.187.1.el8_2
Fixed · RHSA-2026:3388
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
kernel-0:4.18.0-305.186.1.el8_4
Fixed · RHSA-2026:3360
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On
kernel-0:4.18.0-305.186.1.el8_4
Fixed · RHSA-2026:3360
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
kernel-0:4.18.0-372.181.1.el8_6
Fixed · RHSA-2026:3268
Red Hat Enterprise Linux 8.6 Telecommunications Update Service
kernel-0:4.18.0-372.181.1.el8_6
Fixed · RHSA-2026:3268
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
kernel-0:4.18.0-372.181.1.el8_6
Fixed · RHSA-2026:3268
Red Hat Enterprise Linux 8.8 Telecommunications Update Service
kernel-0:4.18.0-477.130.1.el8_8
Fixed · RHSA-2026:3277
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
kernel-0:4.18.0-477.130.1.el8_8
Fixed · RHSA-2026:3277
Red Hat Enterprise Linux 9
kernel-0:5.14.0-611.30.1.el9_7
Fixed · RHSA-2026:2212
Red Hat Enterprise Linux 9
kernel-0:5.14.0-611.30.1.el9_7
Fixed · RHSA-2026:2212
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
kernel-0:5.14.0-70.167.1.el9_0
Fixed · RHSA-2026:3293
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
kernel-rt-0:5.14.0-70.167.1.rt21.239.el9_0
Fixed · RHSA-2026:3375
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions
kernel-0:5.14.0-284.158.1.el9_2
Fixed · RHSA-2026:3267
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions
kernel-rt-0:5.14.0-284.158.1.rt14.443.el9_2
Fixed · RHSA-2026:3358
Red Hat Enterprise Linux 9.4 Extended Update Support
kernel-0:5.14.0-427.111.1.el9_4
Fixed · RHSA-2026:2766
Red Hat Enterprise Linux 9.6 Extended Update Support
kernel-0:5.14.0-570.89.1.el9_6
Fixed · RHSA-2026:2759
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel-0:6.12.0-124.31.1.el10_1 | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux 10.0 Extended Update Support | kernel-0:6.12.0-55.60.1.el10_0 | Fixed | RHSA-2026:2761 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | kernel-0:3.10.0-1160.147.1.el7 | Fixed | RHSA-2026:3685 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | kernel-rt-0:3.10.0-1160.147.1.rt56.1299.el7 | Fixed | RHSA-2026:3634 |
| Red Hat Enterprise Linux 8 | kernel-0:4.18.0-553.100.1.el8_10 | Fixed | RHSA-2026:1662 |
| Red Hat Enterprise Linux 8 | kernel-rt-0:4.18.0-553.100.1.rt7.441.el8_10 | Fixed | RHSA-2026:1661 |
| Red Hat Enterprise Linux 8.2 Advanced Update Support | kernel-0:4.18.0-193.187.1.el8_2 | Fixed | RHSA-2026:3388 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | kernel-0:4.18.0-305.186.1.el8_4 | Fixed | RHSA-2026:3360 |
| Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | kernel-0:4.18.0-305.186.1.el8_4 | Fixed | RHSA-2026:3360 |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | kernel-0:4.18.0-372.181.1.el8_6 | Fixed | RHSA-2026:3268 |
| Red Hat Enterprise Linux 8.6 Telecommunications Update Service | kernel-0:4.18.0-372.181.1.el8_6 | Fixed | RHSA-2026:3268 |
| Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions | kernel-0:4.18.0-372.181.1.el8_6 | Fixed | RHSA-2026:3268 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | kernel-0:4.18.0-477.130.1.el8_8 | Fixed | RHSA-2026:3277 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | kernel-0:4.18.0-477.130.1.el8_8 | Fixed | RHSA-2026:3277 |
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-611.30.1.el9_7 | Fixed | RHSA-2026:2212 |
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-611.30.1.el9_7 | Fixed | RHSA-2026:2212 |
| Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | kernel-0:5.14.0-70.167.1.el9_0 | Fixed | RHSA-2026:3293 |
| Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | kernel-rt-0:5.14.0-70.167.1.rt21.239.el9_0 | Fixed | RHSA-2026:3375 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | kernel-0:5.14.0-284.158.1.el9_2 | Fixed | RHSA-2026:3267 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | kernel-rt-0:5.14.0-284.158.1.rt14.443.el9_2 | Fixed | RHSA-2026:3358 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | kernel-0:5.14.0-427.111.1.el9_4 | Fixed | RHSA-2026:2766 |
| Red Hat Enterprise Linux 9.6 Extended Update Support | kernel-0:5.14.0-570.89.1.el9_6 | Fixed | RHSA-2026:2759 |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
The vulnerability is a race condition in /proc directory enumeration, where a proc_dir_entry can be freed after rb_erase() but still referenced because the rbtree node is not cleared. A local unprivileged attacker can trigger a use-after-free by running getdents() (that calls proc_readdir_de()) in parallel with rapid creation and removal of network-related proc entries (e.g., tun devices). In practice this leads to a kernel NULL-pointer dereference or slab-UAF crash. Reliable exploitation beyond denial-of-service is unlikely due to the narrow timing window, but theoretically possible. The bug could be triggered by the local attacker with the ability to create and remove network devices (e.g. CAP_NET_ADMIN).
Red Hat mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
1 other source (Red Hat) ▾
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
NoneAutomatable
NoTechnical Impact
PartialDecision
n/aAssessed Jun 16, 2026 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 3, 2026.
Score over time
2025–2026- EPSS v4
- EPSS v5
Percentile over time
- EPSS v4
- EPSS v5
Table of values (4 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 3, 2026 | 0.46% (0.00455) | 37.32th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.54% (0.00544) | 41.12th | v5 (v2026.06.15) |
| May 5, 2026 | 4.04% (0.04037) | 88.54th | v4 (v2025.03.14) |
| Dec 7, 2025 | 0.02% (0.00024) | 5.73th | v4 (v2025.03.14) |
References (14)
- https://access.redhat.com/security/cve/CVE-2025-40271 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2419837 Issue Tracking
- https://cert-portal.siemens.com/productcert/html/ssa-253495.html
- https://git.kernel.org/stable/c/03de7ff197a3d0e17d0d5c58fdac99a63cba8110
- https://git.kernel.org/stable/c/1d1596d68a6f11d28f677eedf6cf5b17dbfeb491
- https://git.kernel.org/stable/c/4cba73c4c89219beef7685a47374bf88b1022369
- https://git.kernel.org/stable/c/623bb26127fb581a741e880e1e1a47d79aecb6f8
- https://git.kernel.org/stable/c/67272c11f379d9aa5e0f6b16286b9d89b3f76046
- https://git.kernel.org/stable/c/6f2482745e510ae1dacc9b090194b9c5f918d774
- https://git.kernel.org/stable/c/895b4c0c79b092d732544011c3cecaf7322c36a1
- https://git.kernel.org/stable/c/c81d0385500446efe48c305bbb83d47f2ae23a50
- https://lore.kernel.org/linux-cve-announce/2025120716-CVE-2025-40271-7612@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2025-40271
- https://www.cve.org/CVERecord?id=CVE-2025-40271
Change history (0)
No recorded changes yet.