====================================================== WARNING: possible circular locking dependency detected 4.14.290-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/14031 is trying to acquire lock: ((&strp->work)){+.+.}, at: [] flush_work+0x88/0x770 kernel/workqueue.c:2887 but task is already holding lock: (sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1473 [inline] (sk_lock-AF_INET){+.+.}, at: [] kcm_attach net/kcm/kcmsock.c:1390 [inline] (sk_lock-AF_INET){+.+.}, at: [] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] (sk_lock-AF_INET){+.+.}, at: [] kcm_ioctl+0x328/0xfb0 net/kcm/kcmsock.c:1701 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}: lock_sock_nested+0xb7/0x100 net/core/sock.c:2813 do_strp_work net/strparser/strparser.c:415 [inline] strp_work+0x3e/0x100 net/strparser/strparser.c:434 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #0 ((&strp->work)){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_work+0xad/0x770 kernel/workqueue.c:2890 __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965 strp_done+0x53/0xd0 net/strparser/strparser.c:519 kcm_attach net/kcm/kcmsock.c:1429 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0x828/0xfb0 net/kcm/kcmsock.c:1701 sock_do_ioctl net/socket.c:974 [inline] sock_ioctl+0x2cc/0x4c0 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 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(sk_lock-AF_INET); lock((&strp->work)); lock(sk_lock-AF_INET); lock((&strp->work)); *** DEADLOCK *** 1 lock held by syz-executor.1/14031: #0: (sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1473 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [] kcm_attach net/kcm/kcmsock.c:1390 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [] kcm_ioctl+0x328/0xfb0 net/kcm/kcmsock.c:1701 stack backtrace: CPU: 0 PID: 14031 Comm: syz-executor.1 Not tainted 4.14.290-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/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 flush_work+0xad/0x770 kernel/workqueue.c:2890 __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965 strp_done+0x53/0xd0 net/strparser/strparser.c:519 kcm_attach net/kcm/kcmsock.c:1429 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0x828/0xfb0 net/kcm/kcmsock.c:1701 sock_do_ioctl net/socket.c:974 [inline] sock_ioctl+0x2cc/0x4c0 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f5181e8d279 RSP: 002b:00007f51807c0168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5181fa0120 RCX: 00007f5181e8d279 RDX: 0000000020000040 RSI: 00000000000089e0 RDI: 0000000000000003 RBP: 00007f5181ee7189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe16e4ffff R14: 00007f51807c0300 R15: 0000000000022000 device lo entered promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.088:108): pid=14000 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.3" name="file1" dev="loop3" ino=5 res=0 SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.508:109): pid=14115 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.3" name="file1" dev="loop3" ino=5 res=0 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.538:110): pid=14116 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.5" name="file1" dev="loop5" ino=5 res=0 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.728:111): pid=14148 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.0" name="file1" dev="loop0" ino=5 res=0 SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.798:112): pid=14124 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.2" name="file1" dev="loop2" ino=5 res=0 SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069049.928:113): pid=14143 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.1" name="file1" dev="loop1" ino=5 res=0 SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069050.038:114): pid=14171 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.4" name="file1" dev="loop4" ino=5 res=0 audit: type=1800 audit(1661069050.068:115): pid=14151 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.3" name="file1" dev="loop3" ino=5 res=0 SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f 9pnet: Insufficient options for proto=fd SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1661069050.528:116): pid=14241 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed" comm="syz-executor.5" name="file1" dev="loop5" ino=5 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. 9pnet: Insufficient options for proto=fd netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. print_req_error: I/O error, dev loop4, sector 0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. 9pnet: Insufficient options for proto=fd netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. x_tables: ip_tables: socket match: used from hooks OUTPUT, but only valid from PREROUTING/INPUT netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. x_tables: ip_tables: socket match: used from hooks OUTPUT, but only valid from PREROUTING/INPUT x_tables: ip_tables: socket match: used from hooks OUTPUT, but only valid from PREROUTING/INPUT Zero length message leads to an empty skb : renamed from caif0 chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT audit: type=1800 audit(1661069055.208:117): pid=14790 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=14234 res=0 chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. audit: type=1800 audit(1661069055.808:118): pid=14816 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=14213 res=0 audit: type=1800 audit(1661069055.848:119): pid=14817 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14094 res=0 nla_parse: 2491 callbacks suppressed netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1800 audit(1661069055.908:120): pid=14835 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=14233 res=0 chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 84 bytes leftover after parsing attributes in process `syz-executor.1'. unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1