netlink: 4 bytes leftover after parsing attributes in process `syz-executor.3'. ====================================================== WARNING: possible circular locking dependency detected 4.14.292-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/11371 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+0x1fd/0x2d0 net/ipv4/netfilter/ip_tables.c:666 __do_replace+0x38d/0x570 net/ipv4/netfilter/ip_tables.c:1086 do_replace net/ipv4/netfilter/ip_tables.c:1142 [inline] do_ipt_set_ctl+0x256/0x3a0 net/ipv4/netfilter/ip_tables.c:1676 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x5f/0xb0 net/netfilter/nf_sockopt.c:115 ip_setsockopt net/ipv4/ip_sockglue.c:1255 [inline] ip_setsockopt+0x94/0xb0 net/ipv4/ip_sockglue.c:1240 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:2454 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:1145 [inline] SYSC_splice fs/splice.c:1400 [inline] SyS_splice+0xd59/0x1380 fs/splice.c:1380 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.3/11371: #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: 1 PID: 11371 Comm: syz-executor.3 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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:2454 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:1145 [inline] SYSC_splice fs/splice.c:1400 [inline] SyS_splice+0xd59/0x1380 fs/splice.c:1380 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f8001cf6279 RSP: 002b:00007f800064a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f8001e09050 RCX: 00007f8001cf6279 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f8001d502e9 R08: 000000000004ffe0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc81b1331f R14: 00007f800064a300 R15: 0000000000022000 F2FS-fs (loop5): Found nat_bits in checkpoint audit: type=1800 audit(1662387782.161:7): pid=11537 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=14018 res=0 F2FS-fs (loop5): sanity_check_inode: inode (ino=3) has corrupted i_extra_isize: 24, max: 12 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1662387782.161:8): pid=11537 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir375676562/syzkaller.ftwE0r/44/file0" dev="sda1" ino=14018 res=1 F2FS-fs (loop5): Failed to read root inode F2FS-fs (loop5): Found nat_bits in checkpoint F2FS-fs (loop5): sanity_check_inode: inode (ino=3) has corrupted i_extra_isize: 24, max: 12 F2FS-fs (loop5): Failed to read root inode audit: type=1800 audit(1662387782.521:9): pid=11575 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=14075 res=0 F2FS-fs (loop5): Found nat_bits in checkpoint EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1662387782.551:10): pid=11575 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir375676562/syzkaller.ftwE0r/45/file0" dev="sda1" ino=14075 res=1 F2FS-fs (loop5): sanity_check_inode: inode (ino=3) has corrupted i_extra_isize: 24, max: 12 F2FS-fs (loop5): Failed to read root inode audit: type=1800 audit(1662387782.561:11): pid=11582 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14079 res=0 audit: type=1804 audit(1662387782.571:12): pid=11582 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2914841745/syzkaller.TbPSRn/50/file0" dev="sda1" ino=14079 res=1 F2FS-fs (loop5): Found nat_bits in checkpoint audit: type=1800 audit(1662387782.821:13): pid=11608 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=14078 res=0 audit: type=1804 audit(1662387782.821:14): pid=11608 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir375676562/syzkaller.ftwE0r/46/file0" dev="sda1" ino=14078 res=1 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue audit: type=1800 audit(1662387782.911:15): pid=11617 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14079 res=0 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1662387782.931:16): pid=11617 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2914841745/syzkaller.TbPSRn/51/file0" dev="sda1" ino=14079 res=1 syz-executor.4 (11628) used greatest stack depth: 24736 bytes left EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue netlink: 45 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 45 bytes leftover after parsing attributes in process `syz-executor.3'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue base_sock_release(ffff88808e214180) sk=ffff88805c7580c0 netlink: 45 bytes leftover after parsing attributes in process `syz-executor.3'. EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue base_sock_release(ffff88808cfcf0c0) sk=ffff8880908f8e00 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. base_sock_release(ffff88808ce84580) sk=ffff88809b3749c0 base_sock_release(ffff88808cf72040) sk=ffff8880a7746000 netlink: 45 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 68 bytes leftover after parsing attributes in process `syz-executor.0'. base_sock_release(ffff88805ac06180) sk=ffff8880988c3740 base_sock_release(ffff88805ac2e900) sk=ffff88809e2448c0 base_sock_release(ffff88808e1ce0c0) sk=ffff88809ef028c0 base_sock_release(ffff88808e28bac0) sk=ffff888096be1300 attempt to access beyond end of device loop1: rw=2049, want=128, limit=15 attempt to access beyond end of device loop1: rw=2049, want=128, limit=15 attempt to access beyond end of device loop1: rw=2049, want=128, limit=15 hub 9-0:1.0: USB hub found hub 9-0:1.0: 8 ports detected attempt to access beyond end of device loop1: rw=2049, want=128, limit=15 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. hub 9-0:1.0: USB hub found hub 9-0:1.0: 8 ports detected netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. PM: Starting manual resume from disk hub 9-0:1.0: USB hub found hub 9-0:1.0: 8 ports detected PM: Image not found (code -6) 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link NILFS (loop1): broken superblock, retrying with spare superblock (blocksize = 1024) bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state NILFS (loop1): mounting unchecked fs bridge0: port 3(team0) entered disabled state NILFS (loop1): recovery complete device team0 entered promiscuous mode NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. syz-executor.3 (12151) used greatest stack depth: 24456 bytes left NILFS (loop1): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop1): mounting unchecked fs NILFS (loop1): recovery complete NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. NILFS (loop1): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop1): mounting unchecked fs NILFS (loop1): recovery complete NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop1): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop1): mounting unchecked fs NILFS (loop1): recovery complete NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 120 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 120 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 120 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 overlayfs: fs on './file0' does not support file handles, falling back to index=off. EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue overlayfs: fs on './file0' does not support file handles, falling back to index=off. EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off.