syzbot


possible deadlock in ieee80211_open

Status: auto-obsoleted due to no activity on 2024/09/29 07:40
Reported-by: syzbot+e099ca7259eeb54825bb@syzkaller.appspotmail.com
First crash: 118d, last: 118d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ieee80211_open wireless 48 37d 204d 0/28 upstream: reported on 2024/03/27 14:52

Sample crash report:
netlink: 'syz-executor.4': attribute type 10 has an invalid length.
======================================================
WARNING: possible circular locking dependency detected
5.15.161-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.4/7747 is trying to acquire lock:
ffff0000d86c8628 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5314 [inline]
ffff0000d86c8628 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: ieee80211_open+0x13c/0x1e0 net/mac80211/iface.c:361

but task is already holding lock:
ffff0000ce37cd00 (team->team_lock_key#3){+.+.}-{3:3}, at: team_add_slave+0xa8/0x1fb0 drivers/net/team/team.c:1981

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (team->team_lock_key#3){+.+.}-{3:3}:
       __mutex_lock_common+0x194/0x2154 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
       team_port_change_check+0x5c/0x230 drivers/net/team/team.c:3004
       team_device_event+0x1bc/0x4f4
       notifier_call_chain kernel/notifier.c:83 [inline]
       raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
       call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
       call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
       call_netdevice_notifiers net/core/dev.c:2044 [inline]
       dev_close_many+0x2fc/0x468 net/core/dev.c:1619
       unregister_netdevice_many+0x408/0x189c net/core/dev.c:11070
       macvlan_device_event+0x3d0/0x830 drivers/net/macvlan.c:1787
       notifier_call_chain kernel/notifier.c:83 [inline]
       raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
       call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
       call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
       call_netdevice_notifiers net/core/dev.c:2044 [inline]
       unregister_netdevice_many+0xec4/0x189c net/core/dev.c:11094
       unregister_netdevice_queue+0x2d0/0x31c net/core/dev.c:11027
       unregister_netdevice include/linux/netdevice.h:3012 [inline]
       _cfg80211_unregister_wdev+0x168/0x4a8 net/wireless/core.c:1129
       cfg80211_unregister_wdev+0x24/0x34 net/wireless/core.c:1174
       ieee80211_if_remove+0x1a4/0x294 net/mac80211/iface.c:2090
       ieee80211_del_iface+0x20/0x34 net/mac80211/cfg.c:145
       rdev_del_virtual_intf net/wireless/rdev-ops.h:57 [inline]
       nl80211_del_interface+0x1dc/0x66c net/wireless/nl80211.c:4109
       genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
       genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
       genl_rcv_msg+0xc18/0x1018 net/netlink/genetlink.c:792
       netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508
       genl_rcv+0x38/0x50 net/netlink/genetlink.c:803
       netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
       netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356
       netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924
       sock_sendmsg_nosec net/socket.c:704 [inline]
       __sock_sendmsg net/socket.c:716 [inline]
       ____sys_sendmsg+0x584/0x870 net/socket.c:2431
       ___sys_sendmsg+0x214/0x294 net/socket.c:2485
       __sys_sendmsg net/socket.c:2514 [inline]
       __do_sys_sendmsg net/socket.c:2523 [inline]
       __se_sys_sendmsg net/socket.c:2521 [inline]
       __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
       el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
       el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
       el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

-> #0 (&rdev->wiphy.mtx){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012
       lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x194/0x2154 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
       wiphy_lock include/net/cfg80211.h:5314 [inline]
       ieee80211_open+0x13c/0x1e0 net/mac80211/iface.c:361
       __dev_open+0x324/0x514 net/core/dev.c:1506
       dev_open+0xa8/0x23c net/core/dev.c:1542
       team_port_add drivers/net/team/team.c:1212 [inline]
       team_add_slave+0x6e4/0x1fb0 drivers/net/team/team.c:1982
       do_set_master net/core/rtnetlink.c:2543 [inline]
       do_setlink+0xbe4/0x3164 net/core/rtnetlink.c:2748
       __rtnl_newlink net/core/rtnetlink.c:3429 [inline]
       rtnl_newlink+0x12fc/0x1af4 net/core/rtnetlink.c:3549
       rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5629
       netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508
       rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5647
       netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
       netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356
       netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924
       sock_sendmsg_nosec net/socket.c:704 [inline]
       __sock_sendmsg net/socket.c:716 [inline]
       ____sys_sendmsg+0x584/0x870 net/socket.c:2431
       ___sys_sendmsg+0x214/0x294 net/socket.c:2485
       __sys_sendmsg net/socket.c:2514 [inline]
       __do_sys_sendmsg net/socket.c:2523 [inline]
       __se_sys_sendmsg net/socket.c:2521 [inline]
       __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
       el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
       el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
       el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(team->team_lock_key#3);
                               lock(&rdev->wiphy.mtx);
                               lock(team->team_lock_key#3);
  lock(&rdev->wiphy.mtx);

 *** DEADLOCK ***

2 locks held by syz-executor.4/7747:
 #0: ffff800016a47328 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffff800016a47328 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0xa2c/0xdac net/core/rtnetlink.c:5626
 #1: ffff0000ce37cd00 (team->team_lock_key#3){+.+.}-{3:3}, at: team_add_slave+0xa8/0x1fb0 drivers/net/team/team.c:1981

stack backtrace:
CPU: 0 PID: 7747 Comm: syz-executor.4 Not tainted 5.15.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2011
 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012
 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x194/0x2154 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
 wiphy_lock include/net/cfg80211.h:5314 [inline]
 ieee80211_open+0x13c/0x1e0 net/mac80211/iface.c:361
 __dev_open+0x324/0x514 net/core/dev.c:1506
 dev_open+0xa8/0x23c net/core/dev.c:1542
 team_port_add drivers/net/team/team.c:1212 [inline]
 team_add_slave+0x6e4/0x1fb0 drivers/net/team/team.c:1982
 do_set_master net/core/rtnetlink.c:2543 [inline]
 do_setlink+0xbe4/0x3164 net/core/rtnetlink.c:2748
 __rtnl_newlink net/core/rtnetlink.c:3429 [inline]
 rtnl_newlink+0x12fc/0x1af4 net/core/rtnetlink.c:3549
 rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5629
 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508
 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5647
 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
 netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356
 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x584/0x870 net/socket.c:2431
 ___sys_sendmsg+0x214/0x294 net/socket.c:2485
 __sys_sendmsg net/socket.c:2514 [inline]
 __do_sys_sendmsg net/socket.c:2523 [inline]
 __se_sys_sendmsg net/socket.c:2521 [inline]
 __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
team0: Port device wlan1 added

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/21 07:39 linux-5.15.y 4878aadf2d15 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ieee80211_open
* Struck through repros no longer work on HEAD.