Archive-only list for syzbot
 help / color / mirror / Atom feed
* [syzbot ci] Re: ipv6: Protect multiple routes insertion by table lock.
       [not found] <20261023191517.607834-1-kuniyu@google.com>
@ 2026-10-24 17:18 ` syzbot ci
  2026-10-27  6:06   ` Kuniyuki Iwashima
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot ci @ 2026-10-24 17:18 UTC (permalink / raw)
  To: davem, dsahern, edumazet, horms, idosch, kuba, kuni1840, kuniyu,
	netdev, pabeni, syzbot
  Cc: syzbot, syzkaller-bugs

syzbot ci has tested the following series

[v1] ipv6: Protect multiple routes insertion by table lock.
https://lore.kernel.org/all/20261023191517.607834-1-kuniyu@google.com
* [PATCH v1 net] ipv6: Protect multiple routes insertion by table lock.

and found the following issue:
WARNING: suspicious RCU usage in rt6_multipath_rebalance

Full report is available here:
https://ci.syzbot.org/series/7d878fa2-f84a-4468-85e2-c2a5e263aeff

***

WARNING: suspicious RCU usage in rt6_multipath_rebalance

tree:      net
URL:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/net.git
base:      7076f684d5132e6a6145e1da2fa74771ecd052e5
arch:      amd64
compiler:  Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
config:    https://ci.syzbot.org/builds/bbb3053f-f23f-4fe3-a9e9-85396428119d/config

IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
IPv6: NLM_F_CREATE should be set when creating new route
=============================
WARNING: suspicious RCU usage
syzkaller #0 Not tainted
-----------------------------
./include/net/addrconf.h:351 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
locks held by syz.2.3386/18922: 1, last CPU#0:
 #0: ffff888177df3430 (&tb->tb6_lock){+...}-{3:3}, at: inet6_rtm_newroute+0x3dc/0x1ab0

stack backtrace:
CPU: 0 UID: 0 PID: 18922 Comm: syz.2.3386 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 lockdep_rcu_suspicious+0x140/0x1d0
 rt6_multipath_rebalance+0xf11/0x1080
 fib6_del+0xada/0x15a0
 inet6_rtm_newroute+0x15b5/0x1ab0
 rtnetlink_rcv_msg+0x802/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x8ef/0xa80
 netlink_sendmsg+0x7f0/0xb20
 sock_sendmsg_nosec+0x14e/0x190
 ____sys_sendmsg+0x54e/0x850
 ___sys_sendmsg+0x2a5/0x360
 __sys_sendmmsg+0x273/0x4e0
 __x64_sys_sendmmsg+0xa0/0xc0
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa77459f559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa775488028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fa774826090 RCX: 00007fa77459f559
RDX: 040000000000009f RSI: 00002000000002c0 RDI: 000000000000000b
RBP: 00007fa774636b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa774826128 R14: 00007fa774826090 R15: 00007fffd26b46d8
 </TASK>


***

If these findings have caused you to resend the series or submit a
separate fix, please add the following tag to your commit message:
  Tested-by: syzbot@syzkaller.appspotmail.com

---
This report is generated by a bot. It may contain errors.
syzbot ci engineers can be reached at syzkaller@googlegroups.com.

To test a fix for this bug, please reply with `#syz test`
(on a separate line) and attach the patch to the email.

Notes:
- The patch will be applied on top of the tested series (as an
  incremental fix).
- To test a new version of the whole series, please send it directly
  to syzbot@lists.linux.dev.
- Arguments like custom git repos and branches are not supported.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [syzbot ci] Re: ipv6: Protect multiple routes insertion by table lock.
  2026-10-24 17:18 ` [syzbot ci] Re: ipv6: Protect multiple routes insertion by table lock syzbot ci
@ 2026-10-27  6:06   ` Kuniyuki Iwashima
  0 siblings, 0 replies; 2+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-27  6:06 UTC (permalink / raw)
  To: syzbot ci
  Cc: davem, dsahern, edumazet, horms, idosch, kuba, kuni1840, netdev,
	pabeni, syzbot, syzbot, syzkaller-bugs

