[....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 38.916507] random: sshd: uninitialized urandom read (32 bytes read) [ 39.273266] audit: type=1400 audit(1539768386.530:6): avc: denied { map } for pid=1776 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 [ 39.333226] random: sshd: uninitialized urandom read (32 bytes read) [ 39.807537] random: sshd: uninitialized urandom read (32 bytes read) [ 44.556644] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.112' (ECDSA) to the list of known hosts. [ 50.204265] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 50.289945] audit: type=1400 audit(1539768397.540:7): avc: denied { map } for pid=1794 comm="syz-executor734" path="/root/syz-executor734044569" dev="sda1" ino=16461 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 50.292672] [ 50.292673] ====================================================== [ 50.292674] WARNING: possible circular locking dependency detected [ 50.292677] 4.14.76+ #20 Not tainted [ 50.292678] ------------------------------------------------------ [ 50.292680] syz-executor734/1794 is trying to acquire lock: [ 50.292681] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 [ 50.292693] [ 50.292693] but task is already holding lock: [ 50.292693] (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 50.292702] [ 50.292702] which lock already depends on the new lock. [ 50.292702] [ 50.292703] [ 50.292703] the existing dependency chain (in reverse order) is: [ 50.292704] [ 50.292704] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 50.292715] __mutex_lock+0xf5/0x1480 [ 50.292721] proc_pid_attr_write+0x16b/0x280 [ 50.292724] __vfs_write+0xf4/0x5c0 [ 50.292727] __kernel_write+0xf3/0x330 [ 50.292731] write_pipe_buf+0x192/0x250 [ 50.292734] __splice_from_pipe+0x324/0x740 [ 50.292737] splice_from_pipe+0xcf/0x130 [ 50.292740] default_file_splice_write+0x37/0x80 [ 50.292743] SyS_splice+0xd06/0x12a0 [ 50.292747] do_syscall_64+0x19b/0x4b0 [ 50.292751] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 50.292752] [ 50.292752] -> #0 (&pipe->mutex/1){+.+.}: [ 50.292760] lock_acquire+0x10f/0x380 [ 50.292763] __mutex_lock+0xf5/0x1480 [ 50.292765] fifo_open+0x156/0x9d0 [ 50.292771] do_dentry_open+0x426/0xda0 [ 50.292774] vfs_open+0x11c/0x210 [ 50.292777] path_openat+0x4eb/0x23a0 [ 50.292780] do_filp_open+0x197/0x270 [ 50.292784] do_open_execat+0x10d/0x5b0 [ 50.292787] do_execveat_common.isra.14+0x6cb/0x1d60 [ 50.292790] SyS_execve+0x34/0x40 [ 50.292792] do_syscall_64+0x19b/0x4b0 [ 50.292796] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 50.292797] [ 50.292797] other info that might help us debug this: [ 50.292797] [ 50.292798] Possible unsafe locking scenario: [ 50.292798] [ 50.292798] CPU0 CPU1 [ 50.292799] ---- ---- [ 50.292800] lock(&sig->cred_guard_mutex); [ 50.292802] lock(&pipe->mutex/1); [ 50.292805] lock(&sig->cred_guard_mutex); [ 50.292807] lock(&pipe->mutex/1); [ 50.292809] [ 50.292809] *** DEADLOCK *** [ 50.292809] [ 50.292812] 1 lock held by syz-executor734/1794: [ 50.292812] #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 50.292819] [ 50.292819] stack backtrace: [ 50.292823] CPU: 0 PID: 1794 Comm: syz-executor734 Not tainted 4.14.76+ #20 [ 50.292824] Call Trace: [ 50.292829] dump_stack+0xb9/0x11b [ 50.292835] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 50.292838] ? save_trace+0xd6/0x250 [ 50.292842] __lock_acquire+0x2ff9/0x4320 [ 50.292848] ? check_preemption_disabled+0x34/0x160 [ 50.292853] ? trace_hardirqs_on+0x10/0x10 [ 50.292857] ? trace_hardirqs_on_caller+0x381/0x520 [ 50.292861] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 50.292866] ? __lock_acquire+0x619/0x4320 [ 50.292869] ? alloc_pipe_info+0x15b/0x370 [ 50.292872] ? fifo_open+0x1ef/0x9d0 [ 50.292875] ? do_dentry_open+0x426/0xda0 [ 50.292878] ? vfs_open+0x11c/0x210 [ 50.292881] ? path_openat+0x4eb/0x23a0 [ 50.292885] lock_acquire+0x10f/0x380 [ 50.292888] ? fifo_open+0x156/0x9d0 [ 50.292892] ? fifo_open+0x156/0x9d0 [ 50.292896] __mutex_lock+0xf5/0x1480 [ 50.292899] ? fifo_open+0x156/0x9d0 [ 50.292902] ? fifo_open+0x156/0x9d0 [ 50.292905] ? dput.part.6+0x3b3/0x710 [ 50.292910] ? __ww_mutex_wakeup_for_backoff+0x240/0x240 [ 50.292916] ? fs_reclaim_acquire+0x10/0x10 [ 50.292920] ? fifo_open+0x284/0x9d0 [ 50.292924] ? lock_downgrade+0x560/0x560 [ 50.292927] ? lock_acquire+0x10f/0x380 [ 50.292930] ? fifo_open+0x243/0x9d0 [ 50.292933] ? debug_mutex_init+0x28/0x53 [ 50.292937] ? fifo_open+0x156/0x9d0 [ 50.292940] fifo_open+0x156/0x9d0 [ 50.292944] do_dentry_open+0x426/0xda0 [ 50.292947] ? pipe_release+0x240/0x240 [ 50.292952] vfs_open+0x11c/0x210 [ 50.292956] path_openat+0x4eb/0x23a0 [ 50.292961] ? path_mountpoint+0x9a0/0x9a0 [ 50.292967] ? kasan_kmalloc.part.1+0xa9/0xd0 [ 50.292970] ? kasan_kmalloc.part.1+0x4f/0xd0 [ 50.292974] ? __kmalloc_track_caller+0x104/0x300 [ 50.292978] ? kmemdup+0x20/0x50 [ 50.292984] ? security_prepare_creds+0x7c/0xb0 [ 50.292989] ? prepare_creds+0x225/0x2a0 [ 50.292993] ? prepare_exec_creds+0xc/0xe0 [ 50.292996] ? prepare_bprm_creds+0x62/0x110 [ 50.293000] ? do_execveat_common.isra.14+0x2cd/0x1d60 [ 50.293003] ? SyS_execve+0x34/0x40 [ 50.293006] ? do_syscall_64+0x19b/0x4b0 [ 50.293011] do_filp_open+0x197/0x270 [ 50.293014] ? may_open_dev+0xd0/0xd0 [ 50.293019] ? trace_hardirqs_on+0x10/0x10 [ 50.293023] ? fs_reclaim_acquire+0x10/0x10 [ 50.293031] ? rcu_read_lock_sched_held+0x102/0x120 [ 50.293035] do_open_execat+0x10d/0x5b0 [ 50.293050] ? setup_arg_pages+0x720/0x720 [ 50.293055] ? do_execveat_common.isra.14+0x68d/0x1d60 [ 50.293059] ? lock_downgrade+0x560/0x560 [ 50.293062] ? lock_acquire+0x10f/0x380 [ 50.293066] ? check_preemption_disabled+0x34/0x160 [ 50.293071] do_execveat_common.isra.14+0x6cb/0x1d60 [ 50.293077] ? prepare_bprm_creds+0x110/0x110 [ 50.293081] ? getname_flags+0x222/0x540 [ 50.293085] SyS_execve+0x34/0x40 [ 50.293088] ? setup_new_exec+0x770/0x770 [ 50.293091] do_syscall_64+0x19b/0x4b0 [ 50.293096] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 50.293099] RIP: 0033:0x440119 [ 50.293101] RSP: 002b:00007ffe4654ece8 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 50.293105] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 [ 50.293107] RDX: 0000000020000500 RSI: 0000000020578fe8 RDI: 0000000020ee6ff8 [ 50.293109] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 50.293112] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 [ 50.293114] R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000