[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 80.155437] random: sshd: uninitialized urandom read (32 bytes read) [ 80.654573] audit: type=1400 audit(1538682287.122:6): avc: denied { map } for pid=1808 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 [ 80.692088] random: sshd: uninitialized urandom read (32 bytes read) [ 81.155094] random: sshd: uninitialized urandom read (32 bytes read) [ 81.313421] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.15' (ECDSA) to the list of known hosts. [ 86.831400] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 86.921285] audit: type=1400 audit(1538682293.392:7): avc: denied { map } for pid=1820 comm="syz-executor060" path="/root/syz-executor060296821" 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 [ 86.935452] [ 86.935454] ====================================================== [ 86.935456] WARNING: possible circular locking dependency detected [ 86.935461] 4.14.73+ #16 Not tainted [ 86.935462] ------------------------------------------------------ [ 86.935466] syz-executor060/1820 is trying to acquire lock: [ 86.935468] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 [ 86.935490] [ 86.935490] but task is already holding lock: [ 86.935491] (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 86.935505] [ 86.935505] which lock already depends on the new lock. [ 86.935505] [ 86.935507] [ 86.935507] the existing dependency chain (in reverse order) is: [ 86.935509] [ 86.935509] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 86.935524] __mutex_lock+0xf5/0x1480 [ 86.935534] proc_pid_attr_write+0x16b/0x280 [ 86.935539] __vfs_write+0xf4/0x5c0 [ 86.935555] __kernel_write+0xf3/0x330 [ 86.935562] write_pipe_buf+0x192/0x250 [ 86.935567] __splice_from_pipe+0x324/0x740 [ 86.935572] splice_from_pipe+0xcf/0x130 [ 86.935578] default_file_splice_write+0x37/0x80 [ 86.935583] SyS_splice+0xd06/0x12a0 [ 86.935590] do_syscall_64+0x19b/0x4b0 [ 86.935596] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 86.935597] [ 86.935597] -> #0 (&pipe->mutex/1){+.+.}: [ 86.935611] lock_acquire+0x10f/0x380 [ 86.935617] __mutex_lock+0xf5/0x1480 [ 86.935622] fifo_open+0x156/0x9d0 [ 86.935630] do_dentry_open+0x426/0xda0 [ 86.935636] vfs_open+0x11c/0x210 [ 86.935643] path_openat+0x4eb/0x23a0 [ 86.935648] do_filp_open+0x197/0x270 [ 86.935654] do_open_execat+0x10d/0x5b0 [ 86.935660] do_execveat_common.isra.14+0x6cb/0x1d60 [ 86.935664] SyS_execve+0x34/0x40 [ 86.935669] do_syscall_64+0x19b/0x4b0 [ 86.935674] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 86.935676] [ 86.935676] other info that might help us debug this: [ 86.935676] [ 86.935678] Possible unsafe locking scenario: [ 86.935678] [ 86.935679] CPU0 CPU1 [ 86.935681] ---- ---- [ 86.935682] lock(&sig->cred_guard_mutex); [ 86.935686] lock(&pipe->mutex/1); [ 86.935691] lock(&sig->cred_guard_mutex); [ 86.935694] lock(&pipe->mutex/1); [ 86.935699] [ 86.935699] *** DEADLOCK *** [ 86.935699] [ 86.935703] 1 lock held by syz-executor060/1820: [ 86.935704] #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 86.935716] [ 86.935716] stack backtrace: [ 86.935723] CPU: 0 PID: 1820 Comm: syz-executor060 Not tainted 4.14.73+ #16 [ 86.935726] Call Trace: [ 86.935736] dump_stack+0xb9/0x11b [ 86.935745] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 86.935751] ? save_trace+0xd6/0x250 [ 86.935758] __lock_acquire+0x2ff9/0x4320 [ 86.935767] ? check_preemption_disabled+0x34/0x160 [ 86.935778] ? trace_hardirqs_on+0x10/0x10 [ 86.935784] ? trace_hardirqs_on_caller+0x381/0x520 [ 86.935791] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 86.935801] ? __lock_acquire+0x619/0x4320 [ 86.935806] ? alloc_pipe_info+0x15b/0x370 [ 86.935811] ? fifo_open+0x1ef/0x9d0 [ 86.935816] ? do_dentry_open+0x426/0xda0 [ 86.935822] ? vfs_open+0x11c/0x210 [ 86.935840] ? path_openat+0x4eb/0x23a0 [ 86.935847] lock_acquire+0x10f/0x380 [ 86.935853] ? fifo_open+0x156/0x9d0 [ 86.935860] ? fifo_open+0x156/0x9d0 [ 86.935866] __mutex_lock+0xf5/0x1480 [ 86.935872] ? fifo_open+0x156/0x9d0 [ 86.935877] ? fifo_open+0x156/0x9d0 [ 86.935884] ? dput.part.6+0x3b3/0x710 [ 86.935892] ? __ww_mutex_wakeup_for_backoff+0x240/0x240 [ 86.935903] ? fs_reclaim_acquire+0x10/0x10 [ 86.935910] ? fifo_open+0x284/0x9d0 [ 86.935916] ? lock_downgrade+0x560/0x560 [ 86.935922] ? lock_acquire+0x10f/0x380 [ 86.935927] ? fifo_open+0x243/0x9d0 [ 86.935933] ? debug_mutex_init+0x28/0x53 [ 86.935939] ? fifo_open+0x156/0x9d0 [ 86.935945] fifo_open+0x156/0x9d0 [ 86.935953] do_dentry_open+0x426/0xda0 [ 86.935958] ? pipe_release+0x240/0x240 [ 86.935967] vfs_open+0x11c/0x210 [ 86.935975] path_openat+0x4eb/0x23a0 [ 86.935984] ? path_mountpoint+0x9a0/0x9a0 [ 86.935994] ? kasan_kmalloc.part.1+0xa9/0xd0 [ 86.936001] ? kasan_kmalloc.part.1+0x4f/0xd0 [ 86.936007] ? __kmalloc_track_caller+0x104/0x300 [ 86.936016] ? kmemdup+0x20/0x50 [ 86.936024] ? security_prepare_creds+0x7c/0xb0 [ 86.936033] ? prepare_creds+0x225/0x2a0 [ 86.936040] ? prepare_exec_creds+0xc/0xe0 [ 86.936046] ? prepare_bprm_creds+0x62/0x110 [ 86.936053] ? do_execveat_common.isra.14+0x2cd/0x1d60 [ 86.936058] ? SyS_execve+0x34/0x40 [ 86.936063] ? do_syscall_64+0x19b/0x4b0 [ 86.936072] do_filp_open+0x197/0x270 [ 86.936079] ? may_open_dev+0xd0/0xd0 [ 86.936087] ? trace_hardirqs_on+0x10/0x10 [ 86.936093] ? fs_reclaim_acquire+0x10/0x10 [ 86.936106] ? rcu_read_lock_sched_held+0x102/0x120 [ 86.936114] do_open_execat+0x10d/0x5b0 [ 86.936122] ? setup_arg_pages+0x720/0x720 [ 86.936128] ? do_execveat_common.isra.14+0x68d/0x1d60 [ 86.936135] ? lock_downgrade+0x560/0x560 [ 86.936141] ? lock_acquire+0x10f/0x380 [ 86.936148] ? check_preemption_disabled+0x34/0x160 [ 86.936157] do_execveat_common.isra.14+0x6cb/0x1d60 [ 86.936166] ? prepare_bprm_creds+0x110/0x110 [ 86.936174] ? getname_flags+0x222/0x540 [ 86.936180] SyS_execve+0x34/0x40 [ 86.936186] ? setup_new_exec+0x770/0x770 [ 86.936191] do_syscall_64+0x19b/0x4b0 [ 86.936200] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 86.936204] RIP: 0033:0x440119 [ 86.936208] RSP: 002b:00007fff6a6c2088 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 86.936215] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 [ 86.936219] RDX: 0000000020000200 RSI: 00000000200001c0 RDI: 0000000020000340 [ 86.936223] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 86.936226] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 [ 86.936230] R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000