Description
In the Linux kernel, the following vulnerability has been resolved: net: protect negative destination advice with RCU SO_CNX_ADVICE calls __dst_negative_advice() while holding the socket lock. Connected UDP sends can still invalidate or replace sk_dst_cache without that lock. A concurrent sk_dst_check() can drop the final destination reference and allow an RCU callback to destroy it while __dst_negative_advice() retains only a borrowed pointer. This can cause a use-after-free while accessing dst->ops or running the negative_advice callback. The writer-side ordering fixed by commit 92f1655aa2b2 ("net: fix __dst_negative_advice() 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 products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < 1659b53ca86e3e9982f7eff3d6a0c34fe58a4c59affecteda87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < 52d46f2a95586816ace4379da1938dfd6fa06e41affecteda87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < a83215575e38e057d52dd3cdfc3ac8307bcaf544affecteda87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < c3fd11f2bb0b0f32acdd633ef7bc6773c66229cbaffecteda87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < 3181e2e6f7c586cd000683511490eec867a406b0affecteda87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 to < 4b77d2792c3e482afa108c08f224ea6fa396d80baffected
Linux Linux
Default version status: affected
4.6affected0 to < 4.6unaffected5.10.276 to ≤ 5.10.*unaffected5.15.227 to ≤ 5.15.*unaffected6.12.120 to ≤ 6.12.*unaffected6.18.66 to ≤ 6.18.*unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/1659b53ca86e3e9982f7eff3d6a0c34fe58a4c59 ↗
- https://git.kernel.org/stable/c/52d46f2a95586816ace4379da1938dfd6fa06e41 ↗
- https://git.kernel.org/stable/c/a83215575e38e057d52dd3cdfc3ac8307bcaf544 ↗
- https://git.kernel.org/stable/c/c3fd11f2bb0b0f32acdd633ef7bc6773c66229cb ↗
- https://git.kernel.org/stable/c/3181e2e6f7c586cd000683511490eec867a406b0 ↗
- https://git.kernel.org/stable/c/4b77d2792c3e482afa108c08f224ea6fa396d80b ↗