syzbot


possible deadlock in team_port_change_check (2)

Status: upstream: reported C repro on 2024/02/29 16:02
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+3c47b5843403a45aef57@syzkaller.appspotmail.com
First crash: 195d, last: 4h39m
Cause bisection: introduced by (bisect log) :
commit ec4ffd100ffb396eca13ebe7d18938ea80f399c3
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon Jan 8 09:41:02 2024 +0000

  Revert "net: rtnetlink: Enslave device before bringing it up"

Crash: possible deadlock in team_port_change_check (log)
Repro: C syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[syzbot] Monthly net report (Sep 2024) 0 (1) 2024/09/02 08:21
[syzbot] Monthly net report (Aug 2024) 0 (1) 2024/08/02 07:26
[syzbot] [net?] possible deadlock in team_port_change_check (2) 3 (8) 2024/03/07 10:48
Re: [syzbot] [net?] possible deadlock in team_port_change_check (2) 1 (1) 2024/03/03 08:39
Re: [syzbot] [net?] possible deadlock in team_port_change_check (2) 1 (1) 2024/03/02 13:52
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_port_change_check net 2 1586d 1650d 0/27 auto-closed as invalid on 2020/09/02 22:06
linux-5.15 possible deadlock in team_port_change_check origin:upstream C 11 15d 159d 0/3 upstream: reported C repro on 2024/04/01 19:31
linux-6.1 possible deadlock in team_port_change_check origin:upstream C 7 7d06h 159d 0/3 upstream: reported C repro on 2024/04/01 17:20
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/03/07 10:02 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2024/03/07 09:26 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
netlink: 'syz-executor162': attribute type 10 has an invalid length.
team0: Port device vlan0 added
netlink: 'syz-executor162': attribute type 10 has an invalid length.
veth0_vlan: left promiscuous mode
veth0_vlan: entered promiscuous mode
============================================
WARNING: possible recursive locking detected
6.8.0-syzkaller-08073-g480e035fc4c7 #0 Not tainted
--------------------------------------------
syz-executor162/5067 is trying to acquire lock:
ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_port_change_check+0x51/0x1e0 drivers/net/team/team.c:2995

but task is already holding lock:
ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_add_slave+0xad/0x2750 drivers/net/team/team.c:1973

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

       CPU0
       ----
  lock(team->team_lock_key);
  lock(team->team_lock_key);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor162/5067:
 #0: ffffffff8f38ce88 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
 #0: ffffffff8f38ce88 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x842/0x10d0 net/core/rtnetlink.c:6592
 #1: ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_add_slave+0xad/0x2750 drivers/net/team/team.c:1973

stack backtrace:
CPU: 0 PID: 5067 Comm: syz-executor162 Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 check_deadlock kernel/locking/lockdep.c:3062 [inline]
 validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856
 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
 team_port_change_check+0x51/0x1e0 drivers/net/team/team.c:2995
 team_device_event+0x4e6/0x5b0 drivers/net/team/team.c:3018
 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
 __dev_notify_flags+0x207/0x400
 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8760
 vlan_device_event+0x1b81/0x1de0 net/8021q/vlan.c:468
 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
 call_netdevice_notifiers_extack net/core/dev.c:1988 [inline]
 call_netdevice_notifiers net/core/dev.c:2002 [inline]
 dev_open+0x13a/0x1b0 net/core/dev.c:1471
 team_port_add drivers/net/team/team.c:1214 [inline]
 team_add_slave+0x9b3/0x2750 drivers/net/team/team.c:1974
 do_set_master net/core/rtnetlink.c:2685 [inline]
 do_setlink+0xe70/0x41f0 net/core/rtnetlink.c:2891
 __rtnl_newlink net/core/rtnetlink.c:3680 [inline]
 rtnl_newlink+0x180b/0x20a0 net/core/rtnetlink.c:3727
 rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
 netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
 netlink_sendmsg+0x8e1/0xcb0 net/netlink/af_netlink.c:1905
 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+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fd9ea5f5b09
