[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 24.690189] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 27.880992] random: sshd: uninitialized urandom read (32 bytes read) [ 28.157630] random: sshd: uninitialized urandom read (32 bytes read) [ 28.677148] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.17' (ECDSA) to the list of known hosts. [ 34.581809] urandom_read: 1 callbacks suppressed [ 34.581814] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 34.685919] [ 34.687556] ====================================================== [ 34.693851] WARNING: possible circular locking dependency detected [ 34.700192] 4.19.0-rc1+ #216 Not tainted [ 34.704322] ------------------------------------------------------ [ 34.710635] syz-executor417/4686 is trying to acquire lock: [ 34.716321] 00000000986ab290 (&sb->s_type->i_mutex_key#11){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 34.725415] [ 34.725415] but task is already holding lock: [ 34.731378] 00000000d42da26d (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 34.739252] [ 34.739252] which lock already depends on the new lock. [ 34.739252] [ 34.747545] [ 34.747545] the existing dependency chain (in reverse order) is: [ 34.755243] [ 34.755243] -> #2 (ashmem_mutex){+.+.}: [ 34.760701] __mutex_lock+0x171/0x1700 [ 34.765114] mutex_lock_nested+0x16/0x20 [ 34.769683] ashmem_mmap+0x55/0x520 [ 34.773822] mmap_region+0xf27/0x1c50 [ 34.778201] do_mmap+0xa10/0x1220 [ 34.782165] vm_mmap_pgoff+0x213/0x2c0 [ 34.786555] ksys_mmap_pgoff+0x4da/0x660 [ 34.791123] __x64_sys_mmap+0xe9/0x1b0 [ 34.795517] do_syscall_64+0x1b9/0x820 [ 34.799933] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.805630] [ 34.805630] -> #1 (&mm->mmap_sem){++++}: [ 34.811162] __might_fault+0x155/0x1e0 [ 34.815622] _copy_to_user+0x30/0x110 [ 34.819934] filldir+0x1ea/0x3a0 [ 34.823805] dcache_readdir+0x13a/0x620 [ 34.828282] iterate_dir+0x48b/0x5d0 [ 34.832500] __x64_sys_getdents+0x29f/0x510 [ 34.837338] do_syscall_64+0x1b9/0x820 [ 34.841739] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.847466] [ 34.847466] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 34.854309] lock_acquire+0x1e4/0x4f0 [ 34.858631] down_write+0x8f/0x130 [ 34.862683] shmem_fallocate+0x18b/0x12e0 [ 34.867351] ashmem_shrink_scan+0x236/0x630 [ 34.872179] ashmem_ioctl+0x3ae/0x13a0 [ 34.876580] do_vfs_ioctl+0x1de/0x1720 [ 34.880971] ksys_ioctl+0xa9/0xd0 [ 34.884936] __x64_sys_ioctl+0x73/0xb0 [ 34.889330] do_syscall_64+0x1b9/0x820 [ 34.893721] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.899409] [ 34.899409] other info that might help us debug this: [ 34.899409] [ 34.907581] Chain exists of: [ 34.907581] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 34.907581] [ 34.919107] Possible unsafe locking scenario: [ 34.919107] [ 34.925219] CPU0 CPU1 [ 34.929868] ---- ---- [ 34.934512] lock(ashmem_mutex); [ 34.937944] lock(&mm->mmap_sem); [ 34.943980] lock(ashmem_mutex); [ 34.949931] lock(&sb->s_type->i_mutex_key#11); [ 34.954672] [ 34.954672] *** DEADLOCK *** [ 34.954672] [ 34.960724] 1 lock held by syz-executor417/4686: [ 34.965470] #0: 00000000d42da26d (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 34.973782] [ 34.973782] stack backtrace: [ 34.978306] CPU: 0 PID: 4686 Comm: syz-executor417 Not tainted 4.19.0-rc1+ #216 [ 34.985781] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.995278] Call Trace: [ 34.997948] dump_stack+0x1c9/0x2b4 [ 35.001663] ? dump_stack_print_info.cold.2+0x52/0x52 [ 35.006844] ? vprintk_func+0x81/0x117 [ 35.010719] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 35.016417] ? save_trace+0xe0/0x290 [ 35.020120] __lock_acquire+0x3449/0x5020 [ 35.024247] ? lock_pin_lock+0x350/0x350 [ 35.028294] ? mark_held_locks+0x160/0x160 [ 35.032510] ? mark_held_locks+0x160/0x160 [ 35.036736] ? __bfs+0xb0/0x7b0 [ 35.040009] ? __bfs+0xb0/0x7b0 [ 35.043274] ? graph_lock+0x170/0x170 [ 35.047057] ? print_usage_bug+0xc0/0xc0 [ 35.051105] ? pagevec_lru_move_fn+0x1ad/0x270 [ 35.055670] ? trace_hardirqs_off_caller+0x2b0/0x2b0 [ 35.060752] ? graph_lock+0x170/0x170 [ 35.064530] ? graph_lock+0x170/0x170 [ 35.068309] lock_acquire+0x1e4/0x4f0 [ 35.072089] ? shmem_fallocate+0x18b/0x12e0 [ 35.076388] ? lock_release+0x9f0/0x9f0 [ 35.080357] ? check_same_owner+0x340/0x340 [ 35.084717] ? mark_held_locks+0x160/0x160 [ 35.088958] ? rcu_note_context_switch+0x680/0x680 [ 35.093875] down_write+0x8f/0x130 [ 35.097403] ? shmem_fallocate+0x18b/0x12e0 [ 35.101711] ? down_read+0x1d0/0x1d0 [ 35.105421] ? kasan_check_write+0x14/0x20 [ 35.109705] ? do_raw_spin_lock+0xc1/0x200 [ 35.113931] shmem_fallocate+0x18b/0x12e0 [ 35.118065] ? depot_save_stack+0x291/0x470 [ 35.122372] ? save_stack+0xa9/0xd0 [ 35.125986] ? save_stack+0x43/0xd0 [ 35.129597] ? shmem_setattr+0xda0/0xda0 [ 35.133642] ? ashmem_ioctl+0x1181/0x13a0 [ 35.137818] ? do_vfs_ioctl+0x1de/0x1720 [ 35.141865] ? ksys_ioctl+0xa9/0xd0 [ 35.145474] ? __x64_sys_ioctl+0x73/0xb0 [ 35.149520] ? do_syscall_64+0x1b9/0x820 [ 35.153608] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.158961] ? find_held_lock+0x36/0x1c0 [ 35.163012] ? find_held_lock+0x36/0x1c0 [ 35.167060] ? lock_acquire+0x1e4/0x4f0 [ 35.171021] ? ashmem_shrink_scan+0xb4/0x630 [ 35.175413] ? lock_downgrade+0x8f0/0x8f0 [ 35.179591] ? lock_release+0x9f0/0x9f0 [ 35.183557] ? refcount_sub_and_test_checked+0x21a/0x350 [ 35.188991] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 35.194430] ? mutex_trylock+0x24c/0x2b0 [ 35.198526] ? ashmem_shrink_scan+0xb4/0x630 [ 35.202925] ? __mutex_add_waiter+0x2a0/0x2a0 [ 35.207408] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 35.212935] ? apparmor_capable+0x351/0x6c0 [ 35.217242] ashmem_shrink_scan+0x236/0x630 [ 35.221551] ? cap_capable+0x1f9/0x260 [ 35.225424] ? ashmem_release+0x190/0x190 [ 35.229557] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 35.235086] ? ns_capable_common+0x13f/0x170 [ 35.239523] ashmem_ioctl+0x3ae/0x13a0 [ 35.243400] ? ashmem_shrink_scan+0x630/0x630 [ 35.247877] ? find_held_lock+0x36/0x1c0 [ 35.251926] ? __do_page_fault+0x620/0xe50 [ 35.256151] ? ashmem_shrink_scan+0x630/0x630 [ 35.260640] do_vfs_ioctl+0x1de/0x1720 [ 35.264511] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 35.270031] ? ioctl_preallocate+0x300/0x300 [ 35.274421] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 35.279952] ? __fget_light+0x2f7/0x440 [ 35.283914] ? __handle_mm_fault+0x4350/0x4350 [ 35.288481] ? fget_raw+0x20/0x20 [ 35.291968] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 35.297494] ? __do_page_fault+0x449/0xe50 [ 35.301726] ? do_syscall_64+0x9a/0x820 [ 35.305728] ? do_syscall_64+0x9a/0x820 [ 35.309691] ? lockdep_hardirqs_on+0x421/0x5c0 [ 35.314257] ? security_file_ioctl+0x94/0xc0 [ 35.318651] ksys_ioctl+0xa9/0xd0 [ 35.322141] __x64_sys_ioctl+0x73/0xb0 [ 35.326020] do_syscall_64+0x1b9/0x820 [ 35.329989] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 35.335342] ? syscall_return_slowpath+0x5e0/0x5e0 [ 35.340255] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.345084] ? trace_hardirqs_on_caller+0x2b0/0x2b0 [ 35.350087] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 35.355087] ? prepare_exit_to_usermode+0x291/0x3b0 [ 35.360089] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.364918] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.370210] RIP: 0033:0x440099 [ 35.373388] 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