====================================================== WARNING: possible circular locking dependency detected 4.14.290-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/11519 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.3/11519: #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: 1 PID: 11519 Comm: syz-executor.3 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:0x7f9b4d8b9279 RSP: 002b:00007f9b4c22e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f9b4d9cbf80 RCX: 00007f9b4d8b9279 RDX: 0000000020000300 RSI: 00000000000089e0 RDI: 0000000000000003 RBP: 00007f9b4d913189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc704a3d4f R14: 00007f9b4c22e300 R15: 0000000000022000 audit: type=1804 audit(1660260781.353:9): pid=11539 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/64/bus" dev="sda1" ino=14013 res=1 audit: type=1800 audit(1660260781.353:10): pid=11539 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14013 res=0 gfs2: fsid=_dev_ptmx: Trying to join cluster "lock_nolock", "_dev_ptmx" gfs2: fsid=_dev_ptmx: Now mounting FS... gfs2: fsid=_dev_ptmx: can't read superblock: -22 ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' audit: type=1804 audit(1660260782.153:11): pid=11581 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3875998291/syzkaller.F4d8s3/70/bus" dev="sda1" ino=14122 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. gfs2: fsid=_dev_ptmx: Trying to join cluster "lock_nolock", "_dev_ptmx" gfs2: fsid=_dev_ptmx: Now mounting FS... gfs2: fsid=_dev_ptmx: can't read superblock: -22 kvm: emulating exchange as write audit: type=1804 audit(1660260782.343:12): pid=11616 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir3875998291/syzkaller.F4d8s3/70/bus" dev="sda1" ino=14122 res=1 ieee80211 phy2: hwaddr 02:00:00:00:02:00 registered gfs2: fsid=_dev_ptmx: Trying to join cluster "lock_nolock", "_dev_ptmx" gfs2: fsid=_dev_ptmx: Now mounting FS... gfs2: fsid=_dev_ptmx: can't read superblock: -22 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. gfs2: fsid=_dev_ptmx: Trying to join cluster "lock_nolock", "_dev_ptmx" gfs2: fsid=_dev_ptmx: Now mounting FS... gfs2: fsid=_dev_ptmx: can't read superblock: -22 ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ieee80211 phy3: hwaddr 02:00:00:00:03:00 registered kauditd_printk_skb: 7 callbacks suppressed audit: type=1804 audit(1660260783.733:20): pid=11707 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir2922809859/syzkaller.INokcr/97/bus" dev="sda1" ino=14013 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260783.813:21): pid=11714 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3875998291/syzkaller.F4d8s3/73/bus" dev="sda1" ino=14151 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260783.823:22): pid=11713 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/70/bus" dev="sda1" ino=14156 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ieee80211 phy4: Selected rate control algorithm 'minstrel_ht' audit: type=1804 audit(1660260783.873:23): pid=11717 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir2922809859/syzkaller.INokcr/97/bus" dev="sda1" ino=14013 res=1 ieee80211 phy4: hwaddr 02:00:00:00:04:00 registered audit: type=1804 audit(1660260783.943:24): pid=11725 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/70/bus" dev="sda1" ino=14156 res=1 unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 audit: type=1804 audit(1660260783.943:25): pid=11722 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir3875998291/syzkaller.F4d8s3/73/bus" dev="sda1" ino=14151 res=1 audit: type=1804 audit(1660260784.023:26): pid=11728 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir2922809859/syzkaller.INokcr/98/bus" dev="sda1" ino=14158 res=1 audit: type=1804 audit(1660260784.133:27): pid=11735 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/71/bus" dev="sda1" ino=14145 res=1 audit: type=1804 audit(1660260785.173:28): pid=11738 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir2922809859/syzkaller.INokcr/98/bus" dev="sda1" ino=14158 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260785.283:29): pid=11759 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/71/bus" dev="sda1" ino=14145 res=1 ieee80211 phy5: Selected rate control algorithm 'minstrel_ht' TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260788.423:30): pid=11803 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/72/bus" dev="sda1" ino=14168 res=1 ieee80211 phy5: hwaddr 02:00:00:00:05:00 registered TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260788.783:31): pid=11800 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir1279202445/syzkaller.QsjjI5/69/bus" dev="sda1" ino=14167 res=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1660260789.203:32): pid=11815 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir1279202445/syzkaller.QsjjI5/69/bus" dev="sda1" ino=14167 res=1 audit: type=1804 audit(1660260789.293:33): pid=11832 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/73/bus" dev="sda1" ino=14141 res=1 audit: type=1804 audit(1660260789.373:34): pid=11832 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/73/bus" dev="sda1" ino=14141 res=1 FAT-fs (loop4): bogus number of reserved sectors FAT-fs (loop4): Can't find a valid FAT filesystem audit: type=1804 audit(1660260789.423:35): pid=11841 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir1279202445/syzkaller.QsjjI5/70/bus" dev="sda1" ino=14171 res=1 audit: type=1804 audit(1660260789.473:36): pid=11843 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2323452092/syzkaller.26l1Qy/74/bus" dev="sda1" ino=14162 res=1 FAT-fs (loop4): bogus number of reserved sectors FAT-fs (loop4): Can't find a valid FAT filesystem FAT-fs (loop0): bogus number of reserved sectors FAT-fs (loop0): Can't find a valid FAT filesystem FAT-fs (loop4): bogus number of reserved sectors FAT-fs (loop4): Can't find a valid FAT filesystem FAT-fs (loop0): bogus number of reserved sectors FAT-fs (loop5): bogus number of reserved sectors FAT-fs (loop0): Can't find a valid FAT filesystem FAT-fs (loop5): Can't find a valid FAT filesystem