# tls: Use \_\_sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().

CVE record · `CVE-2025-40149`

- **Identifiers:** `CVE-2025-40149`
- **State:** Confirmed
- **Severity:** CVSS 7.8 High
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 12 Nov 2025
- **Updated:** 10 Nov 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 12 Nov 2025, 10:23 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before 2b1bef126bbb8d0da51491357559126d567c1dee` (git)
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before e37ca0092ddace60833790b4ad7a390408fb1be9` (git)
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before 13159c7125636371543a82cb7bbae00ab36730cc` (git)
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before f09cd209359a23f88d4f3fa3d2379d057027e53c` (git)
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before feb474ddbf26b51f462ae2e60a12013bdcfc5407` (git)
  - affected: `e8f69799810c32dd40c6724d829eccc70baad07f to before c65f27b9c3be2269918e1cbad6d8884741f835c5` (git)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `4.18`
  - unaffected: `before 4.18` (semver)
  - unaffected: `5.15.199 to 5.15.*, inclusive` (semver)
  - unaffected: `6.1.161 to 6.1.*, inclusive` (semver)
  - unaffected: `6.6.121 to 6.6.*, inclusive` (semver)
  - unaffected: `6.12.66 to 6.12.*, inclusive` (semver)
  - unaffected: `6.17.3 to 6.17.*, inclusive` (semver)
  - unaffected: `6.18 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The Linux kernel's TLS code in get_netdev_for_sock(), affected from 4.18 until fixed, can cause a use-after-free when it reads a socket's destination device during setsockopt(). The source gives few details on attacker requirements. Upgrade to 5.15.199, 6.1.161, 6.6.121, 6.12.66 or a later release in your branch.

Written 19 Nov 2026.

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 7.8 High, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`, from CNA (Linux)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0017, the 6th percentile, on 19 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 12 Nov 2025, 10:23 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2025-40149)
- 12 Nov 2025, 11:15 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2025-40149)

## Sources

- [CVE List: CVE-2025-40149](https://www.cve.org/CVERecord?id=CVE-2025-40149)
- [NVD: CVE-2025-40149](https://nvd.nist.gov/vuln/detail/CVE-2025-40149)

### References from the CNA

- <https://git.kernel.org/stable/c/2b1bef126bbb8d0da51491357559126d567c1dee>
- <https://git.kernel.org/stable/c/e37ca0092ddace60833790b4ad7a390408fb1be9>
- <https://git.kernel.org/stable/c/13159c7125636371543a82cb7bbae00ab36730cc>
- <https://git.kernel.org/stable/c/f09cd209359a23f88d4f3fa3d2379d057027e53c>
- <https://git.kernel.org/stable/c/feb474ddbf26b51f462ae2e60a12013bdcfc5407>
- <https://git.kernel.org/stable/c/c65f27b9c3be2269918e1cbad6d8884741f835c5>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2025-40149>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2025-40149/>. Everything for agents: <https://agentprime.io/llms.txt>.
