[ 34.734246] audit: type=1800 audit(1555446451.575:33): pid=7011 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 [ 34.764285] audit: type=1800 audit(1555446451.575:34): pid=7011 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: [ 55.099455] random: sshd: uninitialized urandom read (32 bytes read) [ 55.412044] audit: type=1400 audit(1555446472.255:35): avc: denied { map } for pid=7184 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 [ 55.475586] random: sshd: uninitialized urandom read (32 bytes read) [ 56.016315] random: sshd: uninitialized urandom read (32 bytes read) [ 56.196708] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.181' (ECDSA) to the list of known hosts. [ 61.935356] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 62.065225] audit: type=1400 audit(1555446478.905:36): avc: denied { map } for pid=7196 comm="syz-executor119" path="/root/syz-executor119668547" 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 [ 62.092122] [ 62.093872] ====================================================== [ 62.100614] WARNING: possible circular locking dependency detected [ 62.106947] 4.14.111 #1 Not tainted [ 62.110645] ------------------------------------------------------ [ 62.117132] syz-executor119/7196 is trying to acquire lock: [ 62.122832] (event_mutex){+.+.}, at: [] ftrace_profile_set_filter+0x6a/0x1d0 [ 62.131960] [ 62.131960] but task is already holding lock: [ 62.137938] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x150/0x2c0 [ 62.147247] [ 62.147247] which lock already depends on the new lock. [ 62.147247] [ 62.155560] [ 62.155560] the existing dependency chain (in reverse order) is: [ 62.163430] [ 62.163430] -> #4 (&cpuctx_mutex){+.+.}: [ 62.168996] lock_acquire+0x16f/0x430 [ 62.173433] __mutex_lock+0xe8/0x1470 [ 62.177790] mutex_lock_nested+0x16/0x20 [ 62.182507] perf_event_init_cpu+0xc2/0x170 [ 62.187381] perf_event_init+0x2d8/0x31a [ 62.191957] start_kernel+0x3b9/0x700 [ 62.196270] x86_64_start_reservations+0x29/0x2b [ 62.201539] x86_64_start_kernel+0x77/0x7b [ 62.206296] secondary_startup_64+0xa5/0xb0 [ 62.211126] [ 62.211126] -> #3 (pmus_lock){+.+.}: [ 62.216743] lock_acquire+0x16f/0x430 [ 62.221056] __mutex_lock+0xe8/0x1470 [ 62.225370] mutex_lock_nested+0x16/0x20 [ 62.229946] perf_event_init_cpu+0x2f/0x170 [ 62.234780] cpuhp_invoke_callback+0x1ec/0x1ac0 [ 62.240122] _cpu_up+0x228/0x530 [ 62.244142] do_cpu_up+0x121/0x150 [ 62.248184] cpu_up+0x1b/0x20 [ 62.251890] smp_init+0x157/0x173 [ 62.256085] kernel_init_freeable+0x30e/0x538 [ 62.261099] kernel_init+0x12/0x162 [ 62.265533] ret_from_fork+0x3a/0x50 [ 62.269747] [ 62.269747] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 62.276165] lock_acquire+0x16f/0x430 [ 62.280510] cpus_read_lock+0x3d/0xc0 [ 62.284866] static_key_slow_inc+0x13/0x30 [ 62.289769] tracepoint_probe_register_prio+0x4dc/0x6d0 [ 62.295826] tracepoint_probe_register+0x2b/0x40 [ 62.301089] trace_event_reg+0x277/0x330 [ 62.305653] perf_trace_init+0x450/0xaa0 [ 62.310211] perf_tp_event_init+0x7d/0xf0 [ 62.314852] perf_try_init_event+0x170/0x210 [ 62.319763] perf_event_alloc.part.0+0xd48/0x2540 [ 62.325109] SYSC_perf_event_open+0xa2d/0x24c0 [ 62.330195] SyS_perf_event_open+0x34/0x40 [ 62.334930] do_syscall_64+0x1eb/0x630 [ 62.339319] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 62.345201] [ 62.345201] -> #1 (tracepoints_mutex){+.+.}: [ 62.351084] lock_acquire+0x16f/0x430 [ 62.355387] __mutex_lock+0xe8/0x1470 [ 62.359694] mutex_lock_nested+0x16/0x20 [ 62.364279] tracepoint_probe_register_prio+0x36/0x6d0 [ 62.370061] tracepoint_probe_register+0x2b/0x40 [ 62.375437] trace_event_reg+0x277/0x330 [ 62.380041] perf_trace_init+0x450/0xaa0 [ 62.384611] perf_tp_event_init+0x7d/0xf0 [ 62.389253] perf_try_init_event+0x170/0x210 [ 62.394161] perf_event_alloc.part.0+0xd48/0x2540 [ 62.399507] SYSC_perf_event_open+0xa2d/0x24c0 [ 62.404588] SyS_perf_event_open+0x34/0x40 [ 62.409317] do_syscall_64+0x1eb/0x630 [ 62.413703] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 62.419485] [ 62.419485] -> #0 (event_mutex){+.+.}: [ 62.424935] __lock_acquire+0x2c89/0x45e0 [ 62.429580] lock_acquire+0x16f/0x430 [ 62.433929] __mutex_lock+0xe8/0x1470 [ 62.438231] mutex_lock_nested+0x16/0x20 [ 62.442795] ftrace_profile_set_filter+0x6a/0x1d0 [ 62.448141] perf_event_set_filter+0xa54/0xd10 [ 62.453264] perf_ioctl+0x53c/0xcb0 [ 62.457405] do_vfs_ioctl+0x7b9/0x1070 [ 62.462155] SyS_ioctl+0x8f/0xc0 [ 62.466381] do_syscall_64+0x1eb/0x630 [ 62.470927] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 62.476629] [ 62.476629] other info that might help us debug this: [ 62.476629] [ 62.484993] Chain exists of: [ 62.484993] event_mutex --> pmus_lock --> &cpuctx_mutex [ 62.484993] [ 62.494868] Possible unsafe locking scenario: [ 62.494868] [ 62.500924] CPU0 CPU1 [ 62.505622] ---- ---- [ 62.510318] lock(&cpuctx_mutex); [ 62.513932] lock(pmus_lock); [ 62.519625] lock(&cpuctx_mutex); [ 62.525797] lock(event_mutex); [ 62.529146] [ 62.529146] *** DEADLOCK *** [ 62.529146] [ 62.535190] 1 lock held by syz-executor119/7196: [ 62.539939] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x150/0x2c0 [ 62.549571] [ 62.549571] stack backtrace: [ 62.554103] CPU: 1 PID: 7196 Comm: syz-executor119 Not tainted 4.14.111 #1 [ 62.561511] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 62.570872] Call Trace: [ 62.573455] dump_stack+0x138/0x19c [ 62.577182] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 62.582536] __lock_acquire+0x2c89/0x45e0 [ 62.586665] ? is_bpf_text_address+0xa6/0x120 [ 62.591271] ? kernel_text_address+0x73/0xf0 [ 62.595668] ? trace_hardirqs_on+0x10/0x10 [ 62.599886] lock_acquire+0x16f/0x430 [ 62.603949] ? ftrace_profile_set_filter+0x6a/0x1d0 [ 62.609054] ? ftrace_profile_set_filter+0x6a/0x1d0 [ 62.614068] __mutex_lock+0xe8/0x1470 [ 62.617851] ? ftrace_profile_set_filter+0x6a/0x1d0 [ 62.622857] ? save_trace+0x290/0x290 [ 62.626647] ? ftrace_profile_set_filter+0x6a/0x1d0 [ 62.631650] ? __might_fault+0x110/0x1d0 [ 62.635759] ? mutex_trylock+0x1c0/0x1c0 [ 62.639990] ? __might_fault+0x110/0x1d0 [ 62.644082] ? lock_downgrade+0x6e0/0x6e0 [ 62.648223] mutex_lock_nested+0x16/0x20 [ 62.652268] ? mutex_lock_nested+0x16/0x20 [ 62.656536] ftrace_profile_set_filter+0x6a/0x1d0 [ 62.661369] ? ftrace_profile_free_filter+0x70/0x70 [ 62.666369] ? memdup_user+0x58/0xa0 [ 62.670065] perf_event_set_filter+0xa54/0xd10 [ 62.674627] ? mutex_trylock+0x1c0/0x1c0 [ 62.678673] ? find_held_lock+0x35/0x130 [ 62.682720] ? rotate_ctx.part.0+0x260/0x260 [ 62.687141] ? lock_downgrade+0x6e0/0x6e0 [ 62.691287] ? mutex_lock_nested+0x16/0x20 [ 62.695703] ? mutex_lock_nested+0x16/0x20 [ 62.699965] ? perf_event_ctx_lock_nested+0x248/0x2c0 [ 62.705248] perf_ioctl+0x53c/0xcb0 [ 62.708855] ? SYSC_perf_event_open+0x24c0/0x24c0 [ 62.713688] ? fd_install+0x4d/0x60 [ 62.717302] ? SYSC_perf_event_open+0x24c0/0x24c0 [ 62.722262] do_vfs_ioctl+0x7b9/0x1070 [ 62.743237] ? selinux_file_mprotect+0x5d0/0x5d0 [ 62.747979] ? ioctl_preallocate+0x1c0/0x1c0 [ 62.752376] ? perf_event_set_output+0x460/0x460 [ 62.757112] ? lock_downgrade+0x6e0/0x6e0 [ 62.761240] ? security_file_ioctl+0x83/0xc0 [ 62.765630] ? security_file_ioctl+0x8f/0xc0 [ 62.770123] SyS_ioctl+0x8f/0xc0 [ 62.773586] ? do_vfs_ioctl+0x1070/0x1070 [ 62.777723] do_syscall_64+0x1eb/0x630 [ 62.781588] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.786418] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 62.791581] RIP: 0033:0x440249 [ 62.794749] RSP: 002b:00007fff30a35f08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 62.802432] RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440249 [ 62.809683] RDX: 0000000020000000 RSI: 0000000040082406 RDI: 0000000000000003 [ 62.816973] RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 [ 62.824354] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401ad0 [ 62.831823] R13: 0000000000401b60 R14: 0000000000000000 R15: 0000000000000000