[ 28.993356] random: sshd: uninitialized urandom read (32 bytes read) [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 30.197537] random: sshd: uninitialized urandom read (32 bytes read) Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 30.451129] random: sshd: uninitialized urandom read (32 bytes read) [ 31.018083] random: sshd: uninitialized urandom read (32 bytes read) [ 47.796546] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.42' (ECDSA) to the list of known hosts. [ 53.342523] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 53.461659] kauditd_printk_skb: 10 callbacks suppressed [ 53.461667] audit: type=1400 audit(1574563671.153:36): avc: denied { map } for pid=6861 comm="syz-executor096" path="/root/syz-executor096489169" 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 [ 53.524548] [ 53.526213] ====================================================== [ 53.532502] WARNING: possible circular locking dependency detected [ 53.538793] 4.14.155-syzkaller #0 Not tainted [ 53.543260] ------------------------------------------------------ [ 53.549552] syz-executor096/6864 is trying to acquire lock: [ 53.555234] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 53.563447] [ 53.563447] but task is already holding lock: [ 53.569389] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 53.578986] [ 53.578986] which lock already depends on the new lock. [ 53.578986] [ 53.587284] [ 53.587284] the existing dependency chain (in reverse order) is: [ 53.594877] [ 53.594877] -> #5 (&event->child_mutex){+.+.}: [ 53.600918] lock_acquire+0x16f/0x430 [ 53.605217] __mutex_lock+0xe8/0x1470 [ 53.609513] mutex_lock_nested+0x16/0x20 [ 53.614081] perf_event_for_each_child+0x8a/0x150 [ 53.619418] perf_ioctl+0x1d9/0xdf0 [ 53.623552] do_vfs_ioctl+0x7ae/0x1060 [ 53.627940] SyS_ioctl+0x8f/0xc0 [ 53.631803] do_syscall_64+0x1e8/0x640 [ 53.636186] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.641915] [ 53.641915] -> #4 (&cpuctx_mutex){+.+.}: [ 53.647475] lock_acquire+0x16f/0x430 [ 53.651771] __mutex_lock+0xe8/0x1470 [ 53.656080] mutex_lock_nested+0x16/0x20 [ 53.660661] perf_event_init_cpu+0xc2/0x170 [ 53.665477] perf_event_init+0x2d8/0x31a [ 53.670037] start_kernel+0x3b6/0x6fd [ 53.674333] x86_64_start_reservations+0x29/0x2b [ 53.679581] x86_64_start_kernel+0x77/0x7b [ 53.684319] secondary_startup_64+0xa5/0xb0 [ 53.689143] [ 53.689143] -> #3 (pmus_lock){+.+.}: [ 53.694326] lock_acquire+0x16f/0x430 [ 53.698630] __mutex_lock+0xe8/0x1470 [ 53.702924] mutex_lock_nested+0x16/0x20 [ 53.707481] perf_event_init_cpu+0x2f/0x170 [ 53.712297] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 53.717459] _cpu_up+0x228/0x530 [ 53.721320] do_cpu_up+0x121/0x150 [ 53.725356] cpu_up+0x1b/0x20 [ 53.728958] smp_init+0x157/0x170 [ 53.732910] kernel_init_freeable+0x30b/0x532 [ 53.737898] kernel_init+0x12/0x162 [ 53.742022] ret_from_fork+0x24/0x30 [ 53.746225] [ 53.746225] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 53.752614] lock_acquire+0x16f/0x430 [ 53.756910] cpus_read_lock+0x3d/0xc0 [ 53.761203] static_key_slow_inc+0x13/0x30 [ 53.765951] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 53.771810] tracepoint_probe_register+0x2b/0x40 [ 53.777060] trace_event_reg+0x277/0x330 [ 53.781616] perf_trace_init+0x449/0xaa0 [ 53.786175] perf_tp_event_init+0x7d/0xf0 [ 53.790826] perf_try_init_event+0x164/0x200 [ 53.795741] perf_event_alloc.part.0+0xd90/0x25b0 [ 53.801084] SYSC_perf_event_open+0xad1/0x2690 [ 53.806160] SyS_perf_event_open+0x34/0x40 [ 53.810892] do_syscall_64+0x1e8/0x640 [ 53.815277] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.820956] [ 53.820956] -> #1 (tracepoints_mutex){+.+.}: [ 53.826842] lock_acquire+0x16f/0x430 [ 53.831148] __mutex_lock+0xe8/0x1470 [ 53.835443] mutex_lock_nested+0x16/0x20 [ 53.840000] tracepoint_probe_register_prio+0x36/0x6d0 [ 53.845774] tracepoint_probe_register+0x2b/0x40 [ 53.851023] trace_event_reg+0x277/0x330 [ 53.855585] perf_trace_init+0x449/0xaa0 [ 53.860148] perf_tp_event_init+0x7d/0xf0 [ 53.864790] perf_try_init_event+0x164/0x200 [ 53.869690] perf_event_alloc.part.0+0xd90/0x25b0 [ 53.875043] SYSC_perf_event_open+0xad1/0x2690 [ 53.880121] SyS_perf_event_open+0x34/0x40 [ 53.884866] do_syscall_64+0x1e8/0x640 [ 53.889256] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.894938] [ 53.894938] -> #0 (event_mutex){+.+.}: [ 53.900319] __lock_acquire+0x2cb3/0x4620 [ 53.904974] lock_acquire+0x16f/0x430 [ 53.909272] __mutex_lock+0xe8/0x1470 [ 53.913566] mutex_lock_nested+0x16/0x20 [ 53.918121] perf_trace_destroy+0x28/0x100 [ 53.922862] tp_perf_event_destroy+0x16/0x20 [ 53.927771] _free_event+0x330/0xe70 [ 53.931978] free_event+0x38/0x50 [ 53.935925] perf_event_release_kernel+0x364/0x880 [ 53.941353] perf_release+0x37/0x50 [ 53.945473] __fput+0x275/0x7a0 [ 53.950289] ____fput+0x16/0x20 [ 53.954064] task_work_run+0x114/0x190 [ 53.958445] do_exit+0x7df/0x2c10 [ 53.962396] do_group_exit+0x111/0x330 [ 53.966793] get_signal+0x381/0x1cd0 [ 53.971003] do_signal+0x86/0x19a0 [ 53.975041] exit_to_usermode_loop+0x15c/0x220 [ 53.980129] do_syscall_64+0x4bc/0x640 [ 53.984515] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.990208] [ 53.990208] other info that might help us debug this: [ 53.990208] [ 53.998437] Chain exists of: [ 53.998437] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 53.998437] [ 54.009182] Possible unsafe locking scenario: [ 54.009182] [ 54.015214] CPU0 CPU1 [ 54.019860] ---- ---- [ 54.024522] lock(&event->child_mutex); [ 54.028566] lock(&cpuctx_mutex); [ 54.034633] lock(&event->child_mutex); [ 54.041186] lock(event_mutex); [ 54.044555] [ 54.044555] *** DEADLOCK *** [ 54.044555] [ 54.050588] 2 locks held by syz-executor096/6864: [ 54.055677] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 54.065021] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 54.075054] [ 54.075054] stack backtrace: [ 54.079525] CPU: 0 PID: 6864 Comm: syz-executor096 Not tainted 4.14.155-syzkaller #0 [ 54.087376] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 54.096706] Call Trace: [ 54.099284] dump_stack+0x142/0x197 [ 54.102898] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 54.108237] __lock_acquire+0x2cb3/0x4620 [ 54.112376] ? event_function+0x28b/0x380 [ 54.116503] ? trace_hardirqs_on+0x10/0x10 [ 54.120716] lock_acquire+0x16f/0x430 [ 54.124490] ? perf_trace_destroy+0x28/0x100 [ 54.128878] ? perf_trace_destroy+0x28/0x100 [ 54.133266] __mutex_lock+0xe8/0x1470 [ 54.137040] ? perf_trace_destroy+0x28/0x100 [ 54.141427] ? perf_trace_destroy+0x28/0x100 [ 54.145822] ? alloc_perf_context+0xf0/0xf0 [ 54.150127] ? mutex_trylock+0x1c0/0x1c0 [ 54.154181] ? save_trace+0x290/0x290 [ 54.157957] ? __mutex_lock+0x36a/0x1470 [ 54.161996] ? perf_event_release_kernel+0x1f3/0x880 [ 54.167075] ? __lock_is_held+0xb6/0x140 [ 54.171112] ? check_preemption_disabled+0x3c/0x250 [ 54.176104] mutex_lock_nested+0x16/0x20 [ 54.180143] ? mutex_lock_nested+0x16/0x20 [ 54.184352] perf_trace_destroy+0x28/0x100 [ 54.188563] tp_perf_event_destroy+0x16/0x20 [ 54.192944] ? perf_tp_event_init+0xf0/0xf0 [ 54.197240] _free_event+0x330/0xe70 [ 54.200928] free_event+0x38/0x50 [ 54.204372] perf_event_release_kernel+0x364/0x880 [ 54.209279] ? perf_event_release_kernel+0x880/0x880 [ 54.214367] perf_release+0x37/0x50 [ 54.217993] __fput+0x275/0x7a0 [ 54.221386] ____fput+0x16/0x20 [ 54.224749] task_work_run+0x114/0x190 [ 54.228621] do_exit+0x7df/0x2c10 [ 54.232096] ? find_held_lock+0x35/0x130 [ 54.236139] ? mm_update_next_owner+0x5d0/0x5d0 [ 54.240821] do_group_exit+0x111/0x330 [ 54.244691] get_signal+0x381/0x1cd0 [ 54.248401] ? __mutex_unlock_slowpath+0x71/0x800 [ 54.253308] ? wait_for_completion+0x420/0x420 [ 54.257882] do_signal+0x86/0x19a0 [ 54.261408] ? perf_ioctl+0x1fc/0xdf0 [ 54.265188] ? SYSC_perf_event_open+0x2690/0x2690 [ 54.270018] ? setup_sigcontext+0x7d0/0x7d0 [ 54.274442] ? SYSC_perf_event_open+0x2690/0x2690 [ 54.279275] ? do_vfs_ioctl+0xef/0x1060 [ 54.283233] ? selinux_file_mprotect+0x5d0/0x5d0 [ 54.288022] ? lock_downgrade+0x740/0x740 [ 54.292149] ? ioctl_preallocate+0x1c0/0x1c0 [ 54.296535] ? SyS_futex+0x215/0x302 [ 54.300225] ? SyS_futex+0x222/0x302 [ 54.303925] ? exit_to_usermode_loop+0x3d/0x220 [ 54.308573] exit_to_usermode_loop+0x15c/0x220 [ 54.313134] do_syscall_64+0x4bc/0x640 [ 54.317009] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.321859] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 54.327038] RIP: 0033:0x4468d9 [ 54.330225] RSP: 002b:00007f6dfc03edb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 54.337914] RAX: fffffffffffffe00 RBX: 00000000006dbc38 RCX: 00000000004468d9 [ 54.345170] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc38 [ 54.352417] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 54.359674] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 54.366916] R13: 00007ffff67ac3bf R14: 00007f6dfc03f9c0 R15: 20c49ba5e353f7cf executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program