random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) audit: type=1400 audit(1539729988.607:7): avc: denied { map } for pid=1784 comm="syz-executor747" path="/root/syz-executor747118084" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ====================================================== WARNING: possible circular locking dependency detected 4.14.76+ #19 Not tainted ------------------------------------------------------ syz-executor747/1784 is trying to acquire lock: (&pipe->mutex/1){+.+.}, at: [] __pipe_lock fs/pipe.c:88 [inline] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 fs/pipe.c:921 but task is already holding lock: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 fs/exec.c:1389 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sig->cred_guard_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 proc_pid_attr_write+0x16b/0x280 fs/proc/base.c:2590 __vfs_write+0xf4/0x5c0 fs/read_write.c:482 __kernel_write+0xf3/0x330 fs/read_write.c:503 write_pipe_buf+0x192/0x250 fs/splice.c:797 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x324/0x740 fs/splice.c:626 splice_from_pipe+0xcf/0x130 fs/splice.c:661 default_file_splice_write+0x37/0x80 fs/splice.c:809 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xd06/0x12a0 fs/splice.c:1382 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&pipe->mutex/1){+.+.}: 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 __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 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-executor747/1784: #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 fs/exec.c:1389 stack backtrace: CPU: 0 PID: 1784 Comm: syz-executor747 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 __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 RIP: 0033:0x440119 RSP: 002b:00007ffce2808428 EFLAGS: 00000217 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 RDX: 0000000020000600 RSI: 00000000200003c0 RDI: 0000000020000400 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000