netlink: 'syz.0.2565': attribute type 10 has an invalid length. ====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc7-syzkaller-00196-g88d324e69ea9 #0 Not tainted ------------------------------------------------------ syz.0.2565/17607 is trying to acquire lock: ffff8880752d8768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ffff8880752d8768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 but task is already holding lock: ffff88806128ce00 (team->team_lock_key#7){+.+.}-{4:4}, at: team_add_slave+0x9c/0x2190 drivers/net/team/team_core.c:1987 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (team->team_lock_key#7){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 team_set_mac_address+0x17f/0x290 drivers/net/team/team_core.c:1816 dev_set_mac_address+0x301/0x4a0 net/core/dev.c:9515 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:9534 do_setlink.constprop.0+0x7bf/0x3f80 net/core/rtnetlink.c:3073 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2187 __do_compat_sys_socketcall+0x5e2/0x700 net/compat.c:475 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #2 (dev_addr_sem){++++}-{4:4}: down_read+0x9a/0x330 kernel/locking/rwsem.c:1524 address_show+0x23/0x2a0 net/core/net-sysfs.c:184 dev_attr_show+0x53/0xe0 drivers/base/core.c:2424 sysfs_kf_seq_show+0x23e/0x410 fs/sysfs/file.c:59 seq_read_iter+0x4f4/0x12b0 fs/seq_file.c:230 kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279 new_sync_read fs/read_write.c:484 [inline] vfs_read+0x886/0xbf0 fs/read_write.c:565 ksys_read+0x12b/0x250 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (kn->active#21){++++}-{0:0}: kernfs_drain+0x48f/0x590 fs/kernfs/dir.c:500 __kernfs_remove+0x281/0x670 fs/kernfs/dir.c:1487 kernfs_remove_by_name_ns+0xb2/0x130 fs/kernfs/dir.c:1695 kernfs_remove_by_name include/linux/kernfs.h:625 [inline] remove_files+0x96/0x1c0 fs/sysfs/group.c:28 sysfs_remove_group+0x8b/0x180 fs/sysfs/group.c:322 sysfs_remove_groups fs/sysfs/group.c:346 [inline] sysfs_remove_groups+0x60/0xa0 fs/sysfs/group.c:338 device_remove_groups drivers/base/core.c:2820 [inline] device_remove_attrs+0x204/0x290 drivers/base/core.c:2956 device_del+0x38e/0x9f0 drivers/base/core.c:3854 unregister_netdevice_many_notify+0x13aa/0x1f30 net/core/dev.c:11923 unregister_netdevice_many net/core/dev.c:11951 [inline] unregister_netdevice_queue+0x307/0x3f0 net/core/dev.c:11821 unregister_netdevice include/linux/netdevice.h:3337 [inline] _cfg80211_unregister_wdev+0x64b/0x830 net/wireless/core.c:1255 ieee80211_remove_interfaces+0x34f/0x720 net/mac80211/iface.c:2306 ieee80211_unregister_hw+0x55/0x3a0 net/mac80211/main.c:1681 mac80211_hwsim_del_radio drivers/net/wireless/virtual/mac80211_hwsim.c:5664 [inline] remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim.c:6464 [inline] mac80211_hwsim_netlink_notify+0x2ec/0x8e0 drivers/net/wireless/virtual/mac80211_hwsim.c:6478 notifier_call_chain+0xb7/0x410 kernel/notifier.c:85 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 netlink_release+0x1838/0x1fe0 net/netlink/af_netlink.c:764 __sock_release+0xb0/0x270 net/socket.c:647 sock_close+0x1c/0x30 net/socket.c:1398 __fput+0x3ff/0xb70 fs/file_table.c:464 __fput_sync+0xa1/0xc0 fs/file_table.c:550 __do_sys_close fs/open.c:1580 [inline] __se_sys_close fs/open.c:1565 [inline] __ia32_sys_close+0x86/0x100 fs/open.c:1565 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #0 (&rdev->wiphy.mtx){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 __dev_open+0x2d4/0x540 net/core/dev.c:1635 dev_open net/core/dev.c:1671 [inline] dev_open+0xf4/0x160 net/core/dev.c:1664 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xaf6/0x2190 drivers/net/team/team_core.c:1988 do_set_master+0x1bc/0x230 net/core/rtnetlink.c:2926 do_setlink.constprop.0+0xb5b/0x3f80 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2573 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2627 __sys_sendmsg+0x16e/0x220 net/socket.c:2659 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e other info that might help us debug this: Chain exists of: &rdev->wiphy.mtx --> dev_addr_sem --> team->team_lock_key#7 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(team->team_lock_key#7); lock(dev_addr_sem); lock(team->team_lock_key#7); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.0.2565/17607: #0: ffffffff8fefa3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fefa3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline] #0: ffffffff8fefa3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x5d9/0x1d60 net/core/rtnetlink.c:4021 #1: ffff88806128ce00 (team->team_lock_key#7){+.+.}-{4:4}, at: team_add_slave+0x9c/0x2190 drivers/net/team/team_core.c:1987 stack backtrace: CPU: 3 UID: 0 PID: 17607 Comm: syz.0.2565 Not tainted 6.14.0-rc7-syzkaller-00196-g88d324e69ea9 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x490/0x760 kernel/locking/lockdep.c:2076 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 __dev_open+0x2d4/0x540 net/core/dev.c:1635 dev_open net/core/dev.c:1671 [inline] dev_open+0xf4/0x160 net/core/dev.c:1664 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xaf6/0x2190 drivers/net/team/team_core.c:1988 do_set_master+0x1bc/0x230 net/core/rtnetlink.c:2926 do_setlink.constprop.0+0xb5b/0x3f80 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2573 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2627 __sys_sendmsg+0x16e/0x220 net/socket.c:2659 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7fa0579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f50c655c EFLAGS: 00000296 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000080000600 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 team0: Port device wlan1 added ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi