[....] 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: [ 29.870637] random: sshd: uninitialized urandom read (32 bytes read) [ 30.420390] audit: type=1400 audit(1537864949.944:6): avc: denied { map } for pid=1762 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 [ 30.483475] random: sshd: uninitialized urandom read (32 bytes read) [ 30.962757] random: sshd: uninitialized urandom read (32 bytes read) [ 31.116519] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.17' (ECDSA) to the list of known hosts. [ 36.659984] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 36.749167] audit: type=1400 audit(1537864956.274:7): avc: denied { map } for pid=1780 comm="syz-executor688" path="/root/syz-executor688917862" 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 [ 36.752367] [ 36.752370] ====================================================== [ 36.752371] WARNING: possible circular locking dependency detected [ 36.752375] 4.14.71+ #8 Not tainted [ 36.752376] ------------------------------------------------------ [ 36.752379] syz-executor688/1780 is trying to acquire lock: [ 36.752381] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 [ 36.752399] [ 36.752399] but task is already holding lock: [ 36.752400] (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 36.752412] [ 36.752412] which lock already depends on the new lock. [ 36.752412] [ 36.752413] [ 36.752413] the existing dependency chain (in reverse order) is: [ 36.752414] [ 36.752414] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 36.752428] __mutex_lock+0xf5/0x1480 [ 36.752436] proc_pid_attr_write+0x16b/0x280 [ 36.752440] __vfs_write+0xf4/0x5c0 [ 36.752444] __kernel_write+0xf3/0x330 [ 36.752450] write_pipe_buf+0x192/0x250 [ 36.752455] __splice_from_pipe+0x324/0x740 [ 36.752459] splice_from_pipe+0xcf/0x130 [ 36.752464] default_file_splice_write+0x37/0x80 [ 36.752468] SyS_splice+0xd06/0x12a0 [ 36.752475] do_syscall_64+0x19b/0x4b0 [ 36.752480] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 36.752482] [ 36.752482] -> #0 (&pipe->mutex/1){+.+.}: [ 36.752492] lock_acquire+0x10f/0x380 [ 36.752497] __mutex_lock+0xf5/0x1480 [ 36.752501] fifo_open+0x156/0x9d0 [ 36.752508] do_dentry_open+0x426/0xda0 [ 36.752513] vfs_open+0x11c/0x210 [ 36.752517] path_openat+0x4eb/0x23a0 [ 36.752522] do_filp_open+0x197/0x270 [ 36.752527] do_open_execat+0x10d/0x5b0 [ 36.752532] do_execveat_common.isra.14+0x6cb/0x1d60 [ 36.752536] SyS_execve+0x34/0x40 [ 36.752540] do_syscall_64+0x19b/0x4b0 [ 36.752545] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 36.752546] [ 36.752546] other info that might help us debug this: [ 36.752546] [ 36.752548] Possible unsafe locking scenario: [ 36.752548] [ 36.752550] CPU0 CPU1 [ 36.752551] ---- ---- [ 36.752552] lock(&sig->cred_guard_mutex); [ 36.752555] lock(&pipe->mutex/1); [ 36.752560] lock(&sig->cred_guard_mutex); [ 36.752563] lock(&pipe->mutex/1); [ 36.752567] [ 36.752567] *** DEADLOCK *** [ 36.752567] [ 36.752570] 1 lock held by syz-executor688/1780: [ 36.752571] #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 36.752582] [ 36.752582] stack backtrace: [ 36.752588] CPU: 0 PID: 1780 Comm: syz-executor688 Not tainted 4.14.71+ #8 [ 36.752589] Call Trace: [ 36.752597] dump_stack+0xb9/0x11b [ 36.752605] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 36.752611] ? save_trace+0xd6/0x250 [ 36.752617] __lock_acquire+0x2ff9/0x4320 [ 36.752625] ? check_preemption_disabled+0x34/0x160 [ 36.752635] ? trace_hardirqs_on+0x10/0x10 [ 36.752641] ? trace_hardirqs_on_caller+0x381/0x520 [ 36.752646] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 36.752655] ? __lock_acquire+0x619/0x4320 [ 36.752660] ? alloc_pipe_info+0x15b/0x370 [ 36.752664] ? fifo_open+0x1ef/0x9d0 [ 36.752669] ? do_dentry_open+0x426/0xda0 [ 36.752674] ? vfs_open+0x11c/0x210 [ 36.752678] ? path_openat+0x4eb/0x23a0 [ 36.752684] lock_acquire+0x10f/0x380 [ 36.752689] ? fifo_open+0x156/0x9d0 [ 36.752696] ? fifo_open+0x156/0x9d0 [ 36.752701] __mutex_lock+0xf5/0x1480 [ 36.752705] ? fifo_open+0x156/0x9d0 [ 36.752710] ? fifo_open+0x156/0x9d0 [ 36.752715] ? dput.part.6+0x3b3/0x710 [ 36.752722] ? __ww_mutex_wakeup_for_backoff+0x240/0x240 [ 36.752731] ? fs_reclaim_acquire+0x10/0x10 [ 36.752738] ? fifo_open+0x284/0x9d0 [ 36.752743] ? lock_downgrade+0x560/0x560 [ 36.752748] ? lock_acquire+0x10f/0x380 [ 36.752752] ? fifo_open+0x243/0x9d0 [ 36.752757] ? debug_mutex_init+0x28/0x53 [ 36.752763] ? fifo_open+0x156/0x9d0 [ 36.752768] fifo_open+0x156/0x9d0 [ 36.752775] do_dentry_open+0x426/0xda0 [ 36.752779] ? pipe_release+0x240/0x240 [ 36.752787] vfs_open+0x11c/0x210 [ 36.752794] path_openat+0x4eb/0x23a0 [ 36.752801] ? path_mountpoint+0x9a0/0x9a0 [ 36.752810] ? kasan_kmalloc.part.1+0xa9/0xd0 [ 36.752816] ? kasan_kmalloc.part.1+0x4f/0xd0 [ 36.752821] ? __kmalloc_track_caller+0x104/0x300 [ 36.752828] ? kmemdup+0x20/0x50 [ 36.752835] ? security_prepare_creds+0x7c/0xb0 [ 36.752843] ? prepare_creds+0x225/0x2a0 [ 36.752848] ? prepare_exec_creds+0xc/0xe0 [ 36.752853] ? prepare_bprm_creds+0x62/0x110 [ 36.752859] ? do_execveat_common.isra.14+0x2cd/0x1d60 [ 36.752864] ? SyS_execve+0x34/0x40 [ 36.752868] ? do_syscall_64+0x19b/0x4b0 [ 36.752876] do_filp_open+0x197/0x270 [ 36.752882] ? may_open_dev+0xd0/0xd0 [ 36.752890] ? trace_hardirqs_on+0x10/0x10 [ 36.752895] ? fs_reclaim_acquire+0x10/0x10 [ 36.752906] ? rcu_read_lock_sched_held+0x102/0x120 [ 36.752913] do_open_execat+0x10d/0x5b0 [ 36.752919] ? setup_arg_pages+0x720/0x720 [ 36.752925] ? do_execveat_common.isra.14+0x68d/0x1d60 [ 36.752931] ? lock_downgrade+0x560/0x560 [ 36.752936] ? lock_acquire+0x10f/0x380 [ 36.752942] ? check_preemption_disabled+0x34/0x160 [ 36.752950] do_execveat_common.isra.14+0x6cb/0x1d60 [ 36.752959] ? prepare_bprm_creds+0x110/0x110 [ 36.752965] ? getname_flags+0x222/0x540 [ 36.752971] SyS_execve+0x34/0x40 [ 36.752976] ? setup_new_exec+0x770/0x770 [ 36.752981] do_syscall_64+0x19b/0x4b0 [ 36.752988] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 36.752992] RIP: 0033:0x440129 [ 36.752995] RSP: 002b:00007fffaa526108 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 36.753001] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440129 [ 36.753004] RDX: 0000000020000580 RSI: 0000000020000240 RDI: 0000000020000000 [ 36.753008] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 36.753011] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019b0 [ 36.753014] R13: 0000000000401a40 R14: 0000000000000000 R15: 0000000000000000