[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 23.544253] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 27.622586] random: sshd: uninitialized urandom read (32 bytes read) [ 28.047578] random: sshd: uninitialized urandom read (32 bytes read) [ 28.582587] random: sshd: uninitialized urandom read (32 bytes read) [ 28.764069] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.47' (ECDSA) to the list of known hosts. [ 34.249961] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 34.345959] [ 34.347591] ====================================================== [ 34.353884] WARNING: possible circular locking dependency detected [ 34.360179] 4.18.0-rc8-next-20180810+ #36 Not tainted [ 34.365342] ------------------------------------------------------ [ 34.371634] syz-executor900/4483 is trying to acquire lock: [ 34.377321] 00000000d2bfc8fe (&sb->s_type->i_mutex_key#9){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 34.386329] [ 34.386329] but task is already holding lock: [ 34.392359] 0000000025208078 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 34.400240] [ 34.400240] which lock already depends on the new lock. [ 34.400240] [ 34.408535] [ 34.408535] the existing dependency chain (in reverse order) is: [ 34.416131] [ 34.416131] -> #2 (ashmem_mutex){+.+.}: [ 34.421576] __mutex_lock+0x171/0x1700 [ 34.426019] mutex_lock_nested+0x16/0x20 [ 34.430598] ashmem_mmap+0x55/0x520 [ 34.434727] mmap_region+0xf27/0x1c50 [ 34.439031] do_mmap+0xa10/0x1220 [ 34.443061] vm_mmap_pgoff+0x213/0x2c0 [ 34.447458] ksys_mmap_pgoff+0x4da/0x660 [ 34.452024] __x64_sys_mmap+0xe9/0x1b0 [ 34.456478] do_syscall_64+0x1b9/0x820 [ 34.460872] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.466562] [ 34.466562] -> #1 (&mm->mmap_sem){++++}: [ 34.472089] __might_fault+0x155/0x1e0 [ 34.476530] _copy_to_user+0x30/0x110 [ 34.480836] filldir+0x1ea/0x3a0 [ 34.484700] dcache_readdir+0x13a/0x620 [ 34.489172] iterate_dir+0x48b/0x5d0 [ 34.493396] __x64_sys_getdents+0x29f/0x510 [ 34.498221] do_syscall_64+0x1b9/0x820 [ 34.502615] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.508357] [ 34.508357] -> #0 (&sb->s_type->i_mutex_key#9){++++}: [ 34.515021] lock_acquire+0x1e4/0x540 [ 34.519335] down_write+0x8f/0x130 [ 34.523379] shmem_fallocate+0x18b/0x12e0 [ 34.528029] ashmem_shrink_scan+0x236/0x630 [ 34.532860] ashmem_ioctl+0x3ae/0x13a0 [ 34.537247] do_vfs_ioctl+0x1de/0x1720 [ 34.541635] ksys_ioctl+0xa9/0xd0 [ 34.545587] __x64_sys_ioctl+0x73/0xb0 [ 34.549975] do_syscall_64+0x1b9/0x820 [ 34.554371] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.560073] [ 34.560073] other info that might help us debug this: [ 34.560073] [ 34.568191] Chain exists of: [ 34.568191] &sb->s_type->i_mutex_key#9 --> &mm->mmap_sem --> ashmem_mutex [ 34.568191] [ 34.579623] Possible unsafe locking scenario: [ 34.579623] [ 34.585656] CPU0 CPU1 [ 34.590301] ---- ---- [ 34.594942] lock(ashmem_mutex); [ 34.598385] lock(&mm->mmap_sem); [ 34.604418] lock(ashmem_mutex); [ 34.610369] lock(&sb->s_type->i_mutex_key#9); [ 34.615015] [ 34.615015] *** DEADLOCK *** [ 34.615015] [ 34.621091] 1 lock held by syz-executor900/4483: [ 34.625816] #0: 0000000025208078 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 34.634284] [ 34.634284] stack backtrace: [ 34.638769] CPU: 1 PID: 4483 Comm: syz-executor900 Not tainted 4.18.0-rc8-next-20180810+ #36 [ 34.647321] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.656655] Call Trace: [ 34.659235] dump_stack+0x1c9/0x2b4 [ 34.662840] ? dump_stack_print_info.cold.2+0x52/0x52 [ 34.668019] ? vprintk_func+0x81/0x117 [ 34.671886] print_circular_bug.isra.37.cold.58+0x1bd/0x27d [ 34.677581] ? save_trace+0xe0/0x290 [ 34.681273] __lock_acquire+0x3449/0x5020 [ 34.685401] ? lock_pin_lock+0x350/0x350 [ 34.689457] ? trace_hardirqs_on+0x10/0x10 [ 34.693671] ? trace_hardirqs_on+0x10/0x10 [ 34.697888] ? __bfs+0xb0/0x7b0 [ 34.701151] ? __bfs+0xb0/0x7b0 [ 34.704477] ? graph_lock+0x170/0x170 [ 34.708267] ? print_usage_bug+0xc0/0xc0 [ 34.712312] ? mark_held_locks+0xc9/0x160 [ 34.716441] ? do_raw_spin_trylock+0x1c0/0x1c0 [ 34.721014] ? graph_lock+0x170/0x170 [ 34.724808] ? _raw_spin_unlock_irqrestore+0x74/0xc0 [ 34.729905] ? graph_lock+0x170/0x170 [ 34.733687] ? find_held_lock+0x36/0x1c0 [ 34.737746] lock_acquire+0x1e4/0x540 [ 34.741533] ? shmem_fallocate+0x18b/0x12e0 [ 34.745833] ? lock_release+0xa30/0xa30 [ 34.749789] ? check_same_owner+0x340/0x340 [ 34.754088] ? trace_hardirqs_on+0x10/0x10 [ 34.758368] ? rcu_note_context_switch+0x730/0x730 [ 34.763285] down_write+0x8f/0x130 [ 34.766805] ? shmem_fallocate+0x18b/0x12e0 [ 34.771106] ? down_read+0x1d0/0x1d0 [ 34.774797] ? _raw_spin_unlock_irqrestore+0x74/0xc0 [ 34.779879] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.784878] shmem_fallocate+0x18b/0x12e0 [ 34.789009] ? depot_save_stack+0x291/0x470 [ 34.793313] ? save_stack+0xa9/0xd0 [ 34.796919] ? save_stack+0x43/0xd0 [ 34.800527] ? shmem_setattr+0xda0/0xda0 [ 34.804568] ? ashmem_ioctl+0x1181/0x13a0 [ 34.808711] ? do_vfs_ioctl+0x1de/0x1720 [ 34.812753] ? ksys_ioctl+0xa9/0xd0 [ 34.816365] ? __x64_sys_ioctl+0x73/0xb0 [ 34.820405] ? do_syscall_64+0x1b9/0x820 [ 34.824445] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.829797] ? find_held_lock+0x36/0x1c0 [ 34.833838] ? find_held_lock+0x36/0x1c0 [ 34.837880] ? lock_acquire+0x1e4/0x540 [ 34.841832] ? ashmem_shrink_scan+0xb4/0x630 [ 34.846219] ? lock_downgrade+0x8f0/0x8f0 [ 34.850386] ? kasan_check_read+0x11/0x20 [ 34.854546] ? lock_release+0xa30/0xa30 [ 34.858501] ? __lock_is_held+0xb5/0x140 [ 34.862547] ? mutex_trylock+0x24c/0x2b0 [ 34.866590] ? ashmem_shrink_scan+0xb4/0x630 [ 34.870977] ? __mutex_add_waiter+0x2a0/0x2a0 [ 34.875473] ? wait_for_completion+0x8d0/0x8d0 [ 34.880087] ashmem_shrink_scan+0x236/0x630 [ 34.884396] ? cap_capable+0x1f9/0x260 [ 34.888282] ? ashmem_release+0x190/0x190 [ 34.892431] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.897956] ? ns_capable_common+0x13f/0x170 [ 34.902348] ashmem_ioctl+0x3ae/0x13a0 [ 34.906216] ? ashmem_shrink_scan+0x630/0x630 [ 34.910701] ? find_held_lock+0x36/0x1c0 [ 34.914743] ? ashmem_shrink_scan+0x630/0x630 [ 34.919218] do_vfs_ioctl+0x1de/0x1720 [ 34.923086] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 34.928620] ? ioctl_preallocate+0x300/0x300 [ 34.933013] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.938534] ? __fget_light+0x2f7/0x440 [ 34.942487] ? __handle_mm_fault+0x4470/0x4470 [ 34.947059] ? fget_raw+0x20/0x20 [ 34.950501] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.956020] ? __do_page_fault+0x449/0xe50 [ 34.960235] ? mm_fault_error+0x380/0x380 [ 34.964361] ? security_file_ioctl+0x94/0xc0 [ 34.968750] ksys_ioctl+0xa9/0xd0 [ 34.972182] __x64_sys_ioctl+0x73/0xb0 [ 34.976062] do_syscall_64+0x1b9/0x820 [ 34.979935] ? syscall_slow_exit_work+0x500/0x500 [ 34.984764] ? syscall_return_slowpath+0x5e0/0x5e0 [ 34.989679] ? syscall_return_slowpath+0x31d/0x5e0 [ 34.994588] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 34.999942] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.004872] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.010041] RIP: 0033:0x440099 [ 35.013224] 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 [ 35.032105] RSP: 002b:00007fff3613dbf8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 35.039791] RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440099 [ 35.047038] RDX: 00000