[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 36.169137] random: sshd: uninitialized urandom read (32 bytes read) [ 36.517844] kauditd_printk_skb: 11 callbacks suppressed [ 36.517852] audit: type=1400 audit(1572446811.658:35): avc: denied { map } for pid=6954 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 [ 36.562110] random: sshd: uninitialized urandom read (32 bytes read) [ 37.103337] random: sshd: uninitialized urandom read (32 bytes read) [ 50.548180] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.15.196' (ECDSA) to the list of known hosts. [ 56.100614] random: sshd: uninitialized urandom read (32 bytes read) executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 56.233944] audit: type=1400 audit(1572446831.378:36): avc: denied { map } for pid=6966 comm="syz-executor668" path="/root/syz-executor668950702" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 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 [ 56.700283] [ 56.703009] ====================================================== [ 56.710175] WARNING: possible circular locking dependency detected [ 56.717135] 4.14.151 #0 Not tainted [ 56.720991] ------------------------------------------------------ [ 56.728351] syz-executor668/7054 is trying to acquire lock: [ 56.735832] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 56.745407] executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 56.745407] but task is already holding lock: [ 56.752360] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 56.763821] [ 56.763821] which lock already depends on the new lock. [ 56.763821] [ 56.773339] [ 56.773339] the existing dependency chain (in reverse order) is: [ 56.782055] [ 56.782055] -> #5 (&event->child_mutex){+.+.}: [ 56.789086] lock_acquire+0x16f/0x430 [ 56.793955] __mutex_lock+0xe8/0x1470 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 [ 56.800194] mutex_lock_nested+0x16/0x20 [ 56.805344] perf_event_read_value+0x7a/0x410 [ 56.811407] perf_read+0x40c/0x820 [ 56.816004] do_iter_read+0x3e2/0x5b0 [ 56.820364] vfs_readv+0xd3/0x130 [ 56.824662] do_readv+0x10a/0x2d0 [ 56.828666] SyS_readv+0x28/0x30 [ 56.832756] do_syscall_64+0x1e8/0x640 [ 56.837536] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 56.844108] [ 56.844108] -> #4 (&cpuctx_mutex){+.+.}: executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 56.850667] lock_acquire+0x16f/0x430 [ 56.855036] __mutex_lock+0xe8/0x1470 [ 56.859815] mutex_lock_nested+0x16/0x20 [ 56.864577] perf_event_init_cpu+0xc2/0x170 [ 56.870508] perf_event_init+0x2d8/0x31a [ 56.875149] start_kernel+0x3b6/0x6fd [ 56.880196] x86_64_start_reservations+0x29/0x2b [ 56.886992] x86_64_start_kernel+0x77/0x7b [ 56.892141] secondary_startup_64+0xa5/0xb0 [ 56.897485] executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 56.897485] -> #3 (pmus_lock){+.+.}: [ 56.903824] lock_acquire+0x16f/0x430 [ 56.909012] __mutex_lock+0xe8/0x1470 [ 56.916245] mutex_lock_nested+0x16/0x20 [ 56.920859] perf_event_init_cpu+0x2f/0x170 [ 56.926191] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 56.932342] _cpu_up+0x228/0x530 [ 56.936447] do_cpu_up+0x121/0x150 [ 56.940971] cpu_up+0x1b/0x20 [ 56.945574] smp_init+0x157/0x170 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 56.950086] kernel_init_freeable+0x30b/0x532 [ 56.955953] kernel_init+0x12/0x162 [ 56.960827] ret_from_fork+0x24/0x30 [ 56.966489] [ 56.966489] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 56.973735] lock_acquire+0x16f/0x430 [ 56.978183] cpus_read_lock+0x3d/0xc0 [ 56.982621] static_key_slow_inc+0x13/0x30 [ 56.988449] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 56.994450] tracepoint_probe_register+0x2b/0x40 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.000466] trace_event_reg+0x277/0x330 [ 57.005256] perf_trace_init+0x449/0xaa0 [ 57.010522] perf_tp_event_init+0x7d/0xf0 [ 57.015998] perf_try_init_event+0x164/0x200 [ 57.021213] perf_event_alloc.part.0+0xd90/0x25b0 [ 57.027620] SYSC_perf_event_open+0xad1/0x2690 [ 57.032839] SyS_perf_event_open+0x34/0x40 [ 57.037794] do_syscall_64+0x1e8/0x640 [ 57.042775] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 57.048793] executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.048793] -> #1 (tracepoints_mutex){+.+.}: [ 57.055424] lock_acquire+0x16f/0x430 [ 57.060293] __mutex_lock+0xe8/0x1470 [ 57.065453] mutex_lock_nested+0x16/0x20 [ 57.070413] tracepoint_probe_register_prio+0x36/0x6d0 [ 57.077181] tracepoint_probe_register+0x2b/0x40 [ 57.083512] trace_event_reg+0x277/0x330 [ 57.088548] perf_trace_init+0x449/0xaa0 [ 57.093228] perf_tp_event_init+0x7d/0xf0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.098635] perf_try_init_event+0x164/0x200 [ 57.104374] perf_event_alloc.part.0+0xd90/0x25b0 [ 57.110360] SYSC_perf_event_open+0xad1/0x2690 [ 57.116473] SyS_perf_event_open+0x34/0x40 [ 57.121906] do_syscall_64+0x1e8/0x640 [ 57.126681] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 57.132517] [ 57.132517] -> #0 (event_mutex){+.+.}: [ 57.138839] __lock_acquire+0x2cb3/0x4620 [ 57.144514] lock_acquire+0x16f/0x430 executing program executing program executing program executing program executing program executing program executing program executing program [ 57.149642] __mutex_lock+0xe8/0x1470 [ 57.155468] mutex_lock_nested+0x16/0x20 [ 57.160535] perf_trace_destroy+0x28/0x100 [ 57.166409] tp_perf_event_destroy+0x16/0x20 [ 57.173474] _free_event+0x330/0xe70 [ 57.179192] free_event+0x38/0x50 [ 57.184066] perf_event_release_kernel+0x364/0x880 [ 57.189939] perf_release+0x37/0x50 [ 57.194659] __fput+0x275/0x7a0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.199546] ____fput+0x16/0x20 [ 57.203513] task_work_run+0x114/0x190 [ 57.208269] do_exit+0x7df/0x2c10 [ 57.212870] do_group_exit+0x111/0x330 [ 57.217404] get_signal+0x381/0x1cd0 [ 57.221658] do_signal+0x86/0x19a0 [ 57.226094] exit_to_usermode_loop+0x15c/0x220 [ 57.231747] do_syscall_64+0x4bc/0x640 [ 57.236562] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 57.242830] [ 57.242830] other info that might help us debug this: [ 57.242830] executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.251422] Chain exists of: [ 57.251422] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 57.251422] [ 57.263333] Possible unsafe locking scenario: [ 57.263333] [ 57.269953] CPU0 CPU1 [ 57.275088] ---- ---- [ 57.280423] lock(&event->child_mutex); [ 57.284702] lock(&cpuctx_mutex); [ 57.291694] lock(&event->child_mutex); [ 57.298738] lock(event_mutex); 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 [ 57.302663] [ 57.302663] *** DEADLOCK *** [ 57.302663] [ 57.309554] 2 locks held by syz-executor668/7054: [ 57.314592] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 57.325286] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 57.335864] [ 57.335864] stack backtrace: [ 57.341211] CPU: 1 PID: 7054 Comm: syz-executor668 Not tainted 4.14.151 #0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.348668] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.359006] Call Trace: [ 57.361970] dump_stack+0x138/0x197 [ 57.365760] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 57.371579] __lock_acquire+0x2cb3/0x4620 [ 57.375970] ? event_function+0x28b/0x380 [ 57.380147] ? trace_hardirqs_on+0x10/0x10 [ 57.384716] lock_acquire+0x16f/0x430 [ 57.388866] ? perf_trace_destroy+0x28/0x100 [ 57.393555] ? perf_trace_destroy+0x28/0x100 [ 57.398081] __mutex_lock+0xe8/0x1470 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.402080] ? perf_trace_destroy+0x28/0x100 [ 57.407035] ? perf_trace_destroy+0x28/0x100 [ 57.411581] ? alloc_perf_context+0xf0/0xf0 [ 57.416520] ? mutex_trylock+0x1c0/0x1c0 [ 57.421004] ? save_trace+0x290/0x290 [ 57.425807] ? __mutex_lock+0x36a/0x1470 [ 57.430371] ? perf_event_release_kernel+0x1f3/0x880 [ 57.436402] ? __lock_is_held+0xb6/0x140 [ 57.440938] ? check_preemption_disabled+0x3c/0x250 [ 57.446415] mutex_lock_nested+0x16/0x20 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.452170] ? mutex_lock_nested+0x16/0x20 [ 57.457367] perf_trace_destroy+0x28/0x100 [ 57.462627] tp_perf_event_destroy+0x16/0x20 [ 57.467229] ? perf_tp_event_init+0xf0/0xf0 [ 57.471962] _free_event+0x330/0xe70 [ 57.476140] free_event+0x38/0x50 [ 57.479922] perf_event_release_kernel+0x364/0x880 [ 57.485445] ? perf_event_release_kernel+0x880/0x880 [ 57.491523] perf_release+0x37/0x50 [ 57.495279] __fput+0x275/0x7a0 [ 57.499586] ____fput+0x16/0x20 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 [ 57.503060] task_work_run+0x114/0x190 [ 57.507389] do_exit+0x7df/0x2c10 [ 57.510984] ? find_held_lock+0x35/0x130 [ 57.515349] ? mm_update_next_owner+0x5d0/0x5d0 [ 57.520135] do_group_exit+0x111/0x330 [ 57.525553] get_signal+0x381/0x1cd0 [ 57.530487] ? vfs_readv+0xe0/0x130 [ 57.534774] ? kfree+0x20a/0x270 [ 57.538701] do_signal+0x86/0x19a0 [ 57.542606] ? setup_sigcontext+0x7d0/0x7d0 [ 57.547131] ? __fget_light+0x172/0x1f0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.552028] ? SyS_futex+0x215/0x302 [ 57.556196] ? SyS_futex+0x222/0x302 [ 57.560139] ? do_readv+0x1af/0x2d0 [ 57.564459] ? exit_to_usermode_loop+0x3d/0x220 [ 57.569339] exit_to_usermode_loop+0x15c/0x220 [ 57.573944] do_syscall_64+0x4bc/0x640 [ 57.577948] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 57.583592] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 57.589701] RIP: 0033:0x4469c9 [ 57.593134] RSP: 002b:00007f9262d59db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 57.601576] RAX: fffffffffffffe00 RBX: 00000000006dbc38 RCX: 00000000004469c9 [ 57.609245] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc38 [ 57.617684] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 57.626033] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 57.633815] R13: 00007ffc8d8d1d0f R14: 00007f9262d5a9c0 R15: 000000000000002d 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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