[ OK ] Started OpenBSD Secure Shell server. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.101' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 34.567841] audit: type=1400 audit(1596230031.229:8): avc: denied { execmem } for pid=6360 comm="syz-executor528" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1 [ 34.628579] [ 34.630242] ====================================================== [ 34.636555] WARNING: possible circular locking dependency detected [ 34.642853] 4.14.191-syzkaller #0 Not tainted [ 34.647323] ------------------------------------------------------ [ 34.653618] syz-executor528/6395 is trying to acquire lock: [ 34.659305] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x23/0xf0 [ 34.667445] [ 34.667445] but task is already holding lock: [ 34.673483] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x208/0x8a0 [ 34.683095] [ 34.683095] which lock already depends on the new lock. [ 34.683095] [ 34.691396] [ 34.691396] the existing dependency chain (in reverse order) is: [ 34.698999] [ 34.698999] -> #5 (&event->child_mutex){+.+.}: [ 34.705054] __mutex_lock+0xc4/0x1310 [ 34.709362] perf_event_for_each_child+0x82/0x140 [ 34.714704] _perf_ioctl+0x47f/0x1a80 [ 34.719003] perf_ioctl+0x55/0x80 [ 34.722959] do_vfs_ioctl+0x75a/0xff0 [ 34.727260] SyS_ioctl+0x7f/0xb0 [ 34.731125] do_syscall_64+0x1d5/0x640 [ 34.735514] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 34.741212] [ 34.741212] -> #4 (&cpuctx_mutex){+.+.}: [ 34.746737] __mutex_lock+0xc4/0x1310 [ 34.751037] perf_event_init_cpu+0xb7/0x170 [ 34.755878] perf_event_init+0x2cc/0x308 [ 34.760442] start_kernel+0x46a/0x770 [ 34.764746] secondary_startup_64+0xa5/0xb0 [ 34.769562] [ 34.769562] -> #3 (pmus_lock){+.+.}: [ 34.774743] __mutex_lock+0xc4/0x1310 [ 34.779052] perf_event_init_cpu+0x2c/0x170 [ 34.783877] cpuhp_invoke_callback+0x1e6/0x1a80 [ 34.789049] _cpu_up+0x219/0x500 [ 34.792914] do_cpu_up+0x9a/0x160 [ 34.796880] smp_init+0x197/0x1ac [ 34.800837] kernel_init_freeable+0x3f4/0x619 [ 34.805833] kernel_init+0xd/0x15b [ 34.809880] ret_from_fork+0x24/0x30 [ 34.814090] [ 34.814090] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 34.820487] cpus_read_lock+0x39/0xc0 [ 34.824789] static_key_slow_inc+0xe/0x20 [ 34.829437] tracepoint_add_func+0x517/0x750 [ 34.834346] tracepoint_probe_register+0x8c/0xc0 [ 34.839611] trace_event_reg+0x272/0x330 [ 34.844176] perf_trace_init+0x424/0xa30 [ 34.855510] perf_tp_event_init+0x79/0xf0 [ 34.860161] perf_try_init_event+0x15b/0x1f0 [ 34.865075] perf_event_alloc.part.0+0xe2d/0x2640 [ 34.870444] SyS_perf_event_open+0x67f/0x24b0 [ 34.875443] do_syscall_64+0x1d5/0x640 [ 34.879834] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 34.885523] [ 34.885523] -> #1 (tracepoints_mutex){+.+.}: [ 34.891396] __mutex_lock+0xc4/0x1310 [ 34.895704] tracepoint_probe_register+0x68/0xc0 [ 34.900985] trace_event_reg+0x272/0x330 [ 34.905549] perf_trace_init+0x424/0xa30 [ 34.910112] perf_tp_event_init+0x79/0xf0 [ 34.914762] perf_try_init_event+0x15b/0x1f0 [ 34.919670] perf_event_alloc.part.0+0xe2d/0x2640 [ 34.925029] SyS_perf_event_open+0x67f/0x24b0 [ 34.930026] do_syscall_64+0x1d5/0x640 [ 34.934415] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 34.940105] [ 34.940105] -> #0 (event_mutex){+.+.}: [ 34.945465] lock_acquire+0x170/0x3f0 [ 34.949768] __mutex_lock+0xc4/0x1310 [ 34.954071] perf_trace_destroy+0x23/0xf0 [ 34.958718] _free_event+0x321/0xe20 [ 34.962934] free_event+0x32/0x40 [ 34.966886] perf_event_release_kernel+0x368/0x8a0 [ 34.972315] perf_release+0x33/0x40 [ 34.976444] __fput+0x25f/0x7a0 [ 34.980226] task_work_run+0x11f/0x190 [ 34.984618] do_exit+0xa08/0x27f0 [ 34.988570] do_group_exit+0x100/0x2e0 [ 34.992957] get_signal+0x38d/0x1ca0 [ 34.997171] do_signal+0x7c/0x1550 [ 35.001210] exit_to_usermode_loop+0x160/0x200 [ 35.006291] do_syscall_64+0x4a3/0x640 [ 35.010681] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 35.016365] [ 35.016365] other info that might help us debug this: [ 35.016365] [ 35.024489] Chain exists of: [ 35.024489] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 35.024489] [ 35.035230] Possible unsafe locking scenario: [ 35.035230] [ 35.041264] CPU0 CPU1 [ 35.045906] ---- ---- [ 35.050549] lock(&event->child_mutex); [ 35.054699] lock(&cpuctx_mutex); [ 35.060759] lock(&event->child_mutex); [ 35.067316] lock(event_mutex); [ 35.070660] [ 35.070660] *** DEADLOCK *** [ 35.070660] [ 35.076699] 2 locks held by syz-executor528/6395: [ 35.081518] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fe/0x8a0 [ 35.090867] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x208/0x8a0 [ 35.100920] [ 35.100920] stack backtrace: [ 35.105398] CPU: 0 PID: 6395 Comm: syz-executor528 Not tainted 4.14.191-syzkaller #0 [ 35.113256] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.122606] Call Trace: [ 35.125205] dump_stack+0x1b2/0x283 [ 35.128820] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.134601] __lock_acquire+0x2e0e/0x3f20 [ 35.138746] ? list_del_event+0x56c/0x870 [ 35.142874] ? trace_hardirqs_on+0x10/0x10 [ 35.147089] ? do_raw_spin_unlock+0x164/0x220 [ 35.151583] ? mark_held_locks+0xa6/0xf0 [ 35.155625] ? perf_group_detach+0x7f0/0x7f0 [ 35.160018] ? generic_exec_single+0x27e/0x420 [ 35.164581] ? generic_exec_single+0x127/0x420 [ 35.169146] lock_acquire+0x170/0x3f0 [ 35.172928] ? perf_trace_destroy+0x23/0xf0 [ 35.177234] ? perf_trace_destroy+0x23/0xf0 [ 35.181540] __mutex_lock+0xc4/0x1310 [ 35.185325] ? perf_trace_destroy+0x23/0xf0 [ 35.189630] ? task_function_call+0xe6/0x120 [ 35.194016] ? pmu_dev_release+0x20/0x20 [ 35.198055] ? perf_trace_destroy+0x23/0xf0 [ 35.202357] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 35.207791] ? event_function_call+0x1fa/0x3c0 [ 35.212353] ? event_sched_out+0x11b0/0x11b0 [ 35.216746] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 35.222181] ? perf_tp_event_init+0xf0/0xf0 [ 35.226483] perf_trace_destroy+0x23/0xf0 [ 35.230634] ? perf_tp_event_init+0xf0/0xf0 [ 35.234950] _free_event+0x321/0xe20 [ 35.238660] free_event+0x32/0x40 [ 35.242094] perf_event_release_kernel+0x368/0x8a0 [ 35.247007] ? perf_event_release_kernel+0x8a0/0x8a0 [ 35.252089] perf_release+0x33/0x40 [ 35.255699] __fput+0x25f/0x7a0 [ 35.258966] task_work_run+0x11f/0x190 [ 35.262837] do_exit+0xa08/0x27f0 [ 35.266273] ? mm_update_next_owner+0x5b0/0x5b0 [ 35.270943] ? get_signal+0x323/0x1ca0 [ 35.274814] ? lock_acquire+0x170/0x3f0 [ 35.278772] ? lock_downgrade+0x740/0x740 [ 35.282901] do_group_exit+0x100/0x2e0 [ 35.286771] get_signal+0x38d/0x1ca0 [ 35.290467] do_signal+0x7c/0x1550 [ 35.293990] ? __mutex_unlock_slowpath+0x75/0x770 [ 35.298818] ? wait_for_completion_io+0x10/0x10 [ 35.303469] ? _raw_spin_unlock_irqrestore+0x79/0xe0 [ 35.308555] ? setup_sigcontext+0x820/0x820 [ 35.312857] ? SyS_perf_event_open+0x5ea/0x24b0 [ 35.317510] ? SyS_futex+0x1da/0x290 [ 35.321205] ? SyS_futex+0x1e3/0x290 [ 35.324916] ? exit_to_usermode_loop+0x41/0x200 [ 35.329566] exit_to_usermode_loop+0x160/0x200 [ 35.334151] do_syscall_64+0x4a3/0x640 [ 35.338024] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 35.343196] RIP: 0033:0x44c329 [ 35.346365] RSP: 002b:00007f9200c1ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 35.354050] RAX: fffffffffffffe00 RBX: 00000000006ddc38 RCX: 000000000044c329 [ 35.361299] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006ddc38 [ 35.368547] RBP: 00000000006ddc30 R08: 0000000000000000 R09: 0000000000000000 [ 35.375796] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc3c [ 35.383061] R13: 00007ffdbb0e115f R14: 00007f9200c1f9c0 R15: 0000000000000001 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program