High severity · published Nov 12, 2025
CVE-2025-40149
tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
7.8
CVSS
0.2%
EPSS
No
On KEV
Description
In the Linux kernel, the following vulnerability has been resolved:
tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
get_netdev_for_sock() is called during setsockopt(),
so not under RCU.
Using sk_dst_get(sk)->dev could trigger UAF.
Let's use __sk_dst_get() and dst_dev_rcu().
Note that the only ->ndo_sk_get_lower_dev() user is
bond_sk_get_lower_dev(), which uses RCU.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 7% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Kernel · Linux
4.18 before 5.15.199; 5.16 before 6.1.161; 6.2 before 6.6.121; 6.7 before 6.12.66; 6.13 before 6.17.3 · source: NVD
LI
Linux · Linux
e8f69799810c32dd40c6724d829eccc70baad07f before 2b1bef126bbb8d0da51491357559126d567c1dee; e8f69799810c32dd40c6724d829eccc70baad07f before e37ca0092ddace60833790b4ad7a390408fb1be9; e8f69799810c32dd40c6724d829eccc70baad07f before 13159c7125636371543a82cb7bbae00ab36730cc; e8f69799810c32dd40c6724d829eccc70baad07f before f09cd209359a23f88d4f3fa3d2379d057027e53c; e8f69799810c32dd40c6724d829eccc70baad07f before feb474ddbf26b51f462ae2e60a12013bdcfc5407; e8f69799810c32dd40c6724d829eccc70baad07f before c65f27b9c3be2269918e1cbad6d8884741f835c5; +1 more · source: vendor
SS
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7; V3.1.6; V3.1.7 · source: CISA
SS
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7; V3.1.6; V3.1.7 · source: CISA
SS
SIPLUS S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-40149
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-40149
Patch
https://git.kernel.org/stable/c/13159c7125636371543a82cb7bbae00ab36730cc
Patch
https://git.kernel.org/stable/c/2b1bef126bbb8d0da51491357559126d567c1dee
Patch
https://git.kernel.org/stable/c/c65f27b9c3be2269918e1cbad6d8884741f835c5
Patch
https://git.kernel.org/stable/c/e37ca0092ddace60833790b4ad7a390408fb1be9
Patch
https://git.kernel.org/stable/c/f09cd209359a23f88d4f3fa3d2379d057027e53c
Patch
https://git.kernel.org/stable/c/feb474ddbf26b51f462ae2e60a12013bdcfc5407
More from Kernel
9.8
CVE-2025-39682
tls: fix handling of zero-length records on the rx_list
8.8
CVE-2026-53266
netfilter: bridge: make ebt_snat ARP rewrite writable
8.8
CVE-2013-6282
Linux Kernel Improper Input Validation Vulnerability
8.4
CVE-2022-0185
Linux Kernel Heap-Based Buffer Overflow Vulnerability
8.4
CVE-2013-2094
Linux Kernel Privilege Escalation Vulnerability
