PT-2025-49372 · Linux+4 · Linux Kernel+4

Published

2025-06-12

·

Updated

2026-05-07

·

CVE-2025-40271

CVSS v2.0

5.0

Medium

VectorAV:L/AC:H/Au:S/C:P/I:P/A:C
Name of the Vulnerable Software and Affected Versions Linux kernel versions 3.14 through 6.18-rc5
Description A use-after-free (UAF) issue exists in the proc readdir de() function within the Linux kernel. The problem occurs because rb erase() is used to remove a proc directory entry (pde) from the subdirectory red-black tree (rbtree) without subsequently calling RB CLEAR NODE() to set the node to empty. This leaves stale links in the rbtree.
A race condition can be triggered when concurrent getdents64() calls traverse directories such as /proc/pid/net/dev snmp6/ while network devices are being unregistered and erased from the rbtree. If a pde is released to the slab and then accessed via pde subdir next(), it results in a UAF access. This flaw may allow a local attacker to perform heap manipulation, bypass KASLR (Kernel Address Space Layout Randomization) by leaking kernel heap pointers through the d ino field, and potentially execute arbitrary code or cause a denial of service.
Recommendations Update to stable kernel versions 5.10.247, 6.1.159, 6.12.73, or 6.18-rc6.

Exploit

Fix

Use After Free

Weakness Enumeration

Related Identifiers

ALSA-2026:1661
ALSA-2026:1662
ALSA-2026:1690
ALSA-2026:2212
BDU:2026-05110
CVE-2025-40271
DLA-4404-1
ECHO-DF7E-1210-9693
MGASA-2026-0017
MGASA-2026-0018
OESA-2026-1306
OESA-2026-1341
OESA-2026-1759
OESA-2026-1760
OESA-2026-1761
OPENSUSE-SU-2026:20145-1
RHSA-2026:1661
RHSA-2026:1662
RHSA-2026:1690
RHSA-2026:2212
RHSA-2026:2759
RHSA-2026:2761
RHSA-2026:2766
RHSA-2026:3267
RHSA-2026:3268
RHSA-2026:3277
RHSA-2026:3293
RHSA-2026:3358
RHSA-2026:3360
RHSA-2026:3375
RHSA-2026:3388
RHSA-2026:3634
RHSA-2026:3685
SUSE-SU-2026:0278-1
SUSE-SU-2026:0281-1
SUSE-SU-2026:0315-1
SUSE-SU-2026:0473-1
SUSE-SU-2026:20207-1
SUSE-SU-2026:20220-1
SUSE-SU-2026:20228-1
SUSE-SU-2026:20477-1
SUSE-SU-2026:20498-1
SUSE-SU-2026:20845-1
SUSE-SU-2026:20876-1
USN-8029-1
USN-8029-2
USN-8029-3
USN-8030-1
USN-8048-1
USN-8095-1
USN-8095-2
USN-8095-3
USN-8095-4
USN-8095-5
USN-8096-1
USN-8096-2
USN-8096-3
USN-8096-4
USN-8096-5
USN-8100-1
USN-8116-1
USN-8125-1
USN-8126-1
USN-8141-1
USN-8163-1
USN-8163-2
USN-8165-1
USN-8243-1
USN-8261-1

Affected Products

Debian
Linuxmint
Linux Kernel
Rocky Linux
Ubuntu