syzbot


possible deadlock in dev_mc_sync (2)

Status: auto-obsoleted due to no activity on 2023/01/14 06:46
Reported-by: syzbot+69adc8c8065cda64bb44@syzkaller.appspotmail.com
First crash: 614d, last: 596d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in dev_mc_sync net 5 1332d 1407d 0/26 auto-closed as invalid on 2021/01/08 21:25
linux-4.19 possible deadlock in dev_mc_sync 1 827d 827d 0/1 auto-closed as invalid on 2022/05/28 09:02

Sample crash report:
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
8021q: adding VLAN 0 to HW filter on device team0
======================================================
WARNING: possible circular locking dependency detected
4.19.211-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.1/7538 is trying to acquire lock:
00000000517bcbe6 (&dev_addr_list_lock_key#2/1){+...}, at: netif_addr_lock_nested include/linux/netdevice.h:4007 [inline]
00000000517bcbe6 (&dev_addr_list_lock_key#2/1){+...}, at: dev_mc_sync+0x11a/0x1e0 net/core/dev_addr_lists.c:765

but task is already holding lock:
0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: netif_addr_lock_bh include/linux/netdevice.h:4012 [inline]
0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: dev_set_rx_mode net/core/dev.c:7606 [inline]
0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: __dev_open+0x264/0x3a0 net/core/dev.c:1410

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&vlan_netdev_addr_lock_key#2/2){+...}:
       netif_addr_lock_nested include/linux/netdevice.h:4007 [inline]
       dev_uc_sync_multiple+0x11a/0x1e0 net/core/dev_addr_lists.c:574
       team_set_rx_mode+0xce/0x230 drivers/net/team/team.c:1788
       __dev_set_rx_mode+0x1d9/0x2f0 net/core/dev.c:7601
       dev_mc_sync+0x193/0x1e0 net/core/dev_addr_lists.c:768
       vlan_dev_set_rx_mode+0x38/0x80 net/8021q/vlan_dev.c:488
       __dev_set_rx_mode+0x1d9/0x2f0 net/core/dev.c:7601
       dev_set_rx_mode net/core/dev.c:7607 [inline]
       __dev_open+0x26c/0x3a0 net/core/dev.c:1410
       __dev_change_flags+0x501/0x660 net/core/dev.c:7679
       dev_change_flags+0x7e/0x140 net/core/dev.c:7748
       vlan_device_event+0x1429/0x1e40 net/8021q/vlan.c:463
       notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
       call_netdevice_notifiers net/core/dev.c:1762 [inline]
       dev_open net/core/dev.c:1442 [inline]
       dev_open+0x128/0x140 net/core/dev.c:1430
       bond_enslave+0x958/0x5250 drivers/net/bonding/bond_main.c:1561
       do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321
       do_setlink+0x7ec/0x3540 net/core/rtnetlink.c:2455
       rtnl_newlink+0xda9/0x15c0 net/core/rtnetlink.c:3077
       rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
       netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
       netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
       netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
       netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
       sock_sendmsg_nosec net/socket.c:651 [inline]
       sock_sendmsg+0xc3/0x120 net/socket.c:661
       ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
       __sys_sendmsg net/socket.c:2265 [inline]
       __do_sys_sendmsg net/socket.c:2274 [inline]
       __se_sys_sendmsg net/socket.c:2272 [inline]
       __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
       do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

-> #0 (&dev_addr_list_lock_key#2/1){+...}:
       _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:354
       netif_addr_lock_nested include/linux/netdevice.h:4007 [inline]
       dev_mc_sync+0x11a/0x1e0 net/core/dev_addr_lists.c:765
       vlan_dev_set_rx_mode+0x38/0x80 net/8021q/vlan_dev.c:488
       __dev_set_rx_mode+0x1d9/0x2f0 net/core/dev.c:7601
       dev_set_rx_mode net/core/dev.c:7607 [inline]
       __dev_open+0x26c/0x3a0 net/core/dev.c:1410
       __dev_change_flags+0x501/0x660 net/core/dev.c:7679
       dev_change_flags+0x7e/0x140 net/core/dev.c:7748
       vlan_device_event+0x1429/0x1e40 net/8021q/vlan.c:463
       notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
       call_netdevice_notifiers net/core/dev.c:1762 [inline]
       dev_open net/core/dev.c:1442 [inline]
       dev_open+0x128/0x140 net/core/dev.c:1430
       bond_enslave+0x958/0x5250 drivers/net/bonding/bond_main.c:1561
       do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321
       do_setlink+0x7ec/0x3540 net/core/rtnetlink.c:2455
       rtnl_newlink+0xda9/0x15c0 net/core/rtnetlink.c:3077
       rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
       netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
       netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
       netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
       netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
       sock_sendmsg_nosec net/socket.c:651 [inline]
       sock_sendmsg+0xc3/0x120 net/socket.c:661
       ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
       __sys_sendmsg net/socket.c:2265 [inline]
       __do_sys_sendmsg net/socket.c:2274 [inline]
       __se_sys_sendmsg net/socket.c:2272 [inline]
       __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
       do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&vlan_netdev_addr_lock_key#2/2);
                               lock(&dev_addr_list_lock_key#2/1);
                               lock(&vlan_netdev_addr_lock_key#2/2);
  lock(&dev_addr_list_lock_key#2/1);

 *** DEADLOCK ***

2 locks held by syz-executor.1/7538:
 #0: 00000000554c1015 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
 #0: 00000000554c1015 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779
 #1: 0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
 #1: 0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: netif_addr_lock_bh include/linux/netdevice.h:4012 [inline]
 #1: 0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: dev_set_rx_mode net/core/dev.c:7606 [inline]
 #1: 0000000027fb5c0f (&vlan_netdev_addr_lock_key#2/2){+...}, at: __dev_open+0x264/0x3a0 net/core/dev.c:1410

stack backtrace:
CPU: 0 PID: 7538 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222
 check_prev_add kernel/locking/lockdep.c:1866 [inline]
 check_prevs_add kernel/locking/lockdep.c:1979 [inline]
 validate_chain kernel/locking/lockdep.c:2420 [inline]
 __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:354
 netif_addr_lock_nested include/linux/netdevice.h:4007 [inline]
 dev_mc_sync+0x11a/0x1e0 net/core/dev_addr_lists.c:765
 vlan_dev_set_rx_mode+0x38/0x80 net/8021q/vlan_dev.c:488
 __dev_set_rx_mode+0x1d9/0x2f0 net/core/dev.c:7601
 dev_set_rx_mode net/core/dev.c:7607 [inline]
 __dev_open+0x26c/0x3a0 net/core/dev.c:1410
 __dev_change_flags+0x501/0x660 net/core/dev.c:7679
 dev_change_flags+0x7e/0x140 net/core/dev.c:7748
 vlan_device_event+0x1429/0x1e40 net/8021q/vlan.c:463
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
 call_netdevice_notifiers net/core/dev.c:1762 [inline]
 dev_open net/core/dev.c:1442 [inline]
 dev_open+0x128/0x140 net/core/dev.c:1430
 bond_enslave+0x958/0x5250 drivers/net/bonding/bond_main.c:1561
 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321
 do_setlink+0x7ec/0x3540 net/core/rtnetlink.c:2455
 rtnl_newlink+0xda9/0x15c0 net/core/rtnetlink.c:3077
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fb1e0ae3409
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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:00007fb1df458168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fb1e0bf5f80 RCX: 00007fb1e0ae3409
RDX: 0000000000000000 RSI: 0000000020000600 RDI: 0000000000000004
RBP: 00007fb1e0b3e367 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc4a7ff2f R14: 00007fb1df458300 R15: 0000000000022000
bond0: Enslaving team0 as an active interface with an up link
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
bond0: Releasing backup interface team0
bridge0: port 4(team0) entered blocking state
bridge0: port 4(team0) entered disabled state
device team0 entered promiscuous mode
device team_slave_0 entered promiscuous mode
device team_slave_1 entered promiscuous mode
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
device team0 left promiscuous mode
device team_slave_0 left promiscuous mode
device team_slave_1 left promiscuous mode
IPVS: ftp: loaded support on port[0] = 21
bridge0: port 4(team0) entered disabled state
8021q: adding VLAN 0 to HW filter on device team0
bond0: Enslaving team0 as an active interface with an up link
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
bond0: Releasing backup interface team0
kauditd_printk_skb: 61 callbacks suppressed
audit: type=1800 audit(1663310731.569:25072): pid=7648 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14107 res=0
bridge0: port 4(team0) entered blocking state
bridge0: port 4(team0) entered disabled state
device team0 entered promiscuous mode
device team_slave_0 entered promiscuous mode
device team_slave_1 entered promiscuous mode
IPVS: ftp: loaded support on port[0] = 21
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
device team0 left promiscuous mode
device team_slave_0 left promiscuous mode
device team_slave_1 left promiscuous mode
bridge0: port 4(team0) entered disabled state
8021q: adding VLAN 0 to HW filter on device team0
bond0: Enslaving team0 as an active interface with an up link
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
bond0: Releasing backup interface team0
audit: type=1800 audit(1663310732.329:25073): pid=7715 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14120 res=0
bridge0: port 4(team0) entered blocking state
bridge0: port 4(team0) entered disabled state
device team0 entered promiscuous mode
device team_slave_0 entered promiscuous mode
device team_slave_1 entered promiscuous mode
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'.
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
netlink: 'syz-executor.1': attribute type 10 has an invalid length.
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'.
audit: type=1800 audit(1663310732.889:25074): pid=7796 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14101 res=0
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'.
audit: type=1800 audit(1663310733.219:25075): pid=7821 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14149 res=0
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
audit: type=1800 audit(1663310733.779:25076): pid=7865 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14150 res=0
devpts: called with bogus options
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
devpts: called with bogus options
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
audit: type=1800 audit(1663310734.689:25077): pid=7929 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14150 res=0
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
devpts: called with bogus options
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
audit: type=1800 audit(1663310735.609:25078): pid=8000 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14156 res=0
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
devpts: called with bogus options
audit: type=1800 audit(1663310736.579:25079): pid=8058 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14157 res=0
devpts: called with bogus options
FAT-fs (loop0): Unrecognized mount option "utfΛ;”ΡΑdΆtname=mixed" or missing value
devpts: called with bogus options
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
audit: type=1800 audit(1663310737.489:25080): pid=8135 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14139 res=0
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
audit: type=1800 audit(1663310738.260:25081): pid=8203 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14171 res=0
devpts: called with bogus options
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
devpts: called with bogus options
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.
audit: type=1800 audit(1663310739.110:25082): pid=8252 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=14197 res=0
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'.

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/16 06:45 linux-4.19.y 3f8a27f9e27b dd9a85ff .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in dev_mc_sync
2022/08/29 06:30 linux-4.19.y 3f8a27f9e27b 07177916 .config console log report info ci2-linux-4-19 possible deadlock in dev_mc_sync
* Struck through repros no longer work on HEAD.