# CVE-2025-40149: tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 9% of CVEs (2026-11-30)
- Published: 2025-11-12T10:23:27.122Z
- Modified: 2026-11-10T13:17:55.067Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from e8f69799810c32dd40c6724d829eccc70baad07f before 2b1bef126bbb8d0da51491357559126d567c1dee; from e8f69799810c32dd40c6724d829eccc70baad07f before e37ca0092ddace60833790b4ad7a390408fb1be9; from e8f69799810c32dd40c6724d829eccc70baad07f before 13159c7125636371543a82cb7bbae00ab36730cc; from e8f69799810c32dd40c6724d829eccc70baad07f before f09cd209359a23f88d4f3fa3d2379d057027e53c; from e8f69799810c32dd40c6724d829eccc70baad07f before feb474ddbf26b51f462ae2e60a12013bdcfc5407; from e8f69799810c32dd40c6724d829eccc70baad07f before c65f27b9c3be2269918e1cbad6d8884741f835c5; 4.18 (not affected: before 4.18; from 5.15.199 up to 5.15.*; from 6.1.161 up to 6.1.*; from 6.6.121 up to 6.6.*; from 6.12.66 up to 6.12.*; from 6.17.3 up to 6.17.*; from 6.18 up to *)
- linux linux_kernel: from 4.18 before 5.15.199; from 5.16 before 6.1.161; from 6.2 before 6.6.121; from 6.7 before 6.12.66; from 6.13 before 6.17.3

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/2b1bef126bbb8d0da51491357559126d567c1dee> (patch)
- <https://git.kernel.org/stable/c/e37ca0092ddace60833790b4ad7a390408fb1be9> (patch)
- <https://git.kernel.org/stable/c/13159c7125636371543a82cb7bbae00ab36730cc> (patch)
- <https://git.kernel.org/stable/c/f09cd209359a23f88d4f3fa3d2379d057027e53c> (patch)
- <https://git.kernel.org/stable/c/feb474ddbf26b51f462ae2e60a12013bdcfc5407> (patch)
- <https://git.kernel.org/stable/c/c65f27b9c3be2269918e1cbad6d8884741f835c5> (patch)
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Sources

- CVE List: [CVE-2025-40149](https://www.cve.org/CVERecord?id=CVE-2025-40149), CVE Terms of Use, modified 2026-11-10
- NVD: [CVE-2025-40149](https://nvd.nist.gov/vuln/detail/CVE-2025-40149), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2025-40149 · Whole record: https://cve.day/CVE-2025-40149.json · Rebuilt by cve.day 2026-11-25T22:59:07.555Z
