syzbot


possible deadlock in dev_uc_sync_multiple

Status: auto-closed as invalid on 2019/09/11 09:05
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+829513abde137358d25d@syzkaller.appspotmail.com
First crash: 1882d, last: 1882d
Discussions (3)
Title Replies (including bot) Last reply
Reminder: 99 open syzbot bugs in net subsystem 14 (14) 2019/07/31 15:13
Reminder: 94 open syzbot bugs in net subsystem 1 (1) 2019/06/25 05:48
possible deadlock in dev_uc_sync_multiple 0 (1) 2019/03/15 23:42
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in dev_uc_sync_multiple (3) net 1 1346d 1342d 0/26 auto-closed as invalid on 2020/12/31 04:17
linux-4.14 possible deadlock in dev_uc_sync_multiple (3) 1 447d 447d 0/1 upstream: reported on 2023/02/17 11:15
linux-4.19 possible deadlock in dev_uc_sync_multiple (3) C error 7 461d 641d 0/1 upstream: reported C repro on 2022/08/08 00:40
linux-4.19 possible deadlock in dev_uc_sync_multiple (2) 11 779d 959d 0/1 auto-closed as invalid on 2022/07/21 03:12
upstream possible deadlock in dev_uc_sync_multiple (2) net 26 1400d 1411d 15/26 fixed on 2020/07/20 08:03
linux-4.19 possible deadlock in dev_uc_sync_multiple 1 1362d 1362d 0/1 auto-closed as invalid on 2020/12/15 01:55
linux-4.14 possible deadlock in dev_uc_sync_multiple (2) 9 574d 861d 0/1 auto-obsoleted due to no activity on 2023/02/11 03:42
linux-4.14 possible deadlock in dev_uc_sync_multiple 4 1114d 1347d 0/1 auto-closed as invalid on 2021/08/19 17:04

Sample crash report:
8021q: adding VLAN 0 to HW filter on device team0
============================================
WARNING: possible recursive locking detected
5.0.0+ #122 Not tainted
--------------------------------------------
syz-executor.5/22213 is trying to acquire lock:
0000000074b895b8 (&vlan_netdev_addr_lock_key/2){+...}, at: netif_addr_lock_nested include/linux/netdevice.h:4058 [inline]
0000000074b895b8 (&vlan_netdev_addr_lock_key/2){+...}, at: dev_uc_sync_multiple+0x126/0x1f0 net/core/dev_addr_lists.c:674

but task is already holding lock:
00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: netif_addr_lock_bh include/linux/netdevice.h:4063 [inline]
00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: dev_set_rx_mode+0x20/0x40 net/core/dev.c:7493

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&vlan_netdev_addr_lock_key/2);
  lock(&vlan_netdev_addr_lock_key/2);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

4 locks held by syz-executor.5/22213:
 #0: 00000000cc51f097 (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:76
 #1: 00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
 #1: 00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: netif_addr_lock_bh include/linux/netdevice.h:4063 [inline]
 #1: 00000000bb344d7d (&vlan_netdev_addr_lock_key/2){+...}, at: dev_set_rx_mode+0x20/0x40 net/core/dev.c:7493
 #2: 00000000ae9bba03 (&dev_addr_list_lock_key#2/1){+...}, at: netif_addr_lock_nested include/linux/netdevice.h:4058 [inline]
 #2: 00000000ae9bba03 (&dev_addr_list_lock_key#2/1){+...}, at: dev_mc_sync+0x126/0x1f0 net/core/dev_addr_lists.c:865
 #3: 00000000a2ed60f7 (rcu_read_lock){....}, at: team_set_rx_mode+0x0/0x230 drivers/net/team/team.c:1440

stack backtrace:
CPU: 0 PID: 22213 Comm: syz-executor.5 Not tainted 5.0.0+ #122
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 print_deadlock_bug kernel/locking/lockdep.c:2100 [inline]
 check_deadlock kernel/locking/lockdep.c:2144 [inline]
 validate_chain kernel/locking/lockdep.c:2698 [inline]
 __lock_acquire.cold+0x233/0x50d kernel/locking/lockdep.c:3701
 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211
 _raw_spin_lock_nested+0x35/0x50 kernel/locking/spinlock.c:354
 netif_addr_lock_nested include/linux/netdevice.h:4058 [inline]
 dev_uc_sync_multiple+0x126/0x1f0 net/core/dev_addr_lists.c:674
 team_set_rx_mode+0xd2/0x230 drivers/net/team/team.c:1745
 __dev_set_rx_mode+0x1eb/0x300 net/core/dev.c:7488
 dev_mc_sync+0x1a4/0x1f0 net/core/dev_addr_lists.c:868
 vlan_dev_set_rx_mode+0x3f/0x80 net/8021q/vlan_dev.c:485
 __dev_set_rx_mode+0x1eb/0x300 net/core/dev.c:7488
 dev_set_rx_mode+0x28/0x40 net/core/dev.c:7494
 __dev_open+0x28a/0x3d0 net/core/dev.c:1403
 __dev_change_flags+0x568/0x6e0 net/core/dev.c:7567
 dev_change_flags+0x92/0x170 net/core/dev.c:7638
 vlan_device_event+0x588/0x22d0 net/8021q/vlan.c:464
 notifier_call_chain+0xc7/0x240 kernel/notifier.c:93
 __raw_notifier_call_chain kernel/notifier.c:394 [inline]
 raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401
 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1739
 call_netdevice_notifiers_extack net/core/dev.c:1751 [inline]
 call_netdevice_notifiers net/core/dev.c:1765 [inline]
 __dev_notify_flags+0x121/0x2c0 net/core/dev.c:7605
 dev_change_flags+0x10d/0x170 net/core/dev.c:7643
 devinet_ioctl+0xde6/0x1cf0 net/ipv4/devinet.c:1104
 inet_ioctl+0x2d4/0x410 net/ipv4/af_inet.c:954
 packet_ioctl+0xcb/0x2b0 net/packet/af_packet.c:4099
 sock_do_ioctl+0xde/0x300 net/socket.c:972
 sock_ioctl+0x32b/0x610 net/socket.c:1096
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458079
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f3b4fed9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458079
RDX: 0000000020000240 RSI: 0000000000008914 RDI: 0000000000000003
RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3b4feda6d4
R13: 00000000004c3670 R14: 00000000004d64a8 R15: 00000000ffffffff
IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/15 09:04 net-old 3b319ee220a8 bab43553 .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.