[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 32.743742] random: sshd: uninitialized urandom read (32 bytes read) [ 33.021442] kauditd_printk_skb: 9 callbacks suppressed [ 33.021450] audit: type=1400 audit(1567985588.850:35): avc: denied { map } for pid=6855 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 [ 33.076730] random: sshd: uninitialized urandom read (32 bytes read) [ 33.594581] random: sshd: uninitialized urandom read (32 bytes read) [ 33.776917] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.152' (ECDSA) to the list of known hosts. [ 39.306419] 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 [ 39.434848] audit: type=1400 audit(1567985595.260:36): avc: denied { map } for pid=6868 comm="syz-executor148" path="/root/syz-executor148118894" 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 48.873615] [ 48.875265] ====================================================== [ 48.881556] WARNING: possible circular locking dependency detected [ 48.887851] 4.14.142 #0 Not tainted [ 48.891450] ------------------------------------------------------ [ 48.897741] syz-executor148/8799 is trying to acquire lock: [ 48.903424] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 48.911639] [ 48.911639] but task is already holding lock: [ 48.918798] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 48.928401] [ 48.928401] which lock already depends on the new lock. [ 48.928401] [ 48.936692] [ 48.936692] the existing dependency chain (in reverse order) is: [ 48.944286] [ 48.944286] -> #5 (&event->child_mutex){+.+.}: [ 48.950328] lock_acquire+0x16f/0x430 [ 48.954625] __mutex_lock+0xe8/0x1470 [ 48.958918] mutex_lock_nested+0x16/0x20 [ 48.963477] perf_event_for_each_child+0x8a/0x150 [ 48.968813] perf_ioctl+0x142/0xdf0 [ 48.972936] do_vfs_ioctl+0x7ae/0x1060 [ 48.977320] SyS_ioctl+0x8f/0xc0 [ 48.981203] do_syscall_64+0x1e8/0x640 [ 48.985597] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.991279] [ 48.991279] -> #4 (&cpuctx_mutex){+.+.}: [ 48.996807] lock_acquire+0x16f/0x430 [ 49.001104] __mutex_lock+0xe8/0x1470 [ 49.005401] mutex_lock_nested+0x16/0x20 [ 49.009956] perf_event_init_cpu+0xc2/0x170 [ 49.014776] perf_event_init+0x2d8/0x31a [ 49.019333] start_kernel+0x3b6/0x6fd [ 49.023627] x86_64_start_reservations+0x29/0x2b [ 49.029140] x86_64_start_kernel+0x77/0x7b [ 49.033871] secondary_startup_64+0xa5/0xb0 [ 49.038683] [ 49.038683] -> #3 (pmus_lock){+.+.}: [ 49.043859] lock_acquire+0x16f/0x430 [ 49.048157] __mutex_lock+0xe8/0x1470 [ 49.052451] mutex_lock_nested+0x16/0x20 [ 49.057009] perf_event_init_cpu+0x2f/0x170 [ 49.061830] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 49.066996] _cpu_up+0x228/0x530 [ 49.070859] do_cpu_up+0x121/0x150 [ 49.074893] cpu_up+0x1b/0x20 [ 49.078496] smp_init+0x157/0x170 [ 49.082448] kernel_init_freeable+0x30b/0x532 [ 49.087437] kernel_init+0x12/0x162 [ 49.091561] ret_from_fork+0x24/0x30 [ 49.095771] [ 49.095771] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 49.102160] lock_acquire+0x16f/0x430 [ 49.106456] cpus_read_lock+0x3d/0xc0 [ 49.110752] static_key_slow_inc+0x13/0x30 [ 49.115484] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 49.121347] tracepoint_probe_register+0x2b/0x40 [ 49.126604] trace_event_reg+0x277/0x330 [ 49.131162] perf_trace_init+0x449/0xaa0 [ 49.135739] perf_tp_event_init+0x7d/0xf0 [ 49.140383] perf_try_init_event+0x164/0x200 [ 49.145287] perf_event_alloc.part.0+0xd90/0x25b0 [ 49.150624] SYSC_perf_event_open+0xad1/0x2690 [ 49.155704] SyS_perf_event_open+0x34/0x40 [ 49.160433] do_syscall_64+0x1e8/0x640 [ 49.164818] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 49.170499] [ 49.170499] -> #1 (tracepoints_mutex){+.+.}: [ 49.176373] lock_acquire+0x16f/0x430 [ 49.180671] __mutex_lock+0xe8/0x1470 [ 49.184983] mutex_lock_nested+0x16/0x20 [ 49.189557] tracepoint_probe_register_prio+0x36/0x6d0 [ 49.195853] tracepoint_probe_register+0x2b/0x40 [ 49.201106] trace_event_reg+0x277/0x330 [ 49.205664] perf_trace_init+0x449/0xaa0 [ 49.210221] perf_tp_event_init+0x7d/0xf0 [ 49.214867] perf_try_init_event+0x164/0x200 [ 49.219771] perf_event_alloc.part.0+0xd90/0x25b0 [ 49.225111] SYSC_perf_event_open+0xad1/0x2690 [ 49.230188] SyS_perf_event_open+0x34/0x40 [ 49.234920] do_syscall_64+0x1e8/0x640 [ 49.239304] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 49.244997] [ 49.244997] -> #0 (event_mutex){+.+.}: [ 49.250345] __lock_acquire+0x2cb3/0x4620 [ 49.254986] lock_acquire+0x16f/0x430 [ 49.259282] __mutex_lock+0xe8/0x1470 [ 49.263577] mutex_lock_nested+0x16/0x20 [ 49.268134] perf_trace_destroy+0x28/0x100 [ 49.272862] tp_perf_event_destroy+0x16/0x20 [ 49.277764] _free_event+0x330/0xe70 [ 49.281973] free_event+0x38/0x50 [ 49.285923] perf_event_release_kernel+0x364/0x880 [ 49.291346] perf_release+0x37/0x50 [ 49.295471] __fput+0x275/0x7a0 [ 49.299247] ____fput+0x16/0x20 [ 49.303051] task_work_run+0x114/0x190 [ 49.307432] do_exit+0x7df/0x2c10 [ 49.311380] do_group_exit+0x111/0x330 [ 49.315765] get_signal+0x381/0x1cd0 [ 49.319972] do_signal+0x86/0x19a0 [ 49.324008] exit_to_usermode_loop+0x15c/0x220 [ 49.329093] do_syscall_64+0x4bc/0x640 [ 49.333477] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 49.339162] [ 49.339162] other info that might help us debug this: [ 49.339162] [ 49.347278] Chain exists of: [ 49.347278] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 49.347278] [ 49.358007] Possible unsafe locking scenario: [ 49.358007] [ 49.364037] CPU0 CPU1 [ 49.368685] ---- ---- [ 49.373326] lock(&event->child_mutex); [ 49.377362] lock(&cpuctx_mutex); [ 49.383395] lock(&event->child_mutex); [ 49.389949] lock(event_mutex); [ 49.393291] [ 49.393291] *** DEADLOCK *** [ 49.393291] [ 49.399338] 2 locks held by syz-executor148/8799: [ 49.404161] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 49.413502] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 49.423534] [ 49.423534] stack backtrace: [ 49.428007] CPU: 0 PID: 8799 Comm: syz-executor148 Not tainted 4.14.142 #0 [ 49.434994] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.444454] Call Trace: [ 49.447036] dump_stack+0x138/0x197 [ 49.450649] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 49.455995] __lock_acquire+0x2cb3/0x4620 [ 49.460124] ? event_function+0x28b/0x380 [ 49.464253] ? trace_hardirqs_on+0x10/0x10 [ 49.468485] lock_acquire+0x16f/0x430 [ 49.472266] ? perf_trace_destroy+0x28/0x100 [ 49.476650] ? perf_trace_destroy+0x28/0x100 [ 49.481048] __mutex_lock+0xe8/0x1470 [ 49.484822] ? perf_trace_destroy+0x28/0x100 [ 49.489208] ? perf_trace_destroy+0x28/0x100 [ 49.493593] ? alloc_perf_context+0xf0/0xf0 [ 49.497892] ? mutex_trylock+0x1c0/0x1c0 [ 49.501939] ? save_trace+0x290/0x290 [ 49.505718] ? __mutex_lock+0x36a/0x1470 [ 49.509755] ? perf_event_release_kernel+0x1f3/0x880 [ 49.514922] ? __lock_is_held+0xb6/0x140 [ 49.518986] ? check_preemption_disabled+0x3c/0x250 [ 49.523986] mutex_lock_nested+0x16/0x20 [ 49.528025] ? mutex_lock_nested+0x16/0x20 [ 49.532236] perf_trace_destroy+0x28/0x100 [ 49.536448] tp_perf_event_destroy+0x16/0x20 [ 49.540849] ? perf_tp_event_init+0xf0/0xf0 [ 49.545143] _free_event+0x330/0xe70 [ 49.548832] free_event+0x38/0x50 [ 49.552264] perf_event_release_kernel+0x364/0x880 [ 49.557169] ? perf_event_release_kernel+0x880/0x880 [ 49.562256] perf_release+0x37/0x50 [ 49.565870] __fput+0x275/0x7a0 [ 49.569135] ____fput+0x16/0x20 [ 49.572400] task_work_run+0x114/0x190 [ 49.576264] do_exit+0x7df/0x2c10 [ 49.579708] ? find_held_lock+0x35/0x130 [ 49.583746] ? mm_update_next_owner+0x5d0/0x5d0 [ 49.588393] do_group_exit+0x111/0x330 [ 49.592255] get_signal+0x381/0x1cd0 [ 49.595979] ? __fd_install+0x236/0x5f0 [ 49.599934] do_signal+0x86/0x19a0 [ 49.603461] ? wait_for_completion+0x420/0x420 [ 49.608024] ? fd_install+0x4d/0x60 [ 49.611630] ? setup_sigcontext+0x7d0/0x7d0 [ 49.615933] ? SYSC_perf_event_open+0x61c/0x2690 [ 49.620668] ? trace_hardirqs_on+0x10/0x10 [ 49.625008] ? perf_event_set_output+0x460/0x460 [ 49.629755] ? SyS_futex+0x215/0x302 [ 49.633460] ? SyS_futex+0x222/0x302 [ 49.637156] ? exit_to_usermode_loop+0x3d/0x220 [ 49.641803] exit_to_usermode_loop+0x15c/0x220 [ 49.646367] do_syscall_64+0x4bc/0x640 [ 49.650245] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 49.655083] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 49.660256] RIP: 0033:0x446969 [ 49.663426] RSP: 002b:00007fb9a6a27db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca executing program executing program executing program executing program executing program executing program [ 49.671114] RAX: fffffffffffffe00 RBX: 00000000006dbc38 RCX: 0000000000446969 [ 49.678372] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc38 [ 49.685622] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 49.692868] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 49.700113] R13: 00007ffef76830ff R14: 00007fb9a6a289c0 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