WARNING: possible circular locking dependency detected 4.14.76+ #19 Not tainted ------------------------------------------------------ syz-executor1/13128 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.}, at: [] do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 but task is already holding lock: (&p->lock){+.+.}, at: [] seq_read+0xd4/0x11d0 fs/seq_file.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&p->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 seq_read+0xd4/0x11d0 fs/seq_file.c:165 proc_reg_read+0xef/0x170 fs/proc/inode.c:217 do_loop_readv_writev fs/read_write.c:698 [inline] do_iter_read+0x3cc/0x580 fs/read_write.c:922 vfs_readv+0xe6/0x150 fs/read_write.c:984 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x495/0x860 fs/splice.c:416 do_splice_to+0x102/0x150 fs/splice.c:880 do_splice fs/splice.c:1173 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xf4d/0x12a0 fs/splice.c:1382 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&pipe->mutex/1){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 __pipe_lock fs/pipe.c:88 [inline] fifo_open+0x156/0x9d0 fs/pipe.c:921 do_dentry_open+0x426/0xda0 fs/open.c:764 vfs_open+0x11c/0x210 fs/open.c:878 do_last fs/namei.c:3408 [inline] path_openat+0x4eb/0x23a0 fs/namei.c:3550 do_filp_open+0x197/0x270 fs/namei.c:3584 do_open_execat+0x10d/0x5b0 fs/exec.c:849 do_execveat_common.isra.14+0x6cb/0x1d60 fs/exec.c:1740 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+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&sig->cred_guard_mutex){+.+.}: lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 proc_single_show+0xf1/0x160 fs/proc/base.c:762 seq_read+0x4e0/0x11d0 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:698 [inline] do_iter_read+0x3cc/0x580 fs/read_write.c:922 vfs_readv+0xe6/0x150 fs/read_write.c:984 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x495/0x860 fs/splice.c:416 do_splice_to+0x102/0x150 fs/splice.c:880 splice_direct_to_actor+0x21d/0x750 fs/splice.c:952 do_splice_direct+0x17b/0x220 fs/splice.c:1061 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438 SYSC_sendfile64 fs/read_write.c:1493 [inline] SyS_sendfile64+0xab/0x140 fs/read_write.c:1485 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: &sig->cred_guard_mutex --> &pipe->mutex/1 --> &p->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(&pipe->mutex/1); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 2 locks held by syz-executor1/13128: #0: (sb_writers#6){.+.+}, at: [] file_start_write include/linux/fs.h:2722 [inline] #0: (sb_writers#6){.+.+}, at: [] do_sendfile+0x9b5/0xb50 fs/read_write.c:1437 #1: (&p->lock){+.+.}, at: [] seq_read+0xd4/0x11d0 fs/seq_file.c:165 stack backtrace: CPU: 1 PID: 13128 Comm: syz-executor1 Not tainted 4.14.76+ #19 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_circular_bug.isra.18.cold.43+0x2d3/0x40c kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2ff9/0x4320 kernel/locking/lockdep.c:3487 lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 proc_single_show+0xf1/0x160 fs/proc/base.c:762 seq_read+0x4e0/0x11d0 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:698 [inline] do_iter_read+0x3cc/0x580 fs/read_write.c:922 vfs_readv+0xe6/0x150 fs/read_write.c:984 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x495/0x860 fs/splice.c:416 do_splice_to+0x102/0x150 fs/splice.c:880 splice_direct_to_actor+0x21d/0x750 fs/splice.c:952 do_splice_direct+0x17b/0x220 fs/splice.c:1061 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438 SYSC_sendfile64 fs/read_write.c:1493 [inline] SyS_sendfile64+0xab/0x140 fs/read_write.c:1485 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007fbce3a3dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000457569 RDX: 0000000020000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000040000000009 R11: 0000000000000246 R12: 00007fbce3a3e6d4 R13: 00000000004c34d0 R14: 00000000004d5298 R15: 00000000ffffffff binder: BINDER_SET_CONTEXT_MGR already set binder: 13126:13136 ioctl 40046207 0 returned -16 binder: 13126:13128 BC_INCREFS_DONE u0000000000000000 no match binder: 13126:13128 BC_ACQUIRE_DONE u0000000000000000 no match EXT4-fs (loop5): inodes count not valid: 2 vs 64 binder: BINDER_SET_CONTEXT_MGR already set binder: 13146:13150 ioctl 40046207 0 returned -16 binder: 13146:13150 BC_INCREFS_DONE u0000000000000000 no match binder: 13146:13150 BC_ACQUIRE_DONE u0000000000000000 no match EXT4-fs (loop5): inodes count not valid: 2 vs 64 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13155 comm=syz-executor4 binder: BINDER_SET_CONTEXT_MGR already set binder: 13157:13161 ioctl 40046207 0 returned -16 binder: 13157:13161 BC_INCREFS_DONE u0000000000000000 no match binder: 13157:13161 BC_ACQUIRE_DONE u0000000000000000 no match binder: BINDER_SET_CONTEXT_MGR already set binder: 13169:13171 ioctl 40046207 0 returned -16 binder: 13169:13171 BC_INCREFS_DONE u0000000000000000 no match binder: 13169:13171 BC_ACQUIRE_DONE u0000000000000000 no match binder: BINDER_SET_CONTEXT_MGR already set binder: 13176:13178 ioctl 40046207 0 returned -16 binder: 13176:13178 BC_INCREFS_DONE u0000000000000000 no match binder: 13176:13178 BC_ACQUIRE_DONE u0000000000000000 no match binder: BINDER_SET_CONTEXT_MGR already set binder: 13183:13188 ioctl 40046207 0 returned -16 binder: 13183:13188 BC_INCREFS_DONE u0000000000000000 no match binder: 13183:13188 BC_ACQUIRE_DONE u0000000000000000 no match binder: BINDER_SET_CONTEXT_MGR already set binder: 13198:13205 ioctl 40046207 0 returned -16 binder: 13198:13205 BC_INCREFS_DONE u0000000000000000 no match binder: 13198:13205 BC_ACQUIRE_DONE u0000000000000000 no match EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, audit: type=1400 audit(2000000040.060:446): avc: denied { create } for pid=13116 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(2000000040.090:448): avc: denied { write } for pid=13116 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(2000000040.130:449): avc: denied { prog_run } for pid=13113 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(2000000040.150:450): avc: denied { create } for pid=13131 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(2000000040.150:451): avc: denied { write } for pid=13131 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder: 13225:13237 ioctl 40046207 0 returned -16 EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, audit: type=1400 audit(2000000040.370:452): avc: denied { map } for pid=13160 comm="syz-executor3" path="/root/syzkaller-testdir529172434/syzkaller.vlMBrt/226/bus" dev="sda1" ino=16629 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000040.750:453): avc: denied { associate } for pid=13184 comm="syz-executor0" name="file0" scontext=unconfined_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem permissive=1 audit: type=1400 audit(2000000042.010:454): avc: denied { map } for pid=13236 comm="syz-executor5" path="/root/syzkaller-testdir841697919/syzkaller.Hk6zsq/255/file0/bus" dev="ramfs" ino=31692 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ramfs_t:s0 tclass=file permissive=1 EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs: 3 callbacks suppressed EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, SELinux: unrecognized netlink message: protocol=0 nlmsg_type=275 sclass=netlink_route_socket pig=14141 comm=syz-executor3 EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, SELinux: unrecognized netlink message: protocol=0 nlmsg_type=275 sclass=netlink_route_socket pig=14152 comm=syz-executor3 EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000, EXT4-fs (sda1): re-mounted. Opts: inode_readahead_blks=0x0000000000000000,