[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 32.280125] random: sshd: uninitialized urandom read (32 bytes read) [ 32.472916] kauditd_printk_skb: 9 callbacks suppressed [ 32.472923] audit: type=1400 audit(1570512830.495:35): avc: denied { map } for pid=6813 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 [ 32.527709] random: sshd: uninitialized urandom read (32 bytes read) [ 33.102034] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.4' (ECDSA) to the list of known hosts. [ 39.151856] urandom_read: 1 callbacks suppressed [ 39.151860] random: sshd: uninitialized urandom read (32 bytes read) [ 39.270332] audit: type=1400 audit(1570512837.295:36): avc: denied { map } for pid=6826 comm="syz-executor372" path="/root/syz-executor372686278" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 39.530901] IPVS: ftp: loaded support on port[0] = 21 [ 40.325940] chnl_net:caif_netlink_parms(): no params data found [ 40.354382] bridge0: port 1(bridge_slave_0) entered blocking state [ 40.361323] bridge0: port 1(bridge_slave_0) entered disabled state [ 40.368438] device bridge_slave_0 entered promiscuous mode [ 40.375936] bridge0: port 2(bridge_slave_1) entered blocking state [ 40.382628] bridge0: port 2(bridge_slave_1) entered disabled state [ 40.389469] device bridge_slave_1 entered promiscuous mode [ 40.405061] bond0: Enslaving bond_slave_0 as an active interface with an up link [ 40.414101] bond0: Enslaving bond_slave_1 as an active interface with an up link [ 40.429323] IPv6: ADDRCONF(NETDEV_UP): team_slave_0: link is not ready [ 40.436650] team0: Port device team_slave_0 added [ 40.442081] IPv6: ADDRCONF(NETDEV_UP): team_slave_1: link is not ready [ 40.449062] team0: Port device team_slave_1 added [ 40.454823] IPv6: ADDRCONF(NETDEV_UP): bridge_slave_0: link is not ready [ 40.462034] IPv6: ADDRCONF(NETDEV_UP): bridge_slave_1: link is not ready [ 40.512114] device hsr_slave_0 entered promiscuous mode [ 40.580476] device hsr_slave_1 entered promiscuous mode [ 40.630675] IPv6: ADDRCONF(NETDEV_UP): hsr_slave_0: link is not ready [ 40.637576] IPv6: ADDRCONF(NETDEV_UP): hsr_slave_1: link is not ready [ 40.650754] bridge0: port 2(bridge_slave_1) entered blocking state [ 40.657161] bridge0: port 2(bridge_slave_1) entered forwarding state [ 40.664081] bridge0: port 1(bridge_slave_0) entered blocking state [ 40.670460] bridge0: port 1(bridge_slave_0) entered forwarding state [ 40.696676] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready [ 40.702906] 8021q: adding VLAN 0 to HW filter on device bond0 [ 40.711118] IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready [ 40.718999] IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready [ 40.737708] bridge0: port 1(bridge_slave_0) entered disabled state [ 40.744953] bridge0: port 2(bridge_slave_1) entered disabled state [ 40.754730] IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready [ 40.761464] 8021q: adding VLAN 0 to HW filter on device team0 [ 40.769624] IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_0: link becomes ready [ 40.777420] bridge0: port 1(bridge_slave_0) entered blocking state [ 40.783776] bridge0: port 1(bridge_slave_0) entered forwarding state [ 40.793446] IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_1: link becomes ready [ 40.801568] bridge0: port 2(bridge_slave_1) entered blocking state [ 40.808011] bridge0: port 2(bridge_slave_1) entered forwarding state [ 40.824863] hsr0: Slave A (hsr_slave_0) is not up; please bring it up to get a fully working HSR network [ 40.834941] hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network [ 40.845759] IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready [ 40.854275] IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_0: link becomes ready [ 40.861883] IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_1: link becomes ready [ 40.869299] IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_0: link becomes ready [ 40.877259] IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready [ 40.884806] IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready [ 40.891535] IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready [ 40.903119] IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready [ 40.912755] 8021q: adding VLAN 0 to HW filter on device batadv0 [ 41.320505] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 53.462504] [ 53.464150] ====================================================== [ 53.470444] WARNING: possible circular locking dependency detected [ 53.476740] 4.14.148 #0 Not tainted [ 53.480338] ------------------------------------------------------ [ 53.486628] syz-executor372/7115 is trying to acquire lock: [ 53.492310] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 53.500525] [ 53.500525] but task is already holding lock: [ 53.506482] (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 53.516085] [ 53.516085] which lock already depends on the new lock. [ 53.516085] [ 53.524383] [ 53.524383] the existing dependency chain (in reverse order) is: [ 53.531983] [ 53.531983] -> #5 (&event->child_mutex){+.+.}: [ 53.538026] lock_acquire+0x16f/0x430 [ 53.542323] __mutex_lock+0xe8/0x1470 [ 53.546616] mutex_lock_nested+0x16/0x20 [ 53.551178] perf_event_for_each_child+0x8a/0x150 [ 53.556513] perf_ioctl+0x142/0xdf0 [ 53.560635] do_vfs_ioctl+0x7ae/0x1060 [ 53.565021] SyS_ioctl+0x8f/0xc0 [ 53.568881] do_syscall_64+0x1e8/0x640 [ 53.573275] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.578956] [ 53.578956] -> #4 (&cpuctx_mutex){+.+.}: [ 53.584484] lock_acquire+0x16f/0x430 [ 53.588780] __mutex_lock+0xe8/0x1470 [ 53.593079] mutex_lock_nested+0x16/0x20 [ 53.597637] perf_event_init_cpu+0xc2/0x170 [ 53.602454] perf_event_init+0x2d8/0x31a [ 53.607009] start_kernel+0x3b6/0x6fd [ 53.611319] x86_64_start_reservations+0x29/0x2b [ 53.616569] x86_64_start_kernel+0x77/0x7b [ 53.621315] secondary_startup_64+0xa5/0xb0 [ 53.626126] [ 53.626126] -> #3 (pmus_lock){+.+.}: [ 53.631297] lock_acquire+0x16f/0x430 [ 53.635606] __mutex_lock+0xe8/0x1470 [ 53.639898] mutex_lock_nested+0x16/0x20 [ 53.644462] perf_event_init_cpu+0x2f/0x170 [ 53.649287] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 53.654449] _cpu_up+0x228/0x530 [ 53.658307] do_cpu_up+0x121/0x150 [ 53.662340] cpu_up+0x1b/0x20 [ 53.665942] smp_init+0x157/0x170 [ 53.669901] kernel_init_freeable+0x30b/0x532 [ 53.674906] kernel_init+0x12/0x162 [ 53.679026] ret_from_fork+0x24/0x30 [ 53.683247] [ 53.683247] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 53.689634] lock_acquire+0x16f/0x430 [ 53.693931] cpus_read_lock+0x3d/0xc0 [ 53.698229] static_key_slow_inc+0x13/0x30 [ 53.702960] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 53.708817] tracepoint_probe_register+0x2b/0x40 [ 53.714067] trace_event_reg+0x277/0x330 [ 53.718623] perf_trace_init+0x449/0xaa0 [ 53.723180] perf_tp_event_init+0x7d/0xf0 [ 53.727832] perf_try_init_event+0x164/0x200 [ 53.732734] perf_event_alloc.part.0+0xd90/0x25b0 [ 53.738082] SYSC_perf_event_open+0xad1/0x2690 [ 53.743157] SyS_perf_event_open+0x34/0x40 [ 53.747889] do_syscall_64+0x1e8/0x640 [ 53.752284] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.757973] [ 53.757973] -> #1 (tracepoints_mutex){+.+.}: [ 53.763839] lock_acquire+0x16f/0x430 [ 53.770824] __mutex_lock+0xe8/0x1470 [ 53.775127] mutex_lock_nested+0x16/0x20 [ 53.779684] tracepoint_probe_register_prio+0x36/0x6d0 [ 53.785454] tracepoint_probe_register+0x2b/0x40 [ 53.790706] trace_event_reg+0x277/0x330 [ 53.795263] perf_trace_init+0x449/0xaa0 [ 53.799820] perf_tp_event_init+0x7d/0xf0 [ 53.804471] perf_try_init_event+0x164/0x200 [ 53.809374] perf_event_alloc.part.0+0xd90/0x25b0 [ 53.814712] SYSC_perf_event_open+0xad1/0x2690 [ 53.819786] SyS_perf_event_open+0x34/0x40 [ 53.824516] do_syscall_64+0x1e8/0x640 [ 53.828903] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.834589] [ 53.834589] -> #0 (event_mutex){+.+.}: [ 53.839935] __lock_acquire+0x2cb3/0x4620 [ 53.844579] lock_acquire+0x16f/0x430 [ 53.848873] __mutex_lock+0xe8/0x1470 [ 53.853171] mutex_lock_nested+0x16/0x20 [ 53.857724] perf_trace_destroy+0x28/0x100 [ 53.862451] tp_perf_event_destroy+0x16/0x20 [ 53.867353] _free_event+0x330/0xe70 [ 53.871560] free_event+0x38/0x50 [ 53.875507] perf_event_release_kernel+0x364/0x880 [ 53.880931] perf_release+0x37/0x50 [ 53.885052] __fput+0x275/0x7a0 [ 53.888824] ____fput+0x16/0x20 [ 53.892601] task_work_run+0x114/0x190 [ 53.896983] exit_to_usermode_loop+0x1da/0x220 [ 53.902061] do_syscall_64+0x4bc/0x640 [ 53.906445] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 53.912135] [ 53.912135] other info that might help us debug this: [ 53.912135] [ 53.920247] Chain exists of: [ 53.920247] event_mutex --> &cpuctx_mutex --> &event->child_mutex [ 53.920247] [ 53.930983] Possible unsafe locking scenario: [ 53.930983] [ 53.937013] CPU0 CPU1 [ 53.941661] ---- ---- [ 53.946308] lock(&event->child_mutex); [ 53.950529] lock(&cpuctx_mutex); [ 53.956558] lock(&event->child_mutex); [ 53.963107] lock(event_mutex); [ 53.966447] [ 53.966447] *** DEADLOCK *** [ 53.966447] [ 53.972488] 2 locks held by syz-executor372/7115: [ 53.977299] #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 [ 53.986650] #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 [ 53.996680] [ 53.996680] stack backtrace: [ 54.001163] CPU: 0 PID: 7115 Comm: syz-executor372 Not tainted 4.14.148 #0 [ 54.008150] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 54.017489] Call Trace: [ 54.020065] dump_stack+0x138/0x197 [ 54.023666] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 54.029011] __lock_acquire+0x2cb3/0x4620 [ 54.033134] ? find_held_lock+0x35/0x130 [ 54.037179] ? trace_hardirqs_on+0x10/0x10 [ 54.041392] lock_acquire+0x16f/0x430 [ 54.045168] ? perf_trace_destroy+0x28/0x100 [ 54.049553] ? perf_trace_destroy+0x28/0x100 [ 54.053936] __mutex_lock+0xe8/0x1470 [ 54.057709] ? perf_trace_destroy+0x28/0x100 [ 54.062094] ? find_held_lock+0x35/0x130 [ 54.066133] ? event_function_call+0x302/0x3f0 [ 54.070692] ? perf_trace_destroy+0x28/0x100 [ 54.075074] ? mutex_trylock+0x1c0/0x1c0 [ 54.079107] ? _raw_spin_unlock_irq+0x28/0x90 [ 54.083578] ? save_trace+0x290/0x290 [ 54.087362] ? trace_hardirqs_on_caller+0x400/0x590 [ 54.092354] ? __lock_is_held+0xb6/0x140 [ 54.096390] ? check_preemption_disabled+0x3c/0x250 [ 54.101384] mutex_lock_nested+0x16/0x20 [ 54.105422] ? mutex_lock_nested+0x16/0x20 [ 54.109639] perf_trace_destroy+0x28/0x100 [ 54.113851] tp_perf_event_destroy+0x16/0x20 [ 54.118233] ? perf_tp_event_init+0xf0/0xf0 [ 54.122613] _free_event+0x330/0xe70 [ 54.127253] free_event+0x38/0x50 [ 54.130692] perf_event_release_kernel+0x364/0x880 [ 54.135616] ? perf_event_release_kernel+0x880/0x880 [ 54.140700] perf_release+0x37/0x50 [ 54.144310] __fput+0x275/0x7a0 [ 54.147594] ____fput+0x16/0x20 [ 54.150950] task_work_run+0x114/0x190 [ 54.154838] exit_to_usermode_loop+0x1da/0x220 [ 54.159408] do_syscall_64+0x4bc/0x640 [ 54.163271] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.168101] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 54.173265] RIP: 0033:0x409481 [ 54.176430] RSP: 002b:00007fffe46ee9a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 [ 54.184110] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000409481 [ 54.191364] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 0000000000000003 [ 54.198617] RBP: 00000000006e6a0c R08: 00000000004b3231 R09: 00000000004b3231 [ 54.205868] R10: 00007fffe46ee9d0 R11: 0000000000000293 R12: 00000000006e6a10 [ 54.213125] R13: 0000000000000000 R14: 000000000000002d 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