On Sat, 24 Oct 2026 10:18:08 -0700, syzbot ci wrote:
> syzbot ci has tested the following series
> 
> [v1] ipv6: Protect multiple routes insertion by table lock.
> https://lore.kernel.org/all/20261023191517.607834-1-kuniyu@google.com
> * [PATCH v1 net] ipv6: Protect multiple routes insertion by table lock.
> 
> and found the following issue:
> WARNING: suspicious RCU usage in rt6_multipath_rebalance
> 
> Full report is available here:
> https://ci.syzbot.org/series/7d878fa2-f84a-4468-85e2-c2a5e263aeff
> 
> ***
> 
> WARNING: suspicious RCU usage in rt6_multipath_rebalance
> 
> tree:      net
> URL:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/net.git
> base:      7076f684d5132e6a6145e1da2fa74771ecd052e5
> arch:      amd64
> compiler:  Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
> config:    https://ci.syzbot.org/builds/bbb3053f-f23f-4fe3-a9e9-85396428119d/config
> 
> IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
> IPv6: NLM_F_CREATE should be set when creating new route
> =============================
> WARNING: suspicious RCU usage
> syzkaller #0 Not tainted
> -----------------------------
> ./include/net/addrconf.h:351 suspicious rcu_dereference_check() usage!
> 
> other info that might help us debug this:
> 
> 
> rcu_scheduler_active = 2, debug_locks = 1
> locks held by syz.2.3386/18922: 1, last CPU#0:
>  #0: ffff888177df3430 (&tb->tb6_lock){+...}-{3:3}, at: inet6_rtm_newroute+0x3dc/0x1ab0
> 
> stack backtrace:
> CPU: 0 UID: 0 PID: 18922 Comm: syz.2.3386 Not tainted syzkaller #0 PREEMPT(full) 
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> Call Trace:
>  <TASK>
>  dump_stack_lvl+0xe8/0x150
>  lockdep_rcu_suspicious+0x140/0x1d0
>  rt6_multipath_rebalance+0xf11/0x1080
>  fib6_del+0xada/0x15a0

Similar to 8e5f1bb81274 ("ipv6: Narrow down RCU critical section
in inet6_rtm_newroute()."), I had to wrap rt6_multipath_rebalance()
with RCU.

Will squash this:

---8<---
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 0dc6ebee6e56..f7c69c9df411 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1228,9 +1228,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt,
 			fib6_nsiblings++;
 		}
 		BUG_ON(fib6_nsiblings != rt->fib6_nsiblings);
-		rcu_read_lock();
 		rt6_multipath_rebalance(temp_sibling);
-		rcu_read_unlock();
 	}
 
 	/*
@@ -1274,9 +1272,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt,
 						   sibling->fib6_nsiblings - 1);
 				WRITE_ONCE(rt->fib6_nsiblings, 0);
 				list_del_rcu(&rt->fib6_siblings);
-				rcu_read_lock();
 				rt6_multipath_rebalance(next_sibling);
-				rcu_read_unlock();
 				return err;
 			}
 		}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5926ddbd4349..9618e7b635e9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4875,8 +4875,10 @@ void rt6_multipath_rebalance(struct fib6_info *rt)
 	if (WARN_ON_ONCE(!first))
 		return;
 
+	rcu_read_lock();
 	total = rt6_multipath_total_weight(first);
 	rt6_multipath_upper_bound_set(first, total);
+	rcu_read_unlock();
 }
 
 static int fib6_ifup(struct fib6_info *rt, void *p_arg)
---8<---

Thanks

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-27  6:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261023191517.607834-1-kuniyu@google.com>
2026-10-24 17:18 ` [syzbot ci] Re: ipv6: Protect multiple routes insertion by table lock syzbot ci
2026-10-27  6:06   ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox