Thread (5 messages) 5 messages, 3 authors, 5d ago

Re: [PATCH net 1/2] nexthop: take nh->lock for f6i_list walks in replace check and notify

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-07-24 22:10:55
Also in: lkml

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:

On Wed, 22 Jul 2026 00:29:50 +0000 you wrote:
fib6_check_nh_list() and __nexthop_replace_notify() walk nh->f6i_list
during an RTNL-serialized nexthop replace without holding nh->lock. IPv6
RTM_NEWROUTE/RTM_DELROUTE run without RTNL and mutate that list under
nh->lock (fib6_add_rt2node_nh(), fib6_purge_rt()), so both walks race a
concurrent route delete that unlinks and frees a fib6_info:

  BUG: KASAN: slab-use-after-free in rt6_fill_node.isra.0 (net/ipv6/route.c:5799)
  Read of size 4 at addr ffff888014607e64 by task exploit/143
   rt6_fill_node.isra.0 (net/ipv6/route.c:5799)
   fib6_rt_update (net/ipv6/route.c:6412)
   __nexthop_replace_notify (net/ipv4/nexthop.c:2542)
   rtm_new_nexthop (net/ipv4/nexthop.c:2554)
   rtnetlink_rcv_msg (net/core/rtnetlink.c:7076)

[...]
Here is the summary with links:
  - [net,1/2] nexthop: take nh->lock for f6i_list walks in replace check and notify
    https://git.kernel.org/netdev/net/c/072cd1f21819
  - [net,2/2] nexthop: avoid unlocked f6i_list walk in nh_rt_cache_flush
    https://git.kernel.org/netdev/net/c/4787a6d2629b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help