# Re: \[PATCH net 7/8\] ndisc: extend RCU protection in ndisc\_send\_skb()

- From: David Ahern \<dsahern@kernel.org\>
- Date: 2025-02-07 20:46:49 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/02/11318598
- Thread: https://ratatoskr.run/netdev/2025/02/11318509/t.md

```text
On 2/7/25 6:58 AM, Eric Dumazet wrote:
> ndisc_send_skb() can be called without RTNL or RCU held.
> 
> Acquire rcu_read_lock() earlier, so that we can use dev_net_rcu()
> and avoid a potential UAF.
> 
> Fixes: 1762f7e88eb3 ("[NETNS][IPV6] ndisc - make socket control per namespace")
> Signed-off-by: Eric Dumazet <redacted>
> ---
>  net/ipv6/ndisc.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


```
