netlink: 'syz.4.1827': attribute type 10 has an invalid length. ====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc7-syzkaller-00205-g586de92313fc #0 Not tainted ------------------------------------------------------ syz.4.1827/16775 is trying to acquire lock: ffff88807ec08768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ffff88807ec08768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_open+0xe9/0x1e0 net/mac80211/iface.c:445 but task is already holding lock: ffff88807cb94e00 (team->team_lock_key#36){+.+.}-{4:4}, at: team_add_slave+0xb3/0x28a0 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#36){+.+.}-{4:4}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 team_set_mac_address+0x122/0x280 drivers/net/team/team_core.c:1816 dev_set_mac_address+0x327/0x510 net/core/dev.c:9515 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9534 do_setlink+0x784/0x4300 net/core/rtnetlink.c:3073 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1704/0x1d30 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 __sys_sendto+0x363/0x4c0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2190 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (dev_addr_sem){++++}-{4:4}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1524 address_show+0x25/0x250 net/core/net-sysfs.c:184 dev_attr_show+0x55/0xc0 drivers/base/core.c:2424 sysfs_kf_seq_show+0x331/0x4c0 fs/sysfs/file.c:59 seq_read_iter+0x43f/0xd70 fs/seq_file.c:230 new_sync_read fs/read_write.c:484 [inline] vfs_read+0x975/0xb40 fs/read_write.c:565 ksys_read+0x18f/0x2b0 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (kn->active#29){++++}-{0:0}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 kernfs_drain+0x31c/0x6d0 fs/kernfs/dir.c:500 __kernfs_remove+0x400/0x870 fs/kernfs/dir.c:1487 kernfs_remove_by_name_ns+0xdc/0x160 fs/kernfs/dir.c:1695 kernfs_remove_by_name include/linux/kernfs.h:625 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfe/0x2c0 fs/sysfs/group.c:322 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:346 device_remove_groups drivers/base/core.c:2820 [inline] device_remove_attrs+0x23a/0x290 drivers/base/core.c:2956 device_del+0x572/0x9b0 drivers/base/core.c:3854 unregister_netdevice_many_notify+0x19b4/0x1f10 net/core/dev.c:11923 unregister_netdevice_many net/core/dev.c:11951 [inline] unregister_netdevice_queue+0x303/0x370 net/core/dev.c:11821 unregister_netdevice include/linux/netdevice.h:3337 [inline] _cfg80211_unregister_wdev+0x163/0x590 net/wireless/core.c:1255 ieee80211_remove_interfaces+0x4ef/0x700 net/mac80211/iface.c:2306 ieee80211_unregister_hw+0x5d/0x2c0 net/mac80211/main.c:1681 mac80211_hwsim_del_radio+0x2c4/0x4c0 drivers/net/wireless/virtual/mac80211_hwsim.c:5664 remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim.c:6464 [inline] mac80211_hwsim_netlink_notify+0x5de/0x930 drivers/net/wireless/virtual/mac80211_hwsim.c:6478 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 blocking_notifier_call_chain+0x69/0x90 kernel/notifier.c:380 netlink_release+0x11ce/0x1b20 net/netlink/af_netlink.c:764 __sock_release net/socket.c:647 [inline] sock_close+0xbc/0x240 net/socket.c:1398 __fput+0x3e9/0x9f0 fs/file_table.c:464 task_work_run+0x24f/0x310 kernel/task_work.c:227 get_signal+0x15d1/0x1720 kernel/signal.c:2809 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #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+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0xe9/0x1e0 net/mac80211/iface.c:445 __dev_open+0x2d3/0x4a0 net/core/dev.c:1635 dev_open+0xae/0x1b0 net/core/dev.c:1671 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xabe/0x28a0 drivers/net/team/team_core.c:1988 do_set_master net/core/rtnetlink.c:2926 [inline] do_setlink+0xe7f/0x4300 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1704/0x1d30 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 ____sys_sendmsg+0x53a/0x860 net/socket.c:2573 ___sys_sendmsg net/socket.c:2627 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2659 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &rdev->wiphy.mtx --> dev_addr_sem --> team->team_lock_key#36 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(team->team_lock_key#36); lock(dev_addr_sem); lock(team->team_lock_key#36); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.4.1827/16775: #0: ffffffff8fec3c48 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fec3c48 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline] #0: ffffffff8fec3c48 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0xc55/0x1d30 net/core/rtnetlink.c:4021 #1: ffff88807cb94e00 (team->team_lock_key#36){+.+.}-{4:4}, at: team_add_slave+0xb3/0x28a0 drivers/net/team/team_core.c:1987 stack backtrace: CPU: 0 UID: 0 PID: 16775 Comm: syz.4.1827 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2076 check_noncircular+0x36a/0x4a0 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+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0xe9/0x1e0 net/mac80211/iface.c:445 __dev_open+0x2d3/0x4a0 net/core/dev.c:1635 dev_open+0xae/0x1b0 net/core/dev.c:1671 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xabe/0x28a0 drivers/net/team/team_core.c:1988 do_set_master net/core/rtnetlink.c:2926 [inline] do_setlink+0xe7f/0x4300 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1704/0x1d30 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 ____sys_sendmsg+0x53a/0x860 net/socket.c:2573 ___sys_sendmsg net/socket.c:2627 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2659 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7ed078d169 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7ece1f4038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7ed09a6240 RCX: 00007f7ed078d169 RDX: 0000000000000000 RSI: 0000200000000600 RDI: 0000000000000003 RBP: 00007f7ed080e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f7ed09a6240 R15: 00007ffe6c893dc8 team0: Port device wlan1 added