Kernel memory corruption via stale procfs node
Published Dec 6, 2025 · Updated Aug 5, 2026
Use-after-free in Linux procfs allows local users to access freed kernel memory by racing directory reads with network-device removal. proc_readdir_de() follows an erased red-black-tree node because rb_erase() leaves it nonempty, so pde_subdir_next() returns a freed proc entry. The race requires concurrent getdents traversal of /proc/pid/net/dev_snmp6 and removal of multiple tun devices, enabling kernel memory corruption or a crash.
Summary
What happened
Use-after-free in Linux procfs allows local users to access freed kernel memory by racing directory reads with network-device removal. proc_readdir_de() follows an erased red-black-tree node because rb_erase() leaves it nonempty, so pde_subdir_next() returns a freed proc entry. The race requires concurrent getdents traversal of /proc/pid/net/dev_snmp6 and removal of multiple tun devices, enabling kernel memory corruption or a crash.
The record
- CVE
- CVE-2025-40271
- Published
- Dec 6, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-625, CWE-825, T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Dec 6, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=3.19
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <03de7ff197a3d0e17d0d5c58fdac99a63cba8110
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <1d1596d68a6f11d28f677eedf6cf5b17dbfeb491
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <4cba73c4c89219beef7685a47374bf88b1022369
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <623bb26127fb581a741e880e1e1a47d79aecb6f8
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <67272c11f379d9aa5e0f6b16286b9d89b3f76046
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <6f2482745e510ae1dacc9b090194b9c5f918d774
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <895b4c0c79b092d732544011c3cecaf7322c36a1
- Affected versionversion=710585d4922fd315f2cada8fbe550ae8ed23e994 <c81d0385500446efe48c305bbb83d47f2ae23a50
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Linux Kernel N-Day CVE-2025-40271 exploitproof of concept · demonstrated
- kaleth4 CVE-2025-40271 exploitproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo