device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. ====================================================== WARNING: possible circular locking dependency detected 4.14.277-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/11712 is trying to acquire lock: (&xt[i].mutex){+.+.}, at: [] xt_find_target+0x3e/0x1e0 net/netfilter/x_tables.c:232 but task is already holding lock: (rtnl_mutex){+.+.}, at: [] rtnl_lock net/core/rtnetlink.c:72 [inline] (rtnl_mutex){+.+.}, at: [] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4317 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 unregister_netdevice_notifier+0x5e/0x2b0 net/core/dev.c:1630 tee_tg_destroy+0x5c/0xb0 net/netfilter/xt_TEE.c:123 cleanup_entry+0x232/0x310 net/ipv6/netfilter/ip6_tables.c:685 __do_replace+0x38d/0x580 net/ipv6/netfilter/ip6_tables.c:1106 do_replace net/ipv6/netfilter/ip6_tables.c:1162 [inline] do_ip6t_set_ctl+0x256/0x3b0 net/ipv6/netfilter/ip6_tables.c:1688 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x5f/0xb0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0xc0/0x120 net/ipv6/ipv6_sockglue.c:937 tcp_setsockopt+0x7b/0xc0 net/ipv4/tcp.c:2830 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&xt[i].mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 xt_find_target+0x3e/0x1e0 net/netfilter/x_tables.c:232 xt_request_find_target net/netfilter/x_tables.c:261 [inline] xt_request_find_target+0x72/0xe0 net/netfilter/x_tables.c:254 ipt_init_target+0xb9/0x250 net/sched/act_ipt.c:45 __tcf_ipt_init+0x48d/0xc00 net/sched/act_ipt.c:168 tcf_xt_init+0x43/0x50 net/sched/act_ipt.c:210 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:691 tcf_action_init+0x26d/0x400 net/sched/act_api.c:760 tcf_action_add net/sched/act_api.c:1088 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1140 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2455 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 sock_no_sendpage+0xe2/0x110 net/core/sock.c:2610 kernel_sendpage net/socket.c:3407 [inline] sock_sendpage+0xdf/0x140 net/socket.c:871 pipe_to_sendpage+0x226/0x2d0 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x326/0x7a0 fs/splice.c:626 splice_from_pipe fs/splice.c:661 [inline] generic_splice_sendpage+0xc1/0x110 fs/splice.c:832 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xd59/0x1380 fs/splice.c:1382 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&xt[i].mutex); lock(rtnl_mutex); lock(&xt[i].mutex); *** DEADLOCK *** 2 locks held by syz-executor.2/11712: #0: (&pipe->mutex/1){+.+.}, at: [] pipe_lock_nested fs/pipe.c:82 [inline] #0: (&pipe->mutex/1){+.+.}, at: [] pipe_lock+0x58/0x70 fs/pipe.c:90 #1: (rtnl_mutex){+.+.}, at: [] rtnl_lock net/core/rtnetlink.c:72 [inline] #1: (rtnl_mutex){+.+.}, at: [] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4317 stack backtrace: CPU: 0 PID: 11712 Comm: syz-executor.2 Not tainted 4.14.277-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 xt_find_target+0x3e/0x1e0 net/netfilter/x_tables.c:232 xt_request_find_target net/netfilter/x_tables.c:261 [inline] xt_request_find_target+0x72/0xe0 net/netfilter/x_tables.c:254 ipt_init_target+0xb9/0x250 net/sched/act_ipt.c:45 __tcf_ipt_init+0x48d/0xc00 net/sched/act_ipt.c:168 tcf_xt_init+0x43/0x50 net/sched/act_ipt.c:210 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:691 tcf_action_init+0x26d/0x400 net/sched/act_api.c:760 tcf_action_add net/sched/act_api.c:1088 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1140 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2455 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 sock_no_sendpage+0xe2/0x110 net/core/sock.c:2610 kernel_sendpage net/socket.c:3407 [inline] sock_sendpage+0xdf/0x140 net/socket.c:871 pipe_to_sendpage+0x226/0x2d0 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x326/0x7a0 fs/splice.c:626 splice_from_pipe fs/splice.c:661 [inline] generic_splice_sendpage+0xc1/0x110 fs/splice.c:832 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xd59/0x1380 fs/splice.c:1382 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7feb8cbbc0e9 RSP: 002b:00007feb8b510168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007feb8cccf030 RCX: 00007feb8cbbc0e9 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007feb8cc1608d R08: 000000000004ffe0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffedb9d90ef R14: 00007feb8b510300 R15: 0000000000022000 device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state EXT4-fs error (device loop5): ext4_ext_check_inode:510: inode #3: comm syz-executor.5: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 2, max 4(4), depth 0(0) EXT4-fs error (device loop5): ext4_quota_enable:5739: comm syz-executor.5: Bad quota inode # 3 device team0 entered promiscuous mode EXT4-fs warning (device loop5): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-117). Please run e2fsck to fix. device team_slave_0 entered promiscuous mode EXT4-fs (loop5): mount failed device team_slave_1 entered promiscuous mode bond1: Enslaving bridge1 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond1 bond0: Enslaving bond1 as an active interface with an up link netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. syz-executor.4 (11727) used greatest stack depth: 23952 bytes left EXT4-fs error (device loop5): ext4_ext_check_inode:510: inode #3: comm syz-executor.5: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 2, max 4(4), depth 0(0) EXT4-fs error (device loop5): ext4_quota_enable:5739: comm syz-executor.5: Bad quota inode # 3 EXT4-fs warning (device loop5): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-117). Please run e2fsck to fix. bond2: Enslaving bridge2 as an active interface with an up link EXT4-fs (loop5): mount failed device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 8021q: adding VLAN 0 to HW filter on device team0 EXT4-fs error (device loop5): ext4_ext_check_inode:510: inode #3: comm syz-executor.5: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 2, max 4(4), depth 0(0) EXT4-fs error (device loop5): ext4_quota_enable:5739: comm syz-executor.5: Bad quota inode # 3 EXT4-fs warning (device loop5): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-117). Please run e2fsck to fix. bond0: Enslaving team0 as an active interface with an up link EXT4-fs (loop5): mount failed 8021q: adding VLAN 0 to HW filter on device bond2 bond0: Enslaving bond2 as an active interface with an up link bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode netlink: 12 bytes leftover after parsing attributes in process `syz-executor.1'. EXT4-fs error (device loop5): ext4_ext_check_inode:510: inode #3: comm syz-executor.5: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 2, max 4(4), depth 0(0) bond1: Enslaving bridge1 as an active interface with an up link EXT4-fs error (device loop5): ext4_quota_enable:5739: comm syz-executor.5: Bad quota inode # 3 8021q: adding VLAN 0 to HW filter on device bond1 syz-executor.4 (11856) used greatest stack depth: 23872 bytes left bond0: Enslaving bond1 as an active interface with an up link EXT4-fs warning (device loop5): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-117). Please run e2fsck to fix. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. EXT4-fs (loop5): mount failed bond3: Enslaving bridge3 as an active interface with an up link device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond3 bond0: Enslaving bond3 as an active interface with an up link netlink: 12 bytes leftover after parsing attributes in process `syz-executor.1'. bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode bond2: Enslaving bridge2 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond2 bond0: Enslaving bond2 as an active interface with an up link netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. bond4: Enslaving bridge4 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond4 bond0: Enslaving bond4 as an active interface with an up link netlink: 12 bytes leftover after parsing attributes in process `syz-executor.1'. bond3: Enslaving bridge3 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond3 bond0: Enslaving bond3 as an active interface with an up link UBIFS error (pid: 12420): cannot open "ubi0", error -19 UBIFS error (pid: 12438): cannot open "ubi0", error -19 UBIFS error (pid: 12459): cannot open "ubi0", error -19 audit: type=1800 audit(1651750261.017:27): pid=12465 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="loop2" ino=8 res=0 attempt to access beyond end of device loop2: rw=2049, want=120, limit=16 UBIFS error (pid: 12487): cannot open "ubi0", error -19 attempt to access beyond end of device loop2: rw=1, want=128, limit=16 audit: type=1800 audit(1651750263.587:28): pid=12528 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=14268 res=0 audit: type=1800 audit(1651750263.867:29): pid=12523 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="loop3" ino=9 res=0 audit: type=1800 audit(1651750263.957:30): pid=12527 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="sda1" ino=14275 res=0 audit: type=1800 audit(1651750263.957:31): pid=12541 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="loop2" ino=10 res=0 attempt to access beyond end of device attempt to access beyond end of device loop3: rw=2049, want=128, limit=16 loop2: rw=2049, want=128, limit=16 audit: type=1800 audit(1651750264.057:32): pid=12553 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=14286 res=0