Look up another CVE · open CVE-2025-40158 in the interactive tracker
CVE-2025-40158
ipv6: use RCU in ip6_output()
Published 2025-11-12 (11 months ago) by the Linux kernel CNA. Subsystem net/ipv6. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-40158 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-6568-1 · 2026-10-16 · text | 6.12.113-1 | Update the kernel and reboot. DSA-6568-1 shipped the fix on 2026-10-16, in 6.12.113-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 in ip6_output() in order to use dst_dev_rcu() to prevent possible UAF. We can remove rcu_read_lock()/rcu_read_unlock() pairs from ip6_finish_output2().
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.
net/ipv6/ip6_output.c
- What this is
- NETWORKING [IPv4/IPv6]MAINTAINERS section matched on net/ipv6/ip* · netdev@vger.kernel.org · Maintained
Check it on the machine
grep -w CONFIG_IPV6 /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
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
- Build switch
- CONFIG_IPV6
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 kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-11-12 (11 months ago)source
- CVSS
- 8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- network (AV:N)source
- EPSS
- 0.52%, higher than 43.1% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- net/ipv6
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.113 | 92803b826e40 |
| 4.13 | 6.17.3 | 0393f85c3241 |
| 4.13 | 6.18 | 11709573cc4e |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DSA-6568-1 | 2026-10-16 | trixie 6.12.113-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:NAttack vector, network
- `ip6_output()` is the IPv6 egress path for *forwarded* packets — `ip6_forward()` → `ip6_forward_finish()` → `dst_output()` → `ip6_output()` — so a remote, unauthenticated attacker's IPv6 traffic drives the vulnerable function on any Linux router, gateway, or container/cloud host, matching sibling CVE-2025-40168 in the same dst_dev_rcu series.
- AC:HAttack complexity, high
- The remote attacker supplies the traffic side of the race freely, but the `dst_dev_put()` side (netdev unregister/link down, veth deletion, route-exception teardown) is an operational event they cannot influence from the network, and the freed `inet6_dev`/`net_device` must be reallocated with useful content to escalate beyond a crash.
- PR:NPrivileges required, none
- Packets on the forwarding path reach `ip6_output()` with no credentials, no socket, and no local account on the target — the router transmits them automatically. (Even in the purely local framing the netns/CAP_NET_ADMIN half is obtainable via `unshare -Urn`, so no real privilege is required either way.)
- UI:NUser interaction, none
- Transmission and forwarding happen unconditionally in softirq/process context on packet arrival; no administrator or local user has to open, mount, or click anything.
- S:UScope, unchanged
- The freed `inet6_dev` and `net_device` are kernel objects and the corruption stays within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- This is a use-after-free read of `idev->cnf.disable_ipv6`, `idev->stats.ipv6`, `dev->hard_header_len`/`needed_headroom`, `dev->header_ops` and `dev->flags`; once the freed slab object is reallocated the attacker can steer header-expansion sizes and the egress device, yielding kernel memory disclosure and out-of-device packet leakage.
- I:HIntegrity impact, high
- `IP6_INC_STATS`/`IP6_UPD_PO_STATS` expand to `SNMP_INC_STATS64(idev->stats.ipv6, field)`, performing a 64-bit increment through a per-CPU pointer loaded from freed memory — an arbitrary-write primitive after reallocation — and `neigh_output()` → `dev_queue_xmit()` makes an indirect call through `dev->netdev_ops->ndo_start_xmit` read from the freed `net_device`, giving control-flow hijack.
- A:HAvailability impact, high
- Dereferencing a freed `inet6_dev`/`net_device` on the packet transmit path reliably oopses or panics the kernel (KASAN slab-use-after-free), and the crash is in the core IPv6 output path so it takes down the whole forwarding host.