xfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 3.1, 3.3, 3.5, 3.10, 6.1.183, and 4 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: xfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst() On the error path where in6_dev_get(dev) returns NULL, xfrm6_fill_dst() releases the device reference with netdev_put() but leaves xdst->u.dst.dev set. dst_destroy() later calls netdev_put(dst->dev) again, so the same net_device reference is released twice, underflowing its refcount (ref_tracker WARNING + "unregister_netdevice: waiting for <dev> to become free"). Clear xdst->u.dst.dev after the netdev_put(), the same way the XFRM device-offload paths xfrm_dev_state_add() and xfrm_dev_policy_add() in net/xfrm/xfrm_device.c NULL ->dev when releasing the reference on error. ref_tracker: reference already released. ref_tracker: allocated in: xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:86) ... udpv6_sendmsg (net/ipv6/udp.c:1696) ... ref_tracker: freed in: xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:90) ... WARNING: lib/ref_tracker.c:322 at ref_tracker_free+0x58b/0x780 dst_destroy (net/core/dst.c:115) rcu_core handle_softirqs ...
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in 97e032e5733e49471fb73de117ea2ac1ac7c479a; From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in df6856c2dda9187601d29b5fbd7a81b3b178cedf; From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in 43de8a49335e611adb271bbd52e84dfbc11fc185; From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in ff636d7b7cba6dea82ecf580415ea57f2c1a11b6; From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in e078da1b4e11390cff3201c19a9a1fe70c5b934f; From 84c4a9dfbf430861e7588d95ae3ff61535dca351 · fixed in 136992de9bb91871084ae52d172610541c76e4d2; From 3.0.79 · fixed in 3.1; From 3.2.46 · fixed in 3.3; From 3.4.46 · fixed in 3.5; From 3.9.3 · fixed in 3.10
- Linux Linux
3.10
- KernelLinux
From 3.10.0 · fixed in 6.1.183; From 6.2.0 · fixed in 6.6.148; From 6.7.0 · fixed in 6.12.101; From 6.13.0 · fixed in 6.18.42; From 6.19.0 · fixed in 7.1.6