[....] 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: [ 27.884819] random: sshd: uninitialized urandom read (32 bytes read) [ 28.229467] audit: type=1400 audit(1539566745.724:6): avc: denied { map } for pid=1766 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 [ 28.275229] random: sshd: uninitialized urandom read (32 bytes read) [ 28.744038] random: sshd: uninitialized urandom read (32 bytes read) [ 28.904246] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.93' (ECDSA) to the list of known hosts. [ 34.409974] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 34.499969] audit: type=1400 audit(1539566751.994:7): avc: denied { map } for pid=1784 comm="syz-executor377" path="/root/syz-executor377895124" 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 [ 34.503252] [ 34.503255] ====================================================== [ 34.503256] WARNING: possible circular locking dependency detected [ 34.503260] 4.14.76+ #19 Not tainted [ 34.503262] ------------------------------------------------------ [ 34.503265] syz-executor377/1784 is trying to acquire lock: [ 34.503267] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 [ 34.503284] [ 34.503284] but task is already holding lock: [ 34.503285] (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 34.503298] [ 34.503298] which lock already depends on the new lock. [ 34.503298] [ 34.503300] [ 34.503300] the existing dependency chain (in reverse order) is: [ 34.503302] [ 34.503302] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 34.503316] __mutex_lock+0xf5/0x1480 [ 34.503324] proc_pid_attr_write+0x16b/0x280 [ 34.503329] __vfs_write+0xf4/0x5c0 [ 34.503334] __kernel_write+0xf3/0x330 [ 34.503340] write_pipe_buf+0x192/0x250 [ 34.503346] __splice_from_pipe+0x324/0x740 [ 34.503351] splice_from_pipe+0xcf/0x130 [ 34.503356] default_file_splice_write+0x37/0x80 [ 34.503361] SyS_splice+0xd06/0x12a0 [ 34.503367] do_syscall_64+0x19b/0x4b0 [ 34.503373] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 34.503374] [ 34.503374] -> #0 (&pipe->mutex/1){+.+.}: [ 34.503387] lock_acquire+0x10f/0x380 [ 34.503393] __mutex_lock+0xf5/0x1480 [ 34.503397] fifo_open+0x156/0x9d0 [ 34.503404] do_dentry_open+0x426/0xda0 [ 34.503409] vfs_open+0x11c/0x210 [ 34.503415] path_openat+0x4eb/0x23a0 [ 34.503420] do_filp_open+0x197/0x270 [ 34.503425] do_open_execat+0x10d/0x5b0 [ 34.503432] do_execveat_common.isra.14+0x6cb/0x1d60 [ 34.503436] SyS_execve+0x34/0x40 [ 34.503441] do_syscall_64+0x19b/0x4b0 [ 34.503446] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 34.503447] [ 34.503447] other info that might help us debug this: [ 34.503447] [ 34.503449] Possible unsafe locking scenario: [ 34.503449] [ 34.503450] CPU0 CPU1 [ 34.503452] ---- ---- [ 34.503453] lock(&sig->cred_guard_mutex); [ 34.503457] lock(&pipe->mutex/1); [ 34.503462] lock(&sig->cred_guard_mutex); [ 34.503465] lock(&pipe->mutex/1); [ 34.503470] [ 34.503470] *** DEADLOCK *** [ 34.503470] [ 34.503474] 1 lock held by syz-executor377/1784: [ 34.503475] #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 34.503487] [ 34.503487] stack backtrace: [ 34.503494] CPU: 0 PID: 1784 Comm: syz-executor377 Not tainted 4.14.76+ #19 [ 34.503496] Call Trace: [ 34.503505] dump_stack+0xb9/0x11b [ 34.503522] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 34.503528] ? save_trace+0xd6/0x250 [ 34.503535] __lock_acquire+0x2ff9/0x4320 [ 34.503554] ? check_preemption_disabled+0x34/0x160 [ 34.503565] ? trace_hardirqs_on+0x10/0x10 [ 34.503572] ? trace_hardirqs_on_caller+0x381/0x520 [ 34.503578] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 34.503588] ? __lock_acquire+0x619/0x4320 [ 34.503593] ? alloc_pipe_info+0x15b/0x370 [ 34.503598] ? fifo_open+0x1ef/0x9d0 [ 34.503604] ? do_dentry_open+0x426/0xda0 [ 34.503609] ? vfs_open+0x11c/0x210 [ 34.503614] ? path_openat+0x4eb/0x23a0 [ 34.503621] lock_acquire+0x10f/0x380 [ 34.503627] ? fifo_open+0x156/0x9d0 [ 34.503634] ? fifo_open+0x156/0x9d0 [ 34.503640] __mutex_lock+0xf5/0x1480 [ 34.503645] ? fifo_open+0x156/0x9d0 [ 34.503650] ? fifo_open+0x156/0x9d0 [ 34.503656] ? dput.part.6+0x3b3/0x710 [ 34.503661] ? alloc_pipe_info+0x15b/0x370 [ 34.503669] ? __ww_mutex_wakeup_for_backoff+0x240/0x240 [ 34.503675] ? mark_held_locks+0xc2/0x130 [ 34.503683] ? fifo_open+0x284/0x9d0 [ 34.503689] ? lock_downgrade+0x560/0x560 [ 34.503694] ? lock_acquire+0x10f/0x380 [ 34.503699] ? fifo_open+0x243/0x9d0 [ 34.503705] ? debug_mutex_init+0x28/0x53 [ 34.503711] ? fifo_open+0x156/0x9d0 [ 34.503716] fifo_open+0x156/0x9d0 [ 34.503725] do_dentry_open+0x426/0xda0 [ 34.503730] ? pipe_release+0x240/0x240 [ 34.503739] vfs_open+0x11c/0x210 [ 34.503746] path_openat+0x4eb/0x23a0 [ 34.503755] ? path_mountpoint+0x9a0/0x9a0 [ 34.503764] ? kasan_kmalloc.part.1+0xa9/0xd0 [ 34.503771] ? kasan_kmalloc.part.1+0x4f/0xd0 [ 34.503777] ? __kmalloc_track_caller+0x104/0x300 [ 34.503784] ? kmemdup+0x20/0x50 [ 34.503792] ? security_prepare_creds+0x7c/0xb0 [ 34.503800] ? prepare_creds+0x225/0x2a0 [ 34.503806] ? prepare_exec_creds+0xc/0xe0 [ 34.503812] ? prepare_bprm_creds+0x62/0x110 [ 34.503819] ? do_execveat_common.isra.14+0x2cd/0x1d60 [ 34.503823] ? SyS_execve+0x34/0x40 [ 34.503828] ? do_syscall_64+0x19b/0x4b0 [ 34.503837] do_filp_open+0x197/0x270 [ 34.503844] ? may_open_dev+0xd0/0xd0 [ 34.503852] ? trace_hardirqs_on+0x10/0x10 [ 34.503859] ? fs_reclaim_acquire+0x10/0x10 [ 34.503870] ? rcu_read_lock_sched_held+0x102/0x120 [ 34.503877] do_open_execat+0x10d/0x5b0 [ 34.503884] ? setup_arg_pages+0x720/0x720 [ 34.503891] ? do_execveat_common.isra.14+0x68d/0x1d60 [ 34.503897] ? lock_downgrade+0x560/0x560 [ 34.503902] ? lock_acquire+0x10f/0x380 [ 34.503909] ? check_preemption_disabled+0x34/0x160 [ 34.503918] do_execveat_common.isra.14+0x6cb/0x1d60 [ 34.503928] ? prepare_bprm_creds+0x110/0x110 [ 34.503935] ? getname_flags+0x222/0x540 [ 34.503942] SyS_execve+0x34/0x40 [ 34.503948] ? setup_new_exec+0x770/0x770 [ 34.503953] do_syscall_64+0x19b/0x4b0 [ 34.503961] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 34.503965] RIP: 0033:0x440129 [ 34.503969] RSP: 002b:00007ffca985c3e8 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 34.503976] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440129 [ 34.503979] RDX: 00000000200001c0 RSI: 00000000200000c0 RDI: 0000000020f8aff8 [ 34.503983] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 34.503987] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019b0 [ 34.503990] R13: 0000000000401a40 R14: 0000000000000000 R15: 0000000000000000