====================================================== WARNING: possible circular locking dependency detected 4.14.181-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/14220 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.}, at: [] lock_trace+0x3f/0xc0 fs/proc/base.c:407 but task is already holding lock: (&p->lock){+.+.}, at: [] seq_read+0xba/0x1130 fs/seq_file.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&p->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 seq_read+0xba/0x1130 fs/seq_file.c:165 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x41d/0x870 fs/splice.c:416 do_splice_to+0xfb/0x150 fs/splice.c:880 splice_direct_to_actor+0x20a/0x730 fs/splice.c:952 do_splice_direct+0x164/0x210 fs/splice.c:1061 do_sendfile+0x469/0xaf0 fs/read_write.c:1441 SYSC_sendfile64 fs/read_write.c:1502 [inline] SyS_sendfile64+0xff/0x110 fs/read_write.c:1488 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #3 (sb_writers#3){.+.+}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x1a1/0x2e0 fs/super.c:1363 sb_start_write include/linux/fs.h:1549 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_do_remove+0x65/0xb00 fs/overlayfs/dir.c:759 vfs_rmdir fs/namei.c:3908 [inline] vfs_rmdir+0x209/0x400 fs/namei.c:3886 do_rmdir+0x2d1/0x340 fs/namei.c:3968 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #2 (&ovl_i_mutex_dir_key[depth]){++++}: down_read+0x37/0xa0 kernel/locking/rwsem.c:24 inode_lock_shared include/linux/fs.h:729 [inline] lookup_slow+0x129/0x400 fs/namei.c:1674 lookup_one_len_unlocked+0x2c7/0x320 fs/namei.c:2595 ovl_lookup_single+0x33/0x6c0 fs/overlayfs/namei.c:208 ovl_lookup_layer+0x2ef/0x3d0 fs/overlayfs/namei.c:265 ovl_lookup+0x5c6/0x1110 fs/overlayfs/namei.c:670 lookup_open+0x5aa/0x1700 fs/namei.c:3220 do_last fs/namei.c:3334 [inline] path_openat+0x14ac/0x2aa0 fs/namei.c:3569 do_filp_open+0x18e/0x250 fs/namei.c:3603 do_open_execat+0xda/0x440 fs/exec.c:849 do_execveat_common.isra.0+0x680/0x1c50 fs/exec.c:1742 do_execve fs/exec.c:1847 [inline] SYSC_execve fs/exec.c:1928 [inline] SyS_execve+0x34/0x40 fs/exec.c:1923 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #1 (&ovl_i_mutex_dir_key[depth]#2){++++}: down_read+0x37/0xa0 kernel/locking/rwsem.c:24 inode_lock_shared include/linux/fs.h:729 [inline] do_last fs/namei.c:3333 [inline] path_openat+0x148c/0x2aa0 fs/namei.c:3569 do_filp_open+0x18e/0x250 fs/namei.c:3603 do_open_execat+0xda/0x440 fs/exec.c:849 do_execveat_common.isra.0+0x680/0x1c50 fs/exec.c:1742 do_execve fs/exec.c:1847 [inline] SYSC_execve fs/exec.c:1928 [inline] SyS_execve+0x34/0x40 fs/exec.c:1923 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&sig->cred_guard_mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 lock_trace+0x3f/0xc0 fs/proc/base.c:407 proc_pid_stack+0x10b/0x240 fs/proc/base.c:457 proc_single_show+0xe7/0x150 fs/proc/base.c:761 seq_read+0x4d2/0x1130 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 do_preadv+0x161/0x200 fs/read_write.c:1065 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: Chain exists of: &sig->cred_guard_mutex --> sb_writers#3 --> &p->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(sb_writers#3); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 1 lock held by syz-executor.2/14220: #0: (&p->lock){+.+.}, at: [] seq_read+0xba/0x1130 fs/seq_file.c:165 stack backtrace: CPU: 1 PID: 14220 Comm: syz-executor.2 Not tainted 4.14.181-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/0x283 lib/dump_stack.c:58 print_circular_bug.isra.0.cold+0x2dc/0x425 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+0x3057/0x42a0 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+0xe8/0x1430 kernel/locking/mutex.c:893 lock_trace+0x3f/0xc0 fs/proc/base.c:407 proc_pid_stack+0x10b/0x240 fs/proc/base.c:457 proc_single_show+0xe7/0x150 fs/proc/base.c:761 seq_read+0x4d2/0x1130 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 do_preadv+0x161/0x200 fs/read_write.c:1065 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca29 RSP: 002b:00007f4641d43c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000004fa6c0 RCX: 000000000045ca29 RDX: 0000000000000005 RSI: 0000000020000700 RDI: 0000000000000008 RBP: 000000000078c0e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000862 R14: 00000000004cb43c R15: 00007f4641d446d4 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pid=14375 comm=syz-executor.0 openvswitch: netlink: Message has 8 unknown bytes. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl QAT: Invalid ioctl nla_parse: 1 callbacks suppressed netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43 sclass=netlink_route_socket pid=14501 comm=syz-executor.4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43 sclass=netlink_route_socket pid=14501 comm=syz-executor.4 audit: type=1804 audit(1590165830.038:17418): pid=14519 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir021416009/syzkaller.6uWUUo/131/bus" dev="sda1" ino=16323 res=1 audit: type=1804 audit(1590165830.118:17419): pid=14519 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir021416009/syzkaller.6uWUUo/131/bus" dev="sda1" ino=16323 res=1 TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1804 audit(1590165830.728:17420): pid=14532 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir021416009/syzkaller.6uWUUo/131/bus" dev="sda1" ino=16323 res=1 audit: type=1804 audit(1590165830.738:17421): pid=14519 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir021416009/syzkaller.6uWUUo/131/bus" dev="sda1" ino=16323 res=1 TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 104 bytes leftover after parsing attributes in process `syz-executor.5'. nla_parse: 6 callbacks suppressed netlink: 104 bytes leftover after parsing attributes in process `syz-executor.5'. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 14786 Comm: syz-executor.1 Not tainted 4.14.181-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/0x283 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x154 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc_node mm/slab.c:3297 [inline] kmem_cache_alloc_node_trace+0x25a/0x400 mm/slab.c:3659 kmalloc_node include/linux/slab.h:526 [inline] kzalloc_node include/linux/slab.h:672 [inline] __get_vm_area_node+0xed/0x340 mm/vmalloc.c:1407 __vmalloc_node_range+0xa5/0x690 mm/vmalloc.c:1762 __vmalloc_node mm/vmalloc.c:1818 [inline] __vmalloc_node_flags mm/vmalloc.c:1832 [inline] vmalloc+0x42/0x50 mm/vmalloc.c:1854 kvm_vm_ioctl+0x672/0x1430 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3170 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 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:0x45ca29 RSP: 002b:00007f1dd542ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004e82c0 RCX: 000000000045ca29 RDX: 00000000200000c0 RSI: 000000004008ae6a RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00000000000003d2 R14: 00000000004c6815 R15: 00007f1dd542b6d4 netlink: 104 bytes leftover after parsing attributes in process `syz-executor.5'. syz-executor.1: vmalloc: allocation failure: 48 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) syz-executor.1 cpuset=/ mems_allowed=0-1 CPU: 1 PID: 14786 Comm: syz-executor.1 Not tainted 4.14.181-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/0x283 lib/dump_stack.c:58 warn_alloc.cold+0x96/0x1af mm/page_alloc.c:3249 __vmalloc_node_range mm/vmalloc.c:1789 [inline] __vmalloc_node_range+0x3b2/0x690 mm/vmalloc.c:1749 __vmalloc_node mm/vmalloc.c:1818 [inline] __vmalloc_node_flags mm/vmalloc.c:1832 [inline] vmalloc+0x42/0x50 mm/vmalloc.c:1854 kvm_vm_ioctl+0x672/0x1430 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3170 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 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:0x45ca29 RSP: 002b:00007f1dd542ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004e82c0 RCX: 000000000045ca29 RDX: 00000000200000c0 RSI: 000000004008ae6a RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00000000000003d2 R14: 00000000004c6815 R15: 00007f1dd542b6d4 Mem-Info: active_anon:274868 inactive_anon:12830 isolated_anon:0 active_file:7324 inactive_file:6989 isolated_file:0 unevictable:4096 dirty:194 writeback:0 unstable:0 slab_reclaimable:18139 slab_unreclaimable:120696 mapped:63525 shmem:8597 pagetables:2323 bounce:0 free:1015993 free_pcp:528 free_cma:0 Node 0 active_anon:1097916kB inactive_anon:51316kB active_file:28292kB inactive_file:27932kB unevictable:16384kB isolated(anon):0kB isolated(file):0kB mapped:253556kB dirty:764kB writeback:0kB shmem:34380kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 737280kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 1 active_anon:256kB inactive_anon:4kB active_file:1004kB inactive_file:24kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:44kB dirty:12kB writeback:0kB shmem:8kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 0 DMA free:10448kB min:220kB low:272kB high:324kB 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 2559 2559 2559 2559 Node 0 DMA32 free:278924kB min:36296kB low:45368kB high:54440kB active_anon:1097916kB inactive_anon:51316kB active_file:28292kB inactive_file:27932kB unevictable:16384kB writepending:784kB present:3129332kB managed:2623996kB mlocked:16384kB kernel_stack:8832kB pagetables:9116kB bounce:0kB free_pcp:1356kB local_pcp:632kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 0 Normal free:0kB min:0kB low:0kB high:0kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:786432kB managed:0kB 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:3774400kB min:53592kB low:66988kB high:80384kB active_anon:256kB inactive_anon:4kB active_file:1004kB inactive_file:24kB unevictable:0kB writepending:12kB present:3932160kB managed:3870192kB mlocked:0kB kernel_stack:32kB pagetables:28kB bounce:0kB free_pcp:740kB local_pcp:320kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 0 DMA: 0*4kB 0*8kB 1*16kB (U) 0*32kB 1*64kB (U) 1*128kB (U) 0*256kB 0*512kB 0*1024kB 1*2048kB (M) 2*4096kB (M) = 10448kB Node 0 DMA32: 1288*4kB (UMEH) 709*8kB (UMEH) 300*16kB (UME) 452*32kB (UMEH) 166*64kB (UMH) 35*128kB (M) 12*256kB (M) 6*512kB (UMEH) 32*1024kB (UEH) 17*2048kB (UMH) 39*4096kB (UM) = 278664kB Node 0 Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB