[....] 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: [ 27.866100] random: sshd: uninitialized urandom read (32 bytes read) [ 28.460648] audit: type=1400 audit(1545380663.834:6): avc: denied { map } for pid=1759 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.531203] random: sshd: uninitialized urandom read (32 bytes read) [ 29.032733] random: sshd: uninitialized urandom read (32 bytes read) [ 29.182465] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.129' (ECDSA) to the list of known hosts. [ 50.576462] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 50.670188] audit: type=1400 audit(1545380686.044:7): avc: denied { map } for pid=1783 comm="syz-executor639" path="/root/syz-executor639664749" 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 [ 50.733482] [ 50.735152] ====================================================== [ 50.741447] WARNING: possible circular locking dependency detected [ 50.747842] 4.14.89+ #28 Not tainted [ 50.751526] ------------------------------------------------------ [ 50.757951] syz-executor639/1786 is trying to acquire lock: [ 50.763635] (&pipe->mutex/1){+.+.}, at: [] fifo_open+0x156/0x9d0 [ 50.771548] [ 50.771548] but task is already holding lock: [ 50.777510] (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 50.786679] [ 50.786679] which lock already depends on the new lock. [ 50.786679] [ 50.795117] [ 50.795117] the existing dependency chain (in reverse order) is: [ 50.802719] [ 50.802719] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 50.809025] __mutex_lock+0xf5/0x1480 [ 50.813336] proc_pid_attr_write+0x16b/0x280 [ 50.818286] __vfs_write+0xf4/0x5c0 [ 50.822415] __kernel_write+0xf3/0x330 [ 50.826800] write_pipe_buf+0x192/0x250 [ 50.831270] __splice_from_pipe+0x324/0x740 [ 50.836097] splice_from_pipe+0xcf/0x130 [ 50.840663] default_file_splice_write+0x37/0x80 [ 50.845920] SyS_splice+0xd06/0x12a0 [ 50.850248] do_syscall_64+0x19b/0x4b0 [ 50.854862] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 50.860552] [ 50.860552] -> #0 (&pipe->mutex/1){+.+.}: [ 50.866166] lock_acquire+0x10f/0x380 [ 50.870464] __mutex_lock+0xf5/0x1480 [ 50.874768] fifo_open+0x156/0x9d0 [ 50.878822] do_dentry_open+0x426/0xda0 [ 50.883293] vfs_open+0x11c/0x210 [ 50.887242] path_openat+0x5f9/0x2930 [ 50.891538] do_filp_open+0x197/0x270 [ 50.895850] do_open_execat+0x10d/0x5b0 [ 50.900345] do_execveat_common.isra.14+0x6cb/0x1d60 [ 50.905948] SyS_execve+0x34/0x40 [ 50.909937] do_syscall_64+0x19b/0x4b0 [ 50.914525] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 50.920250] [ 50.920250] other info that might help us debug this: [ 50.920250] [ 50.928370] Possible unsafe locking scenario: [ 50.928370] [ 50.934414] CPU0 CPU1 [ 50.939062] ---- ---- [ 50.943710] lock(&sig->cred_guard_mutex); [ 50.948008] lock(&pipe->mutex/1); [ 50.954128] lock(&sig->cred_guard_mutex); [ 50.960941] lock(&pipe->mutex/1); [ 50.964542] [ 50.964542] *** DEADLOCK *** [ 50.964542] [ 50.970624] 1 lock held by syz-executor639/1786: [ 50.975358] #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x4e/0x110 [ 50.984962] [ 50.984962] stack backtrace: [ 50.989434] CPU: 1 PID: 1786 Comm: syz-executor639 Not tainted 4.14.89+ #28 [ 50.996546] Call Trace: [ 50.999133] dump_stack+0xb9/0x11b [ 51.002653] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 51.008339] ? save_trace+0xd6/0x250 [ 51.012029] __lock_acquire+0x2ff9/0x4320 [ 51.016263] ? check_preemption_disabled+0x34/0x1e0 [ 51.021268] ? trace_hardirqs_on+0x10/0x10 [ 51.025483] ? trace_hardirqs_on_caller+0x381/0x520 [ 51.030514] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 51.035598] ? __kmalloc+0x153/0x340 [ 51.039288] ? alloc_pipe_info+0x15b/0x370 [ 51.043604] ? fifo_open+0x1ef/0x9d0 [ 51.047299] ? do_dentry_open+0x426/0xda0 [ 51.051426] ? vfs_open+0x11c/0x210 [ 51.055028] ? path_openat+0x5f9/0x2930 [ 51.058984] ? do_filp_open+0x197/0x270 [ 51.062940] lock_acquire+0x10f/0x380 [ 51.066715] ? fifo_open+0x156/0x9d0 [ 51.070403] ? fifo_open+0x156/0x9d0 [ 51.074125] __mutex_lock+0xf5/0x1480 [ 51.077936] ? fifo_open+0x156/0x9d0 [ 51.081628] ? avc_has_perm_noaudit+0x91/0x300 [ 51.086185] ? fifo_open+0x156/0x9d0 [ 51.089873] ? alloc_pipe_info+0x15b/0x370 [ 51.094093] ? __ww_mutex_wakeup_for_backoff+0x240/0x240 [ 51.099535] ? mark_held_locks+0xc2/0x130 [ 51.103661] ? fifo_open+0x284/0x9d0 [ 51.107362] ? lock_downgrade+0x560/0x560 [ 51.111486] ? lock_acquire+0x10f/0x380 [ 51.115448] ? fifo_open+0x243/0x9d0 [ 51.119177] ? debug_mutex_init+0x28/0x53 [ 51.123304] ? fifo_open+0x156/0x9d0 [ 51.126991] fifo_open+0x156/0x9d0 [ 51.130634] do_dentry_open+0x426/0xda0 [ 51.134585] ? pipe_release+0x240/0x240 [ 51.138552] vfs_open+0x11c/0x210 [ 51.142062] path_openat+0x5f9/0x2930 [ 51.145874] ? path_mountpoint+0x9a0/0x9a0 [ 51.150101] ? kasan_kmalloc.part.1+0xa9/0xd0 [ 51.154652] ? kasan_kmalloc.part.1+0x4f/0xd0 [ 51.159132] ? __kmalloc_track_caller+0x104/0x300 [ 51.163960] ? kmemdup+0x20/0x50 [ 51.167475] ? security_prepare_creds+0x7c/0xb0 [ 51.172124] ? prepare_creds+0x225/0x2a0 [ 51.176163] ? prepare_exec_creds+0xc/0xe0 [ 51.180392] ? prepare_bprm_creds+0x62/0x110 [ 51.184878] ? do_execveat_common.isra.14+0x2cd/0x1d60 [ 51.190131] ? SyS_execve+0x34/0x40 [ 51.193751] ? do_syscall_64+0x19b/0x4b0 [ 51.197790] do_filp_open+0x197/0x270 [ 51.201567] ? may_open_dev+0xd0/0xd0 [ 51.205344] ? trace_hardirqs_on+0x10/0x10 [ 51.209568] ? fs_reclaim_acquire+0x10/0x10 [ 51.213872] ? rcu_read_lock_sched_held+0x102/0x120 [ 51.218961] do_open_execat+0x10d/0x5b0 [ 51.222913] ? setup_arg_pages+0x720/0x720 [ 51.227124] ? do_execveat_common.isra.14+0x68d/0x1d60 [ 51.232379] ? lock_downgrade+0x560/0x560 [ 51.236502] ? lock_acquire+0x10f/0x380 [ 51.240457] ? check_preemption_disabled+0x34/0x1e0 [ 51.245450] do_execveat_common.isra.14+0x6cb/0x1d60 [ 51.250535] ? prepare_bprm_creds+0x110/0x110 [ 51.255010] ? getname_flags+0x222/0x540 [ 51.259047] SyS_execve+0x34/0x40 [ 51.262491] ? setup_new_exec+0x770/0x770 [ 51.266662] do_syscall_64+0x19b/0x4b0 [ 51.270537] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 51.275707] RIP: 0033:0x446879 executing program [ 51.278882] RSP: 002b:00007fcc1fec8da8 EFLAGS: 00000246 ORIG_RAX: 000000000000003b [ 51.286580] RAX: ffffffffffffffda RBX: 00000000006dcc58 RCX: 0000000000446879 [ 51.293827] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 [ 51.301148] RBP: 00000000006dcc50 R08: 0000000000000000 R09: 0000000000000000 [ 51.308400] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc5c [ 51.315650] R13: 0030656c69662f2e R14: 68742f636f72702f R15: 00000000006dcd4c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program