Look up another CVE · open CVE-2025-40170 in the interactive tracker
CVE-2025-40170
net: use dst_dev_rcu() in sk_setup_caps()
Published 2025-11-12 (11 months ago) by the Linux kernel CNA. Subsystem include/net. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-40170 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixedDSA-6126-1 · 2026-02-09 · text | 6.12.69-1 | Update the kernel and reboot. DSA-6126-1 shipped the fix on 2026-02-09, in 6.12.69-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.17.6-1 | Update the kernel and reboot. Fixed in 6.17.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.17.6-1 | Update the kernel and reboot. Fixed in 6.17.6-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Use RCU to protect accesses to dst->dev from sk_setup_caps() and sk_dst_gso_max_size(). Also use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(), and ip_dst_mtu_maybe_forward(). ip4_dst_hoplimit() can use dst_dev_net_rcu().
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
include/net/ip.h
include/net/ip6_route.h
include/net/route.h
net/core/sock.c
- What this is
- NETWORKING [IPv4/IPv6]MAINTAINERS section matched on include/net/ip* · netdev@vger.kernel.org · Maintained
Show whether Debian builds this, per release
Debian builds this code. Every release below compiles the affected file into the kernels it ships.
- bookworm, trixie, forky, sidy
- y
- built into the kernel image on every flavour - only a patch removes it
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS Debian linux-config packages
Signals
- Published
- 2025-11-12 (11 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.16%, higher than 4.5% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- include/net
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.13 | 6.12.64 | 5d1be493d111 |
| 4.13 | 6.17.3 | a805729c0091 |
| 4.13 | 6.18 | 99a2ace61b21 |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DSA-6126-1 | 2026-02-09 | trixie 6.12.69-1 | tracker |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The unprotected `sk_setup_caps()` reader is reached from process-context syscalls (connect/sendmsg/SCTP output), and the racing `dst_dev_put()`/netdev-unregister side requires local netns and link/route manipulation; the remote-triggered call site (`tcp_v4_syn_recv_sock`) runs BH-disabled and is implicitly RCU-protected.
- AC:LAttack complexity, low
- The attacker controls both sides of the race — one thread loops connect()/sendmsg() on sockets holding the dst while another deletes the veth/route in its own netns — and can retry indefinitely until the window is hit.
- PR:LPrivileges required, low
- An unprivileged local account suffices; CAP_NET_ADMIN needed for link/route teardown is obtainable without real root via user namespaces (`unshare -Urn`), and the socket side needs no privilege at all.
- UI:NUser interaction, none
- Exploitation is entirely driven by the attacker's own threads issuing socket syscalls and netlink link/route operations; no victim action is required.
- S:UScope, unchanged
- The use-after-free is on a kernel `struct net_device` and its effects stay within the kernel's own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.
- C:HConfidentiality impact, high
- This is a use-after-free read of a freed, heap-sprayable `net_device`; its contents are loaded into `sk_route_caps`, `sk_gso_max_size` and `sk_gso_max_segs`, which observably alter TCP segmentation and thus leak freed-memory contents, and per UAF guidance this is High.
- I:HIntegrity impact, high
- Values read from freed memory are written into persistent socket state and then drive packet construction — bogus SG/HW_CSUM/GSO feature bits and an underflowed multi-gigabyte `sk_gso_max_size` corrupt the TX path, and a UAF on a sprayable object is treatable as an arbitrary-write primitive.
- A:HAvailability impact, high
- Dereferencing a freed `net_device` can oops outright, and the resulting garbage GSO sizes/segment counts produce oversized skb allocations and inconsistent offload state that crash the transmit path and drivers.