Code: 48 83 c4 28 c3 e8 d7 19 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:00007fff8ef3bc18 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd9ea6433d3 RCX: 00007fd9ea5f5b09
RDX: 0000000000000000 RSI: 0000000020000600 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 00007fff8ef3bc50
R13: 00007fd9ea643004 R14: 00007fff8ef3bc3c R15: 0000000000000003
 </TASK>

Crashes (946):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/01 19:04 upstream 480e035fc4c7 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/03/05 23:21 upstream 90d35da658da f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/04/01 19:12 net f99c5f563c17 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/04/01 19:06 bpf 443574b03387 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/03/05 23:24 net 4daa873133d3 f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/05/04 06:52 net-next 5829614a7b3b 610f2a54 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/04/02 07:35 bpf-next 14bb1e8c8d4a 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/03/05 22:43 net-next 885c36e59f46 f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/03/09 20:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 707081b61156 6ee49f2e .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in team_port_change_check
2024/09/07 22:02 upstream d1f2d51b711a 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/09/06 22:21 upstream 788220eee30d ce70880a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/09/02 01:15 upstream c9f016e72b5c 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/08/31 03:55 upstream 20371ba12063 f885a8ff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/06/22 16:21 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in team_port_change_check
2024/09/02 04:37 upstream c9f016e72b5c 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/09/07 16:58 net d759ee240d3c 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/06 20:36 net d759ee240d3c ce70880a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/06 06:06 net 031ae72825ce 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/05 13:34 net 8e69c96df771 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/05 11:05 net 4963d2343af8 dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/04 12:13 net 33f339a1ba54 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/04 07:33 net 33f339a1ba54 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/04 01:25 net 33f339a1ba54 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/03 18:04 net 5517ae241919 512328ba .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/03 06:35 net ef4a99a0164e abeaa9b9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/08/31 21:08 net fe1910f9337b 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/08/31 07:41 net fe1910f9337b 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/08/30 08:44 net 1bb3c548e4e3 54fe8471 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/30 01:46 bpf 41c24102af7b 5187fc86 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/02/26 08:27 net 2a770cdc4382 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/02/25 15:49 net 2a770cdc4382 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/09/08 00:09 net-next f723224742fc 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/07 20:07 net-next f723224742fc 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/07 09:03 net-next f723224742fc 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/07 07:09 net-next f723224742fc 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/07 04:29 net-next f723224742fc 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/07 01:00 net-next 52fc70a32573 ce70880a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/06 11:48 net-next 22d6adac5b17 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/06 03:24 net-next 22d6adac5b17 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/04 18:00 net-next 780801200300 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/04 05:50 net-next 3bbefbbd9e6c 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/03 13:20 net-next da4f3b72c883 512328ba .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/03 11:00 net-next da4f3b72c883 512328ba .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/03 04:19 net-next 55ddb6c5a3ae abeaa9b9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 20:24 net-next 55ddb6c5a3ae abeaa9b9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 14:44 net-next 55ddb6c5a3ae 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 12:45 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 11:44 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 08:14 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 03:30 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/02 00:13 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/01 19:18 net-next 221f9cce949a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/01 17:06 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/01 14:03 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/01 13:02 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/09/01 09:44 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/31 18:33 net-next cff69f72d333 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/31 14:22 net-next cff69f72d333 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/31 11:48 net-next cff69f72d333 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/30 21:27 net-next fbdaffe41adc f885a8ff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/30 19:35 net-next fbdaffe41adc f885a8ff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/29 18:00 net-next 0a8b08c554da 54fe8471 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/08/29 15:17 net-next e24a6c874601 ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 11:29 bpf-next 18a8a4c88fb4 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/07/17 13:02 linux-next 797012914d2d 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in team_port_change_check
2024/04/27 23:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in team_port_change_check
* Struck through repros no longer work on HEAD.