[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 23.961852] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 24.562717] random: sshd: uninitialized urandom read (32 bytes read) [ 24.905048] random: sshd: uninitialized urandom read (32 bytes read) Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 25.433026] random: sshd: uninitialized urandom read (32 bytes read) [ 25.636977] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.15.197' (ECDSA) to the list of known hosts. [ 31.263454] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 31.362502] [ 31.364144] ====================================================== [ 31.370438] WARNING: possible circular locking dependency detected [ 31.376732] 4.18.0-next-20180823+ #46 Not tainted [ 31.381548] ------------------------------------------------------ [ 31.387842] syz-executor685/4461 is trying to acquire lock: [ 31.393531] 00000000094b0ebe (&sb->s_type->i_mutex_key#10){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 31.402622] [ 31.402622] but task is already holding lock: [ 31.408568] 0000000063d96d2a (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 31.416440] [ 31.416440] which lock already depends on the new lock. [ 31.416440] [ 31.424736] [ 31.424736] the existing dependency chain (in reverse order) is: [ 31.432334] [ 31.432334] -> #2 (ashmem_mutex){+.+.}: [ 31.437809] __mutex_lock+0x171/0x1700 [ 31.442199] mutex_lock_nested+0x16/0x20 [ 31.446781] ashmem_mmap+0x55/0x520 [ 31.450910] mmap_region+0xf27/0x1c50 [ 31.455213] do_mmap+0xa10/0x1220 [ 31.459166] vm_mmap_pgoff+0x213/0x2c0 [ 31.463559] ksys_mmap_pgoff+0x4da/0x660 [ 31.468127] __x64_sys_mmap+0xe9/0x1b0 [ 31.472519] do_syscall_64+0x1b9/0x820 [ 31.476906] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 31.482592] [ 31.482592] -> #1 (&mm->mmap_sem){++++}: [ 31.488122] __might_fault+0x155/0x1e0 [ 31.492523] _copy_to_user+0x30/0x110 [ 31.496830] filldir+0x1ea/0x3a0 [ 31.500701] dcache_readdir+0x13a/0x620 [ 31.505175] iterate_dir+0x48b/0x5d0 [ 31.509390] __x64_sys_getdents+0x29f/0x510 [ 31.514229] do_syscall_64+0x1b9/0x820 [ 31.518621] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 31.524312] [ 31.524312] -> #0 (&sb->s_type->i_mutex_key#10){++++}: [ 31.531103] lock_acquire+0x1e4/0x4f0 [ 31.535405] down_write+0x8f/0x130 [ 31.539447] shmem_fallocate+0x18b/0x12e0 [ 31.544098] ashmem_shrink_scan+0x236/0x630 [ 31.548918] ashmem_ioctl+0x3ae/0x13a0 [ 31.553310] do_vfs_ioctl+0x1de/0x1720 [ 31.557703] ksys_ioctl+0xa9/0xd0 [ 31.561655] __x64_sys_ioctl+0x73/0xb0 [ 31.566066] do_syscall_64+0x1b9/0x820 [ 31.570457] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 31.576142] [ 31.576142] other info that might help us debug this: [ 31.576142] [ 31.584294] Chain exists of: [ 31.584294] &sb->s_type->i_mutex_key#10 --> &mm->mmap_sem --> ashmem_mutex [ 31.584294] [ 31.595835] Possible unsafe locking scenario: [ 31.595835] [ 31.601870] CPU0 CPU1 [ 31.606510] ---- ---- [ 31.611151] lock(ashmem_mutex); [ 31.614581] lock(&mm->mmap_sem); [ 31.620632] lock(ashmem_mutex); [ 31.626580] lock(&sb->s_type->i_mutex_key#10); [ 31.631321] [ 31.631321] *** DEADLOCK *** [ 31.631321] [ 31.637371] 1 lock held by syz-executor685/4461: [ 31.642101] #0: 0000000063d96d2a (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 31.650410] [ 31.650410] stack backtrace: [ 31.654888] CPU: 1 PID: 4461 Comm: syz-executor685 Not tainted 4.18.0-next-20180823+ #46 [ 31.663091] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.672420] Call Trace: [ 31.674992] dump_stack+0x1c9/0x2b4 [ 31.678604] ? dump_stack_print_info.cold.2+0x52/0x52 [ 31.683779] ? vprintk_func+0x81/0x117 [ 31.687650] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 31.693342] ? save_trace+0xe0/0x290 [ 31.697046] __lock_acquire+0x3449/0x5020 [ 31.701175] ? mark_held_locks+0x160/0x160 [ 31.705429] ? mark_held_locks+0x160/0x160 [ 31.709651] ? is_bpf_text_address+0xd7/0x170 [ 31.714129] ? __kernel_text_address+0xd/0x40 [ 31.718605] ? unwind_get_return_address+0x61/0xa0 [ 31.723517] ? __save_stack_trace+0x8d/0xf0 [ 31.727818] ? graph_lock+0x170/0x170 [ 31.731601] ? print_usage_bug+0xc0/0xc0 [ 31.735642] ? save_trace+0x290/0x290 [ 31.739422] ? graph_lock+0x170/0x170 [ 31.743203] ? graph_lock+0x170/0x170 [ 31.746988] lock_acquire+0x1e4/0x4f0 [ 31.750769] ? shmem_fallocate+0x18b/0x12e0 [ 31.755090] ? lock_release+0x9f0/0x9f0 [ 31.759047] ? check_same_owner+0x340/0x340 [ 31.763354] ? mark_held_locks+0x160/0x160 [ 31.767582] ? rcu_note_context_switch+0x680/0x680 [ 31.772505] down_write+0x8f/0x130 [ 31.776026] ? shmem_fallocate+0x18b/0x12e0 [ 31.780329] ? down_read+0x1d0/0x1d0 [ 31.784030] ? kasan_check_write+0x14/0x20 [ 31.788244] ? do_raw_spin_lock+0xc1/0x200 [ 31.792467] shmem_fallocate+0x18b/0x12e0 [ 31.796617] ? depot_save_stack+0x291/0x470 [ 31.800919] ? save_stack+0xa9/0xd0 [ 31.804532] ? save_stack+0x43/0xd0 [ 31.808142] ? shmem_setattr+0xda0/0xda0 [ 31.812198] ? ashmem_ioctl+0x1181/0x13a0 [ 31.816328] ? do_vfs_ioctl+0x1de/0x1720 [ 31.820389] ? ksys_ioctl+0xa9/0xd0 [ 31.824001] ? __x64_sys_ioctl+0x73/0xb0 [ 31.828041] ? do_syscall_64+0x1b9/0x820 [ 31.832088] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 31.837431] ? find_held_lock+0x36/0x1c0 [ 31.841474] ? find_held_lock+0x36/0x1c0 [ 31.845516] ? lock_acquire+0x1e4/0x4f0 [ 31.849485] ? ashmem_shrink_scan+0xb4/0x630 [ 31.853875] ? lock_downgrade+0x8f0/0x8f0 [ 31.858002] ? lock_release+0x9f0/0x9f0 [ 31.861958] ? __lock_is_held+0xb5/0x140 [ 31.866000] ? mutex_trylock+0x24c/0x2b0 [ 31.870128] ? ashmem_shrink_scan+0xb4/0x630 [ 31.874522] ? __mutex_add_waiter+0x2a0/0x2a0 [ 31.878999] ? wait_for_completion+0x8d0/0x8d0 [ 31.883564] ashmem_shrink_scan+0x236/0x630 [ 31.887885] ? cap_capable+0x1f9/0x260 [ 31.891756] ? ashmem_release+0x190/0x190 [ 31.895889] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 31.901426] ? ns_capable_common+0x13f/0x170 [ 31.905816] ashmem_ioctl+0x3ae/0x13a0 [ 31.909712] ? ashmem_shrink_scan+0x630/0x630 [ 31.914203] ? find_held_lock+0x36/0x1c0 [ 31.918299] ? __do_page_fault+0x620/0xe50 [ 31.922531] ? ashmem_shrink_scan+0x630/0x630 [ 31.927008] do_vfs_ioctl+0x1de/0x1720 [ 31.930878] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 31.936396] ? ioctl_preallocate+0x300/0x300 [ 31.940819] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 31.946353] ? __fget_light+0x2f7/0x440 [ 31.950349] ? __handle_mm_fault+0x4370/0x4370 [ 31.954922] ? fget_raw+0x20/0x20 [ 31.958364] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 31.963885] ? __do_page_fault+0x449/0xe50 [ 31.968104] ? do_syscall_64+0x9a/0x820 [ 31.972060] ? do_syscall_64+0x9a/0x820 [ 31.976016] ? lockdep_hardirqs_on+0x421/0x5c0 [ 31.980579] ? security_file_ioctl+0x94/0xc0 [ 31.984974] ksys_ioctl+0xa9/0xd0 [ 31.988412] __x64_sys_ioctl+0x73/0xb0 [ 31.992292] do_syscall_64+0x1b9/0x820 [ 31.996173] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.001520] ? syscall_return_slowpath+0x5e0/0x5e0 [ 32.006432] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.011255] ? trace_hardirqs_on_caller+0x2b0/0x2b0 [ 32.016269] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 32.021308] ? prepare_exit_to_usermode+0x291/0x3b0 [ 32.026342] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.031186] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.036370] RIP: 0033:0x440099 [ 32.039542] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 32.058427] RSP: 002b:00007ffe9063c518 EFLAGS: 00000217 ORIG_RAX: 00000000000000