syzbot


WARNING: suspicious RCU usage in in6_dump_addrs (2)

Status: fixed on 2024/04/10 03:59
Subsystems: net
[Documentation on labels]
Fix commit: 67ea41d19d2a inet6: expand rcu_read_lock() scope in inet6_dump_addr()
First crash: 112d, last: 112d
Cause bisection: introduced by (bisect log) :
commit c3718936ec47ae811a7ce9a618b6cb1cda835bab
Author: Eric Dumazet <edumazet@google.com>
Date: Fri Feb 23 20:10:54 2024 +0000

  ipv6: anycast: complete RCU handling of struct ifacaddr6

Crash: WARNING: suspicious RCU usage in in6_dump_addrs (log)
Repro: C syz .config
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: suspicious RCU usage in in6_dump_addrs net C unreliable 613 692d 736d 22/27 fixed on 2023/02/24 13:50

Sample crash report:
=============================
WARNING: suspicious RCU usage
6.8.0-rc5-syzkaller-01618-gf8cbf6bde4c8 #0 Not tainted
-----------------------------
net/ipv6/addrconf.c:5317 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
3 locks held by syz-executor217/5067:
 #0: ffff88801bae3678 (nlk_cb_mutex-ROUTE){+.+.}-{3:3}, at: __netlink_dump_start+0x119/0x780 net/netlink/af_netlink.c:2338
 #1: ffffffff8f377a88 (rtnl_mutex){+.+.}-{3:3}, at: netlink_dump+0x676/0xda0 net/netlink/af_netlink.c:2265
 #2: ffff8880228fb580 (&ndev->lock){++..}-{2:2}, at: in6_dump_addrs+0xb8/0x1de0 net/ipv6/addrconf.c:5279

stack backtrace:
CPU: 1 PID: 5067 Comm: syz-executor217 Not tainted 6.8.0-rc5-syzkaller-01618-gf8cbf6bde4c8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
 lockdep_rcu_suspicious+0x220/0x340 kernel/locking/lockdep.c:6712
 in6_dump_addrs+0x1b47/0x1de0 net/ipv6/addrconf.c:5317
 inet6_dump_addr+0x1597/0x1690 net/ipv6/addrconf.c:5428
 netlink_dump+0x6a6/0xda0 net/netlink/af_netlink.c:2266
 __netlink_dump_start+0x59d/0x780 net/netlink/af_netlink.c:2374
 netlink_dump_start include/linux/netlink.h:340 [inline]
 rtnetlink_rcv_msg+0xcf7/0x10d0 net/core/rtnetlink.c:6555
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2547
 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
 netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
 netlink_sendmsg+0x8e0/0xcb0 net/netlink/af_netlink.c:1902
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
 do_syscall_64+0xf9/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f8dd6aa06b9
Code: 48 83 c4 28 c3 e8 27 18 00 00 0f 1f 80 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff3a285c38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f8dd6

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/27 21:56 net-next f8cbf6bde4c8 05e69c83 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: suspicious RCU usage in in6_dump_addrs
2024/02/27 21:00 net-next f8cbf6bde4c8 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: suspicious RCU usage in in6_dump_addrs
2024/02/27 20:37 net-next f8cbf6bde4c8 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: suspicious RCU usage in in6_dump_addrs
* Struck through repros no longer work on HEAD.