====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:4/9299 is trying to acquire lock: 00000000d0b08900 (&sb->s_type->i_mutex_key#13){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000d0b08900 (&sb->s_type->i_mutex_key#13){+.+.}, at: __sock_release+0x86/0x2a0 net/socket.c:578 but task is already holding lock: 00000000c20d192d ((delayed_fput_work).work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 ((delayed_fput_work).work){+.+.}: worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #2 ((wq_completion)"events"){+.+.}: flush_scheduled_work include/linux/workqueue.h:599 [inline] tipc_exit_net+0x38/0x60 net/tipc/core.c:100 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #1 (pernet_ops_rwsem){++++}: unregister_netdevice_notifier+0x7b/0x330 net/core/dev.c:1708 raw_release+0x58/0x820 net/can/raw.c:358 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sb->s_type->i_mutex_key#13){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __sock_release+0x86/0x2a0 net/socket.c:578 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 delayed_fput+0x56/0x70 fs/file_table.c:304 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#13 --> (wq_completion)"events" --> (delayed_fput_work).work Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((delayed_fput_work).work); lock((wq_completion)"events"); lock((delayed_fput_work).work); lock(&sb->s_type->i_mutex_key#13); *** DEADLOCK *** 2 locks held by kworker/0:4/9299: #0: 000000008e6432cc ((wq_completion)"events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 00000000c20d192d ((delayed_fput_work).work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 stack backtrace: CPU: 0 PID: 9299 Comm: kworker/0:4 Not tainted 4.19.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events delayed_fput Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __sock_release+0x86/0x2a0 net/socket.c:578 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 delayed_fput+0x56/0x70 fs/file_table.c:304 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'. EXT4-fs (loop1): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop1): corrupt root inode, run e2fsck EXT4-fs (loop1): mount failed EXT4-fs (loop1): mounting ext2 file system using the ext4 subsystem FAT-fs (loop5): bogus number of reserved sectors FAT-fs (loop5): Can't find a valid FAT filesystem EXT4-fs (loop1): corrupt root inode, run e2fsck EXT4-fs (loop1): mount failed Possible attack attempt. Unexpected rseq signature 0x240025, expecting 0x0 (pid=12786, addr=0000000022d35ff1). Possible attack attempt. Unexpected rseq signature 0x240025, expecting 0x0 (pid=12789, addr=0000000022d35ff1). Possible attack attempt. Unexpected rseq signature 0x240025, expecting 0x0 (pid=12789, addr=0000000022d35ff1). EXT4-fs (loop1): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop1): corrupt root inode, run e2fsck Possible attack attempt. Unexpected rseq signature 0x240025, expecting 0x0 (pid=12789, addr=0000000022d35ff1). EXT4-fs (loop1): mount failed EXT4-fs (loop1): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop1): corrupt root inode, run e2fsck EXT4-fs (loop1): mount failed sd 0:0:1:0: device reset syz-executor.2: vmalloc: allocation failure: 8589934608 bytes, mode:0x6080c0(GFP_KERNEL|__GFP_ZERO), nodemask=(null) sd 0:0:1:0: device reset syz-executor.2 cpuset=/ mems_allowed=0-1 CPU: 1 PID: 12898 Comm: syz-executor.2 Not tainted 4.19.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 warn_alloc.cold+0x7b/0x18f mm/page_alloc.c:3457 sd 0:0:1:0: device reset __vmalloc_node_range mm/vmalloc.c:1775 [inline] __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vzalloc+0x15c/0x1a0 mm/vmalloc.c:1857 ip_set_alloc+0x8a/0xd0 net/netfilter/ipset/ip_set_core.c:265 hash_ip_create+0x49d/0xec0 net/netfilter/ipset/ip_set_hash_gen.h:1286 ip_set_create+0x6b4/0x1370 net/netfilter/ipset/ip_set_core.c:941 nfnetlink_rcv_msg+0xc4f/0xf60 net/netfilter/nfnetlink.c:233 sd 0:0:1:0: device reset netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2457 nfnetlink_rcv+0x1b2/0x420 net/netfilter/nfnetlink.c:565 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115 __sys_sendmsg net/socket.c:2153 [inline] __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2160 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 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:00007f55ee0e3188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd9761804f R14: 00007f55ee0e3300 R15: 0000000000022000 Mem-Info: active_anon:262391 inactive_anon:8462 isolated_anon:0 active_file:5990 inactive_file:42116 isolated_file:0 unevictable:5 dirty:168 writeback:0 unstable:0 slab_reclaimable:18904 slab_unreclaimable:127140 mapped:63726 shmem:10703 pagetables:2133 bounce:0 free:1165532 free_pcp:677 free_cma:0 Node 0 active_anon:1049564kB inactive_anon:33848kB active_file:23840kB inactive_file:168464kB unevictable:20kB isolated(anon):0kB isolated(file):0kB mapped:254904kB dirty:672kB writeback:0kB shmem:42812kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 952320kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 1 active_anon:0kB inactive_anon:0kB active_file:120kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 0 DMA free:15908kB min:204kB low:252kB high:300kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 2693 2695 2695 2695 Node 0 DMA32 free:605600kB min:35996kB low:44992kB high:53988kB active_anon:1049564kB inactive_anon:33848kB active_file:23840kB inactive_file:168464kB unevictable:20kB writepending:672kB present:3129332kB managed:2763460kB mlocked:16kB kernel_stack:8896kB pagetables:8532kB bounce:0kB free_pcp:2696kB local_pcp:1280kB free_cma:0kB lowmem_reserve[]: 0 0 1 1 1 Node 0 Normal free:8kB min:24kB low:28kB high:32kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:1048576kB managed:2000kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 1 Normal free:4040924kB min:53876kB low:67344kB high:80812kB active_anon:0kB inactive_anon:0kB active_file:120kB inactive_file:0kB unevictable:0kB writepending:0kB present:4194304kB managed:4128248kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB Node 0 DMA32: 7554*4kB (UME) 348*8kB (UME) 155*16kB (UME) 69*32kB (UME) 67*64kB (UME) 23*128kB (UM) 16*256kB (UME) 4*512kB (UME) 7*1024kB (UM) 2*2048kB (M) 133*4096kB (M) = 607096kB Node 0 Normal: 0*4kB 1*8kB (U) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 8kB Node 1 Normal: 101*4kB (UME) 393*8kB (UME) 272*16kB (UME) 86*32kB (UME) 31*64kB (UME) 13*128kB (UM) 9*256kB (U) 8*512kB (UM) 4*1024kB (UME) 1*2048kB (U) 980*4096kB (M) = 4040924kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 57810 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 2097051 pages RAM 0 pages HighMem/MovableOnly 369647 pages reserved 0 pages cma reserved syz-executor.2: vmalloc: allocation failure: 8589934608 bytes, mode:0x6080c0(GFP_KERNEL|__GFP_ZERO), nodemask=(null) syz-executor.2 cpuset=/ mems_allowed=0-1 CPU: 0 PID: 12898 Comm: syz-executor.2 Not tainted 4.19.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 warn_alloc.cold+0x7b/0x18f mm/page_alloc.c:3457 __vmalloc_node_range mm/vmalloc.c:1775 [inline] __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vzalloc+0x15c/0x1a0 mm/vmalloc.c:1857 ip_set_alloc+0x8a/0xd0 net/netfilter/ipset/ip_set_core.c:265 hash_ip_create+0x49d/0xec0 net/netfilter/ipset/ip_set_hash_gen.h:1286 ip_set_create+0x6b4/0x1370 net/netfilter/ipset/ip_set_core.c:941 nfnetlink_rcv_msg+0xc4f/0xf60 net/netfilter/nfnetlink.c:233 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2457 nfnetlink_rcv+0x1b2/0x420 net/netfilter/nfnetlink.c:565 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115 __sys_sendmsg net/socket.c:2153 [inline] __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2160 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 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:00007f55ee0e3188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd9761804f R14: 00007f55ee0e3300 R15: 0000000000022000 sd 0:0:1:0: device reset IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready MTD: Attempt to mount non-MTD device "/dev/loop4" IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready romfs: Mounting image 'rom 5f663c08' through the block layer IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer audit: type=1804 audit(1624928626.939:10): pid=13060 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name=2F726F6F742F73797A6B616C6C65722D746573746469723136333839353435312F73797A6B616C6C65722E4179626B346D2F3134332F7F454C4602010103 dev="sda1" ino=14181 res=1 audit: type=1804 audit(1624928627.009:11): pid=13078 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir852116586/syzkaller.wkAARd/151/bus" dev="sda1" ino=14225 res=1 audit: type=1804 audit(1624928627.109:12): pid=13089 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir852116586/syzkaller.wkAARd/151/bus" dev="sda1" ino=14225 res=1 vlan0: mtu greater than device maximum MTD: Attempt to mount non-MTD device "/dev/loop1" romfs: VFS: Can't find a romfs filesystem on dev loop1. netlink: 'syz-executor.2': attribute type 1 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): bond1: link is not ready 8021q: adding VLAN 0 to HW filter on device bond1 bond1: The slave device specified does not support setting the MAC address netlink: 'syz-executor.2': attribute type 1 has an invalid length. bond2 (uninitialized): Released all slaves netlink: 'syz-executor.2': attribute type 1 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): bond2: link is not ready 8021q: adding VLAN 0 to HW filter on device bond2 bond2: The slave device specified does not support setting the MAC address netlink: 'syz-executor.2': attribute type 1 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): bond3: link is not ready 8021q: adding VLAN 0 to HW filter on device bond3 bond3: The slave device specified does not support setting the MAC address ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 netlink: 'syz-executor.2': attribute type 1 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): bond4: link is not ready 8021q: adding VLAN 0 to HW filter on device bond4 bond4: The slave device specified does not support setting the MAC address MTD: Attempt to mount non-MTD device "/dev/loop1" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop1" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop1" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop1" romfs: Mounting image 'rom 5f663c08' through the block layer