CVE-2026-143219: net: protect negative destination advice with RCU
In the Linux kernel, the following vulnerability has been resolved:
net: protect negative destination advice with RCU
SOCNXADVICE calls dstnegativeadvice() while holding the socket lock. Connected UDP sends can still invalidate or replace skdstcache without that lock. A concurrent skdstcheck() can drop the final destination reference and allow an RCU callback to destroy it while dstnegativeadvice() retains only a borrowed pointer. This can cause a use-after-free while accessing dst->ops or running the negativeadvice callback.
The writer-side ordering fixed by commit 92f1655aa2b2 ("net: fix dstnegativeadvice() race") does not protect this reader from an independent cache replacement.
Hold an RCU read-side critical section across the lookup and callback. This follows the datagram release callbacks and covers IPv4, IPv6, and XFRM advice without changing cache-reset or reference-ownership rules.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Hold an RCU read-side critical section across the destination lookup and the negative_advice callback.
Event History
Frequently Asked Questions
Which networking paths are affected by this race?
The affected advice handling covers IPv4, IPv6, and XFRM destination advice. The race involves SO_CNX_ADVICE and connected UDP sends that can invalidate or replace the socket destination cache concurrently.
What condition triggers the use-after-free?
A concurrent sk_dst_check() can release the last destination reference while __dst_negative_advice() still holds a borrowed destination pointer. An RCU callback may then destroy the destination while the advice path accesses dst->ops or invokes negative_advice.