[ 31.980608] audit: type=1800 audit(1574760462.576:33): pid=6778 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="startpar" name="rc.local" dev="sda1" ino=2465 res=0 [ 32.011223] audit: type=1800 audit(1574760462.576:34): pid=6778 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="startpar" name="rmnologin" dev="sda1" ino=2456 res=0 Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 36.553203] random: sshd: uninitialized urandom read (32 bytes read) [ 37.241700] audit: type=1400 audit(1574760467.836:35): avc: denied { map } for pid=6951 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 [ 37.321990] random: sshd: uninitialized urandom read (32 bytes read) [ 37.972395] random: sshd: uninitialized urandom read (32 bytes read) [ 38.196955] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.39' (ECDSA) to the list of known hosts. [ 43.762036] 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 [ 43.890994] audit: type=1400 audit(1574760474.486:36): avc: denied { map } for pid=6963 comm="syz-executor739" path="/root/syz-executor739963422" dev="sda1" ino=16484 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 [ 44.040602] [ 44.042258] ====================================================== [ 44.048550] WARNING: possible circular locking dependency detected [ 44.054866] 4.14.156-syzkaller #0 Not tainted [ 44.059353] ------------------------------------------------------ [ 44.065658] syz-executor739/6995 is trying to acquire lock: [ 44.071397] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 44.079621] [ 44.079621] but task is already holding lock: [ 44.085572] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 44.095176] [ 44.095176] which lock already depends on the new lock. [ 44.095176] [ 44.103470] [ 44.103470] the existing dependency chain (in reverse order) is: [ 44.111162] [ 44.111162] -> #5 (&event->child_mutex){+.+.}: [ 44.117221] lock_acquire+0x16f/0x430 [ 44.121613] __mutex_lock+0xe8/0x1470 [ 44.125911] mutex_lock_nested+0x16/0x20 [ 44.130472] perf_event_for_each_child+0x8a/0x150 [ 44.135816] perf_event_task_disable+0x97/0x120 [ 44.140997] SyS_prctl+0x4c7/0xc50 [ 44.145055] do_syscall_64+0x1e8/0x640 [ 44.149442] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 44.155150] [ 44.155150] -> #4 (&cpuctx_mutex){+.+.}: [ 44.160679] lock_acquire+0x16f/0x430 [ 44.164990] __mutex_lock+0xe8/0x1470 [ 44.169288] mutex_lock_nested+0x16/0x20 [ 44.173850] perf_event_init_cpu+0xc2/0x170 [ 44.178682] perf_event_init+0x2d8/0x31a [ 44.183243] start_kernel+0x3b6/0x6fd [ 44.187544] x86_64_start_reservations+0x29/0x2b [ 44.192800] x86_64_start_kernel+0x77/0x7b [ 44.197890] secondary_startup_64+0xa5/0xb0 [ 44.202708] [ 44.202708] -> #3 (pmus_lock){+.+.}: [ 44.207984] lock_acquire+0x16f/0x430 [ 44.212286] __mutex_lock+0xe8/0x1470 [ 44.216582] mutex_lock_nested+0x16/0x20 [ 44.221139] perf_event_init_cpu+0x2f/0x170 [ 44.225971] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 44.231140] _cpu_up+0x228/0x530 [ 44.236401] do_cpu_up+0x121/0x150 [ 44.240441] cpu_up+0x1b/0x20 [ 44.244048] smp_init+0x157/0x170 [ 44.248000] kernel_init_freeable+0x30b/0x532 [ 44.252993] kernel_init+0x12/0x162 [ 44.257116] ret_from_fork+0x24/0x30 [ 44.261334] [ 44.261334] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 44.267722] lock_acquire+0x16f/0x430 [ 44.272024] cpus_read_lock+0x3d/0xc0 [ 44.276320] static_key_slow_inc+0x13/0x30 [ 44.281054] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 44.286919] tracepoint_probe_register+0x2b/0x40 [ 44.292172] trace_event_reg+0x277/0x330 [ 44.296730] perf_trace_init+0x449/0xaa0 [ 44.301290] perf_tp_event_init+0x7d/0xf0 [ 44.305937] perf_try_init_event+0x164/0x200 [ 44.310842] perf_event_alloc.part.0+0xd90/0x25b0 [ 44.316196] SYSC_perf_event_open+0xad1/0x2690 [ 44.321274] SyS_perf_event_open+0x34/0x40 [ 44.326096] do_syscall_64+0x1e8/0x640 [ 44.330499] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 44.336222] [ 44.336222] -> #1 (tracepoints_mutex){+.+.}: [ 44.342091] lock_acquire+0x16f/0x430 [ 44.346399] __mutex_lock+0xe8/0x1470 [ 44.350699] mutex_lock_nested+0x16/0x20 [ 44.355259] tracepoint_probe_register_prio+0x36/0x6d0 [ 44.361033] tracepoint_probe_register+0x2b/0x40 [ 44.366286] trace_event_reg+0x277/0x330 [ 44.370843] perf_trace_init+0x449/0xaa0 [ 44.375401] perf_tp_event_init+0x7d/0xf0 [ 44.380057] perf_try_init_event+0x164/0x200 [ 44.384965] perf_event_alloc.part.0+0xd90/0x25b0 [ 44.390304] SYSC_perf_event_open+0xad1/0x2690 [ 44.395380] SyS_perf_event_open+0x34/0x40 [ 44.400113] do_syscall_64+0x1e8/0x640 [ 44.404596] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 44.410279] [ 44.410279] -> #0 (event_mutex){+.+.}: [ 44.415628] __lock_acquire+0x2cb3/0x4620 [ 44.420273] lock_acquire+0x16f/0x430 [ 44.424575] __mutex_lock+0xe8/0x1470 [ 44.428876] mutex_lock_nested+0x16/0x20 [ 44.433443] perf_trace_destroy+0x28/0x100 [ 44.438844] tp_perf_event_destroy+0x16/0x20 [ 44.443748] _free_event+0x330/0xe70 [ 44.447961] free_event+0x38/0x50 [ 44.451913] perf_event_release_kernel+0x364/0x880 [ 44.457363] perf_release+0x37/0x50 [ 44.461489] __fput+0x275/0x7a0 [ 44.465263] ____fput+0x16/0x20 [ 44.469059] task_work_run+0x114/0x190 [ 44.473443] do_exit+0x7df/0x2c10 [ 44.477393] do_group_exit+0x111/0x330 [ 44.481864] get_signal+0x381/0x1cd0 [ 44.486090] do_signal+0x86/0x19a0 [ 44.490130] exit_to_usermode_loop+0x15c/0x220 [ 44.495208] do_syscall_64+0x4bc/0x640 [ 44.499596] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 44.505283] [ 44.505283] other info that might help us debug this: [ 44.505283] [ 44.513401] Chain exists of: [ 44.513401] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 44.513401] [ 44.524130] Possible unsafe locking scenario: [ 44.524130] [ 44.530161] CPU0 CPU1 [ 44.534815] ---- ---- [ 44.539459] lock(&event->child_mutex); [ 44.543494] lock(&cpuctx_mutex); [ 44.549538] lock(&event->child_mutex); [ 44.556099] lock(event_mutex); [ 44.559451] [ 44.559451] *** DEADLOCK *** [ 44.559451] [ 44.565490] 2 locks held by syz-executor739/6995: [ 44.570307] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 44.579669] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 44.589708] [ 44.589708] stack backtrace: [ 44.594195] CPU: 1 PID: 6995 Comm: syz-executor739 Not tainted 4.14.156-syzkaller #0 [ 44.602085] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.611437] Call Trace: [ 44.614015] dump_stack+0x142/0x197 [ 44.617621] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 44.622964] __lock_acquire+0x2cb3/0x4620 [ 44.627093] ? event_function+0x28b/0x380 [ 44.631220] ? trace_hardirqs_on+0x10/0x10 [ 44.635437] lock_acquire+0x16f/0x430 [ 44.639216] ? perf_trace_destroy+0x28/0x100 [ 44.643626] ? perf_trace_destroy+0x28/0x100 [ 44.648032] __mutex_lock+0xe8/0x1470 [ 44.651811] ? perf_trace_destroy+0x28/0x100 [ 44.656197] ? perf_trace_destroy+0x28/0x100 [ 44.660606] ? alloc_perf_context+0xf0/0xf0 [ 44.664921] ? mutex_trylock+0x1c0/0x1c0 [ 44.668961] ? save_trace+0x290/0x290 [ 44.672752] ? __mutex_lock+0x36a/0x1470 [ 44.676793] ? perf_event_release_kernel+0x1f3/0x880 [ 44.681876] ? __lock_is_held+0xb6/0x140 [ 44.685915] ? check_preemption_disabled+0x3c/0x250 [ 44.690943] mutex_lock_nested+0x16/0x20 [ 44.694998] ? mutex_lock_nested+0x16/0x20 [ 44.699217] perf_trace_destroy+0x28/0x100 [ 44.703447] tp_perf_event_destroy+0x16/0x20 [ 44.707835] ? perf_tp_event_init+0xf0/0xf0 [ 44.712140] _free_event+0x330/0xe70 [ 44.715840] free_event+0x38/0x50 [ 44.719279] perf_event_release_kernel+0x364/0x880 [ 44.724195] ? perf_event_release_kernel+0x880/0x880 [ 44.729281] perf_release+0x37/0x50 [ 44.732892] __fput+0x275/0x7a0 [ 44.737733] ____fput+0x16/0x20 [ 44.740997] task_work_run+0x114/0x190 [ 44.744872] do_exit+0x7df/0x2c10 [ 44.748320] ? find_held_lock+0x35/0x130 [ 44.752367] ? mm_update_next_owner+0x5d0/0x5d0 [ 44.757030] do_group_exit+0x111/0x330 [ 44.760925] get_signal+0x381/0x1cd0 [ 44.764636] ? save_trace+0x290/0x290 [ 44.768428] do_signal+0x86/0x19a0 [ 44.771945] ? perf_event_task_disable+0x27/0x120 [ 44.776765] ? lock_downgrade+0x740/0x740 [ 44.780892] ? mutex_trylock+0x1c0/0x1c0 [ 44.784929] ? setup_sigcontext+0x7d0/0x7d0 [ 44.789227] ? check_preemption_disabled+0x3c/0x250 [ 44.794220] ? check_preemption_disabled+0x3c/0x250 [ 44.799214] ? debug_smp_processor_id+0x1c/0x20 [ 44.803863] ? perf_trace_sys_exit+0x294/0x400 [ 44.808422] ? check_preemption_disabled+0x3c/0x250 [ 44.813416] ? exit_to_usermode_loop+0x3d/0x220 [ 44.818064] exit_to_usermode_loop+0x15c/0x220 [ 44.822626] do_syscall_64+0x4bc/0x640 [ 44.826489] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.831409] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 44.836576] RIP: 0033:0x446e49 executing program executing program executing program executing program executing program executing program [ 44.839745] RSP: 002b:00007fb72d53bdb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 44.847449] RAX: fffffffffffffe00 RBX: 00000000006dcc38 RCX: 0000000000446e49 [ 44.854697] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dcc38 [ 44.861947] RBP: 00000000006dcc30 R08: 0000000000000000 R09: 0000000000000000 [ 44.869208] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc3c [ 44.876457] R13: 00007ffca859fc2f R14: 00007fb72d53c9c0 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program