CVE-2025-40149: tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
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.
Security readout for executives and security teams
Plain-English summary
A flaw in affected Linux kernels could let a low-privileged local user trigger unsafe access to freed memory while configuring kernel TLS sockets. A successful attack could compromise confidentiality, integrity, and availability. The supplied CVSS score is 7.8 (high), but the sources provide no evidence of active exploitation.
Executive priority
Treat this as a high-priority kernel maintenance issue, especially on shared systems or hosts with untrusted local users. It is less urgent than an unauthenticated remote flaw, and the supplied evidence does not show active exploitation. Use normal expedited change controls and verify the corrected kernel is running.
Technical view
get_netdev_for_sock() may access sk_dst_get(sk)->dev during setsockopt() without the required RCU protection, creating a use-after-free condition. Linux corrected the lifetime handling by using __sk_dst_get() and dst_dev_rcu(). The bonding lower-device callback already operates with RCU.
Likely exposure
Exposure is limited to systems running an affected Linux kernel where a low-privileged local user can reach the relevant kernel TLS socket configuration path. The supplied version data identifies affected releases but contains ambiguous entries, including โ0โ; confirm applicability through distribution or appliance-vendor advisories and backport records.
Exploitation context
The CVSS vector indicates local access, low complexity, low privileges, and no user interaction. Potential impact spans confidentiality, integrity, and availability. The CVE is not listed as KEV in the supplied bundle, and no supplied source establishes public or active exploitation.
Researcher notes
The key issue is device-pointer lifetime handling outside an RCU read-side section during setsockopt(). The stable commits replace the unsafe access pattern across supported branches. Exact vulnerable boundaries and downstream backports cannot be established confidently from the supplied version list alone; validate against vendor package metadata.
Mitigation direction
Update to a vendor-supported kernel containing the referenced Linux stable fix.
Check distribution and appliance advisories for backported fixes and precise affected-version boundaries.
Restrict untrusted local account access while remediation is pending.
Review the Siemens advisory if affected Siemens products are deployed.
Validation and detection
Record the running kernel version and distribution package release on each Linux system.
Verify the installed package includes the applicable upstream fix or vendor backport.
Confirm systems rebooted into the remediated kernel after installation.
Prioritize hosts permitting untrusted or broadly accessible local accounts.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve ยท low confidence lookup
CVE-2025-40149 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
8Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.