[....] 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: [ 33.896466] random: sshd: uninitialized urandom read (32 bytes read) [ 34.116792] kauditd_printk_skb: 9 callbacks suppressed [ 34.116800] audit: type=1400 audit(1571531301.717:35): avc: denied { map } for pid=6878 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 [ 34.170555] random: sshd: uninitialized urandom read (32 bytes read) [ 34.674049] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.1.16' (ECDSA) to the list of known hosts. [ 40.329232] urandom_read: 1 callbacks suppressed [ 40.329236] 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 [ 40.461924] audit: type=1400 audit(1571531308.067:36): avc: denied { map } for pid=6891 comm="syz-executor520" path="/root/syz-executor520162360" 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 47.173988] [ 47.175797] ====================================================== [ 47.182127] WARNING: possible circular locking dependency detected [ 47.188589] 4.14.150 #0 Not tainted [ 47.192203] ------------------------------------------------------ [ 47.198557] syz-executor520/8220 is trying to acquire lock: [ 47.204252] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 47.212481] [ 47.212481] but task is already holding lock: [ 47.218554] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 47.228168] [ 47.228168] which lock already depends on the new lock. [ 47.228168] [ 47.236509] [ 47.236509] the existing dependency chain (in reverse order) is: [ 47.244114] [ 47.244114] -> #5 (&event->child_mutex){+.+.}: [ 47.250171] lock_acquire+0x16f/0x430 [ 47.254506] __mutex_lock+0xe8/0x1470 [ 47.258813] mutex_lock_nested+0x16/0x20 [ 47.263381] perf_event_read_value+0x7a/0x410 [ 47.268382] perf_read+0x40c/0x820 [ 47.272547] do_iter_read+0x3e2/0x5b0 [ 47.276855] vfs_readv+0xd3/0x130 [ 47.280812] do_readv+0x10a/0x2d0 [ 47.284772] SyS_readv+0x28/0x30 [ 47.288647] do_syscall_64+0x1e8/0x640 [ 47.293038] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 47.298731] [ 47.298731] -> #4 (&cpuctx_mutex){+.+.}: [ 47.304268] lock_acquire+0x16f/0x430 [ 47.308785] __mutex_lock+0xe8/0x1470 [ 47.313194] mutex_lock_nested+0x16/0x20 [ 47.317783] perf_event_init_cpu+0xc2/0x170 [ 47.322616] perf_event_init+0x2d8/0x31a [ 47.327259] start_kernel+0x3b6/0x6fd [ 47.331567] x86_64_start_reservations+0x29/0x2b [ 47.336828] x86_64_start_kernel+0x77/0x7b [ 47.341571] secondary_startup_64+0xa5/0xb0 [ 47.346394] [ 47.346394] -> #3 (pmus_lock){+.+.}: [ 47.351621] lock_acquire+0x16f/0x430 [ 47.355928] __mutex_lock+0xe8/0x1470 [ 47.360290] mutex_lock_nested+0x16/0x20 [ 47.364905] perf_event_init_cpu+0x2f/0x170 [ 47.369735] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 47.374913] _cpu_up+0x228/0x530 [ 47.378786] do_cpu_up+0x121/0x150 [ 47.382831] cpu_up+0x1b/0x20 [ 47.386443] smp_init+0x157/0x170 [ 47.390400] kernel_init_freeable+0x30b/0x532 [ 47.395561] kernel_init+0x12/0x162 [ 47.399697] ret_from_fork+0x24/0x30 [ 47.404000] [ 47.404000] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 47.410400] lock_acquire+0x16f/0x430 [ 47.414711] cpus_read_lock+0x3d/0xc0 [ 47.419126] static_key_slow_inc+0x13/0x30 [ 47.423866] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 47.429734] tracepoint_probe_register+0x2b/0x40 [ 47.434995] trace_event_reg+0x277/0x330 [ 47.439592] perf_trace_init+0x449/0xaa0 [ 47.444164] perf_tp_event_init+0x7d/0xf0 [ 47.448820] perf_try_init_event+0x164/0x200 [ 47.453734] perf_event_alloc.part.0+0xd90/0x25b0 [ 47.459083] SYSC_perf_event_open+0xad1/0x2690 [ 47.464234] SyS_perf_event_open+0x34/0x40 [ 47.468976] do_syscall_64+0x1e8/0x640 [ 47.473418] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 47.479112] [ 47.479112] -> #1 (tracepoints_mutex){+.+.}: [ 47.484991] lock_acquire+0x16f/0x430 [ 47.489298] __mutex_lock+0xe8/0x1470 [ 47.493675] mutex_lock_nested+0x16/0x20 [ 47.498243] tracepoint_probe_register_prio+0x36/0x6d0 [ 47.504028] tracepoint_probe_register+0x2b/0x40 [ 47.509289] trace_event_reg+0x277/0x330 [ 47.513858] perf_trace_init+0x449/0xaa0 [ 47.518545] perf_tp_event_init+0x7d/0xf0 [ 47.523200] perf_try_init_event+0x164/0x200 [ 47.528113] perf_event_alloc.part.0+0xd90/0x25b0 [ 47.533572] SYSC_perf_event_open+0xad1/0x2690 [ 47.538664] SyS_perf_event_open+0x34/0x40 [ 47.543407] do_syscall_64+0x1e8/0x640 [ 47.547800] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 47.553559] [ 47.553559] -> #0 (event_mutex){+.+.}: [ 47.558965] __lock_acquire+0x2cb3/0x4620 [ 47.563618] lock_acquire+0x16f/0x430 [ 47.567923] __mutex_lock+0xe8/0x1470 [ 47.572227] mutex_lock_nested+0x16/0x20 [ 47.576907] perf_trace_destroy+0x28/0x100 [ 47.581644] tp_perf_event_destroy+0x16/0x20 [ 47.586556] _free_event+0x330/0xe70 [ 47.590770] free_event+0x38/0x50 [ 47.594729] perf_event_release_kernel+0x364/0x880 [ 47.600217] perf_release+0x37/0x50 [ 47.604395] __fput+0x275/0x7a0 [ 47.608180] ____fput+0x16/0x20 [ 47.611970] task_work_run+0x114/0x190 [ 47.616392] do_exit+0x7df/0x2c10 [ 47.620352] do_group_exit+0x111/0x330 [ 47.624744] get_signal+0x381/0x1cd0 [ 47.628961] do_signal+0x86/0x19a0 [ 47.633017] exit_to_usermode_loop+0x15c/0x220 [ 47.638108] do_syscall_64+0x4bc/0x640 [ 47.642506] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 47.648200] [ 47.648200] other info that might help us debug this: [ 47.648200] [ 47.656381] Chain exists of: [ 47.656381] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 47.656381] [ 47.667219] Possible unsafe locking scenario: [ 47.667219] [ 47.673270] CPU0 CPU1 [ 47.677924] ---- ---- [ 47.682575] lock(&event->child_mutex); [ 47.686625] lock(&cpuctx_mutex); [ 47.692669] lock(&event->child_mutex); [ 47.699233] lock(event_mutex); [ 47.702584] [ 47.702584] *** DEADLOCK *** [ 47.702584] [ 47.708683] 2 locks held by syz-executor520/8220: [ 47.713530] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 47.722942] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 47.732989] [ 47.732989] stack backtrace: [ 47.737516] CPU: 0 PID: 8220 Comm: syz-executor520 Not tainted 4.14.150 #0 [ 47.744600] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.753975] Call Trace: [ 47.756555] dump_stack+0x138/0x197 [ 47.760174] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 47.765523] __lock_acquire+0x2cb3/0x4620 [ 47.769700] ? trace_hardirqs_on+0x10/0x10 [ 47.773922] ? alloc_perf_context+0xf0/0xf0 [ 47.778280] lock_acquire+0x16f/0x430 [ 47.782115] ? perf_trace_destroy+0x28/0x100 [ 47.786506] ? perf_trace_destroy+0x28/0x100 [ 47.790902] __mutex_lock+0xe8/0x1470 [ 47.794686] ? perf_trace_destroy+0x28/0x100 [ 47.799083] ? perf_trace_destroy+0x28/0x100 [ 47.803496] ? alloc_perf_context+0xf0/0xf0 [ 47.807881] ? mutex_trylock+0x1c0/0x1c0 [ 47.811933] ? save_trace+0x290/0x290 [ 47.815988] ? __mutex_lock+0x36a/0x1470 [ 47.820176] ? perf_event_release_kernel+0x1f3/0x880 [ 47.825351] ? __lock_is_held+0xb6/0x140 [ 47.829419] ? check_preemption_disabled+0x3c/0x250 [ 47.834439] mutex_lock_nested+0x16/0x20 [ 47.838499] ? mutex_lock_nested+0x16/0x20 [ 47.842736] perf_trace_destroy+0x28/0x100 [ 47.846962] tp_perf_event_destroy+0x16/0x20 [ 47.851354] ? perf_tp_event_init+0xf0/0xf0 [ 47.855661] _free_event+0x330/0xe70 [ 47.859368] free_event+0x38/0x50 [ 47.862831] perf_event_release_kernel+0x364/0x880 [ 47.867747] ? perf_event_release_kernel+0x880/0x880 [ 47.872884] perf_release+0x37/0x50 [ 47.876541] __fput+0x275/0x7a0 [ 47.879809] ____fput+0x16/0x20 [ 47.883076] task_work_run+0x114/0x190 [ 47.886949] do_exit+0x7df/0x2c10 [ 47.890392] ? find_held_lock+0x35/0x130 [ 47.894438] ? mm_update_next_owner+0x5d0/0x5d0 [ 47.899095] do_group_exit+0x111/0x330 [ 47.902970] get_signal+0x381/0x1cd0 [ 47.906671] ? __fd_install+0x236/0x5f0 [ 47.910635] do_signal+0x86/0x19a0 [ 47.914162] ? wait_for_completion+0x420/0x420 [ 47.918732] ? fd_install+0x4d/0x60 [ 47.922353] ? setup_sigcontext+0x7d0/0x7d0 [ 47.926661] ? SYSC_perf_event_open+0x61c/0x2690 [ 47.931408] ? find_held_lock+0x35/0x130 [ 47.935491] ? perf_event_set_output+0x460/0x460 [ 47.940288] ? SyS_futex+0x215/0x302 [ 47.944024] ? SyS_futex+0x222/0x302 [ 47.947726] ? exit_to_usermode_loop+0x3d/0x220 [ 47.952382] exit_to_usermode_loop+0x15c/0x220 [ 47.956951] do_syscall_64+0x4bc/0x640 [ 47.960909] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.965737] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 47.970910] RIP: 0033:0x4469c9 executing program executing program executing program executing program executing program [ 47.974084] RSP: 002b:00007f4e840e3db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 47.981783] RAX: fffffffffffffe00 RBX: 00000000006dbc38 RCX: 00000000004469c9 [ 47.989038] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc38 [ 47.996380] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 48.003636] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 48.010930] R13: 00007fffa88965ff R14: 00007f4e840e49c0 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program