====================================================== [ INFO: possible circular locking dependency detected ] 4.4.166+ #1 Not tainted ------------------------------------------------------- syz-executor995/2071 is trying to acquire lock: (&pipe->mutex/1){+.+.+.}, at: [] __pipe_lock fs/pipe.c:86 [inline] (&pipe->mutex/1){+.+.+.}, at: [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 but task is already holding lock: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1221 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_interruptible_nested+0xd2/0xcc0 kernel/locking/mutex.c:650 [] proc_pid_attr_write+0x19e/0x290 fs/proc/base.c:2519 [] __vfs_write+0x11c/0x3e0 fs/read_write.c:489 [] __kernel_write+0x10a/0x350 fs/read_write.c:511 [] write_pipe_buf+0x15d/0x1f0 fs/splice.c:1074 [] splice_from_pipe_feed fs/splice.c:776 [inline] [] __splice_from_pipe+0x364/0x790 fs/splice.c:901 [] splice_from_pipe+0xf9/0x170 fs/splice.c:936 [] default_file_splice_write+0x3c/0x80 fs/splice.c:1086 [] do_splice_from fs/splice.c:1128 [inline] [] do_splice fs/splice.c:1404 [inline] [] SYSC_splice fs/splice.c:1707 [inline] [] SyS_splice+0xde1/0x1430 fs/splice.c:1690 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3cd4/0x5530 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc2/0xb60 kernel/locking/mutex.c:621 [] __pipe_lock fs/pipe.c:86 [inline] [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 [] do_dentry_open+0x38d/0xbd0 fs/open.c:749 [] vfs_open+0x12a/0x210 fs/open.c:862 [] do_last fs/namei.c:3269 [inline] [] path_openat+0xc10/0x3f10 fs/namei.c:3406 [] do_filp_open+0x197/0x270 fs/namei.c:3440 [] do_open_execat+0x10f/0x6f0 fs/exec.c:800 [] do_execveat_common.isra.14+0x6a1/0x1f00 fs/exec.c:1573 [] do_execve fs/exec.c:1679 [inline] [] SYSC_execve fs/exec.c:1760 [inline] [] SyS_execve+0x42/0x50 fs/exec.c:1755 [] return_from_execve+0x0/0x23 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sig->cred_guard_mutex); lock(&pipe->mutex/1); lock(&sig->cred_guard_mutex); lock(&pipe->mutex/1); *** DEADLOCK *** 1 lock held by syz-executor995/2071: #0: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1221 stack backtrace: CPU: 1 PID: 2071 Comm: syz-executor995 Not tainted 4.4.166+ #1 0000000000000000 b758b28b139da398 ffff8801d413f4d0 ffffffff81aa62ad ffffffff83ab7610 ffffffff83ab7610 ffff8801d4f92f80 ffffffff83ab0860 ffff8801d4f93868 ffff8801d413f520 ffffffff813a9549 ffff8801d4f92f80 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug.cold.31+0x2f6/0x435 kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3cd4/0x5530 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc2/0xb60 kernel/locking/mutex.c:621 [] __pipe_lock fs/pipe.c:86 [inline] [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 [] do_dentry_open+0x38d/0xbd0 fs/open.c:749 [] vfs_open+0x12a/0x210 fs/open.c:862 [] do_last fs/namei.c:3269 [inline] [] path_openat+0xc10/0x3f10 fs/namei.c:3406 [] do_filp_open+0x197/0x270 fs/namei.c:3440 [] do_open_execat+0x10f/0x6f0 fs/exec.c:800 [] do_execveat_common.isra.14+0x6a1/0x1f00 fs/exec.c:1573 [] do_execve fs/exec.c:1679 [inline] [] SYSC_execve fs/exec.c:1760 [inline] [] SyS_execve+0x42/0x50 fs/exec.c:1755 [] stub_execve+0x5/0x5 arch/x86/entry/entry_64.S:440