====================================================== WARNING: possible circular locking dependency detected 5.14.0-rc3-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/31482 is trying to acquire lock: ffffffff8d0a9068 (br_ioctl_mutex){+.+.}-{3:3}, at: br_ioctl_call+0x3b/0xa0 net/socket.c:1090 but task is already holding lock: ffffffff8d0cb268 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x1a7/0xee0 net/core/dev_ioctl.c:579 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:959 [inline] __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104 register_netdev+0x11/0x50 net/core/dev.c:10500 br_add_bridge+0x97/0xf0 net/bridge/br_if.c:459 br_ioctl_stub+0x750/0x7f0 net/bridge/br_ioctl.c:390 br_ioctl_call+0x5e/0xa0 net/socket.c:1092 sock_ioctl+0x30c/0x640 net/socket.c:1186 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (br_ioctl_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __mutex_lock_common kernel/locking/mutex.c:959 [inline] __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104 br_ioctl_call+0x3b/0xa0 net/socket.c:1090 dev_ifsioc+0xc1f/0xf60 net/core/dev_ioctl.c:382 dev_ioctl+0x1b9/0xee0 net/core/dev_ioctl.c:580 sock_do_ioctl+0x18b/0x210 net/socket.c:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(br_ioctl_mutex); lock(rtnl_mutex); lock(br_ioctl_mutex); *** DEADLOCK *** 1 lock held by syz-executor.3/31482: #0: ffffffff8d0cb268 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x1a7/0xee0 net/core/dev_ioctl.c:579 stack backtrace: CPU: 1 PID: 31482 Comm: syz-executor.3 Not tainted 5.14.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2131 check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __mutex_lock_common kernel/locking/mutex.c:959 [inline] __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104 br_ioctl_call+0x3b/0xa0 net/socket.c:1090 dev_ifsioc+0xc1f/0xf60 net/core/dev_ioctl.c:382 dev_ioctl+0x1b9/0xee0 net/core/dev_ioctl.c:580 sock_do_ioctl+0x18b/0x210 net/socket.c:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f39b28d9188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000020000040 RSI: 00000000000089a2 RDI: 0000000000000005 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe3b64b40f R14: 00007f39b28d9300 R15: 0000000000022000 general protection fault, probably for non-canonical address 0xdffffc00000000f3: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000798-0x000000000000079f] CPU: 1 PID: 31482 Comm: syz-executor.3 Not tainted 5.14.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:read_pnet include/net/net_namespace.h:329 [inline] RIP: 0010:dev_net include/linux/netdevice.h:2439 [inline] RIP: 0010:add_del_if+0x57/0x140 net/bridge/br_ioctl.c:85 Code: 03 80 3c 02 00 0f 85 fd 00 00 00 48 8b 9d 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 98 05 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 00 00 00 4c 8b ab 98 05 00 00 48 b8 00 00 00 RSP: 0018:ffffc9000269fa80 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000200 RCX: ffffc900182b8000 RDX: 00000000000000f3 RSI: ffffffff87f75586 RDI: 0000000000000798 RBP: ffff888082ff0c00 R08: 00000000000089a2 R09: ffffffff87f76d06 R10: ffffffff87f76e01 R11: 00000000000089a2 R12: 0000000000000001 R13: ffffc9000269fd60 R14: 00000000a09b25c9 R15: dffffc0000000000 FS: 00007f39b28d9700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000052f5f0 CR3: 0000000097338000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: br_ioctl_stub+0x1c6/0x7f0 net/bridge/br_ioctl.c:397 br_ioctl_call+0x5e/0xa0 net/socket.c:1092 dev_ifsioc+0xc1f/0xf60 net/core/dev_ioctl.c:382 dev_ioctl+0x1b9/0xee0 net/core/dev_ioctl.c:580 sock_do_ioctl+0x18b/0x210 net/socket.c:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f39b28d9188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000020000040 RSI: 00000000000089a2 RDI: 0000000000000005 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe3b64b40f R14: 00007f39b28d9300 R15: 0000000000022000 Modules linked in: ---[ end trace eb6e912d03f1e748 ]--- RIP: 0010:read_pnet include/net/net_namespace.h:329 [inline] RIP: 0010:dev_net include/linux/netdevice.h:2439 [inline] RIP: 0010:add_del_if+0x57/0x140 net/bridge/br_ioctl.c:85 Code: 03 80 3c 02 00 0f 85 fd 00 00 00 48 8b 9d 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 98 05 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 00 00 00 4c 8b ab 98 05 00 00 48 b8 00 00 00 RSP: 0018:ffffc9000269fa80 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000200 RCX: ffffc900182b8000 RDX: 00000000000000f3 RSI: ffffffff87f75586 RDI: 0000000000000798 RBP: ffff888082ff0c00 R08: 00000000000089a2 R09: ffffffff87f76d06 R10: ffffffff87f76e01 R11: 00000000000089a2 R12: 0000000000000001 R13: ffffc9000269fd60 R14: 00000000a09b25c9 R15: dffffc0000000000 FS: 00007f39b28d9700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005570cd01f458 CR3: 0000000097338000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600