random: sshd: uninitialized urandom read (32 bytes read) audit: type=1400 audit(1546208644.224:7): avc: denied { map } for pid=1776 comm="syz-executor225" path="/root/syz-executor225115656" 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.91+ #30 Not tainted ------------------------------------------------------ syz-executor225/1778 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:3455 [inline] path_openat+0x5f9/0x2930 fs/namei.c:3597 do_filp_open+0x197/0x270 fs/namei.c:3631 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-executor225/1778: #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 fs/exec.c:1389 stack backtrace: CPU: 1 PID: 1778 Comm: syz-executor225 Not tainted 4.14.91+ #30 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:3455 [inline] path_openat+0x5f9/0x2930 fs/namei.c:3597 do_filp_open+0x197/0x270 fs/namei.c:3631 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:0x445709 RSP: 002b:00007fcfa1e00da8 EFLAGS: 00000246 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 000000000