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: 269d, last: 10h09m
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 (6)
Title Replies (including bot) Last reply
[syzbot] Monthly net report (Oct 2024) 0 (1) 2024/10/03 09:02
[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 1660d 1724d 0/28 auto-closed as invalid on 2020/09/02 22:06
linux-5.15 possible deadlock in team_port_change_check origin:upstream C 13 10d 233d 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 24 6d20h 233d 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 (2246):
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/11/20 20:22 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/20 13:06 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/19 19:42 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/18 12:07 upstream adc218676eef 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/11/17 04:42 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in team_port_change_check
2024/11/16 13:56 upstream e8bdb3c8be08 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/11/18 21:28 upstream adc218676eef 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/11/18 03:17 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/11/17 15:57 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/11/19 02:42 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 22:49 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 20:04 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 18:21 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 16:52 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 13:09 bpf 9f8e716d46c6 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/18 09:43 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 04:56 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/18 00:01 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/17 22:19 bpf 9f8e716d46c6 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/17 20:13 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/17 18:44 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/17 13:12 bpf 9f8e716d46c6 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/17 09:33 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/17 00:44 bpf 9f8e716d46c6 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/16 23:06 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/16 12:11 net ea301aec8bb7 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/16 06:58 net ea301aec8bb7 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/16 05:47 net ea301aec8bb7 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/16 03:30 net ea301aec8bb7 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/16 01:23 net ea301aec8bb7 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/15 22:40 net ea301aec8bb7 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/15 18:28 bpf 9f8e716d46c6 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 16:51 bpf 9f8e716d46c6 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 08:06 bpf 9f8e716d46c6 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 05:40 bpf 9f8e716d46c6 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 05:32 bpf 9f8e716d46c6 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 02:44 bpf 9f8e716d46c6 77f3eeb7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/15 01:41 bpf 9f8e716d46c6 77f3eeb7 .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/11/20 15:08 net-next dd7207838d38 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/20 14:06 net-next dd7207838d38 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/20 03:27 net-next dd7207838d38 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 23:19 net-next dd7207838d38 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 21:05 net-next dd7207838d38 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 15:30 net-next e867ed3ac8aa 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 09:00 net-next e867ed3ac8aa 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 06:12 net-next e867ed3ac8aa 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/19 04:32 net-next e867ed3ac8aa 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/17 17:32 net-next 38f83a57aa8e cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/16 19:19 net-next 38f83a57aa8e cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/16 04:41 net-next dfc14664794a cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/15 23:48 net-next dfc14664794a cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/10/23 18:33 bpf-next 1f7c33630724 15fa2979 .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/11/10 06:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 563047e691f2 6b856513 .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.