[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 24.454749] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 26.975940] random: sshd: uninitialized urandom read (32 bytes read) [ 27.205457] random: sshd: uninitialized urandom read (32 bytes read) [ 27.784545] random: sshd: uninitialized urandom read (32 bytes read) [ 35.238274] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.15.198' (ECDSA) to the list of known hosts. [ 40.846635] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 40.948860] [ 40.950662] ====================================================== [ 40.956961] WARNING: possible circular locking dependency detected [ 40.963263] 4.19.0-rc1-next-20180831+ #53 Not tainted [ 40.968431] ------------------------------------------------------ [ 40.974728] syz-executor687/4715 is trying to acquire lock: [ 40.980414] 000000000dea8d09 (&sb->s_type->i_mutex_key#11){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 40.989593] [ 40.989593] but task is already holding lock: [ 40.995554] 000000001572f9e1 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 41.003431] [ 41.003431] which lock already depends on the new lock. [ 41.003431] [ 41.011731] [ 41.011731] the existing dependency chain (in reverse order) is: [ 41.019336] [ 41.019336] -> #2 (ashmem_mutex){+.+.}: [ 41.024793] __mutex_lock+0x171/0x1700 [ 41.029303] mutex_lock_nested+0x16/0x20 [ 41.033878] ashmem_mmap+0x55/0x520 [ 41.038015] mmap_region+0xf27/0x1c50 [ 41.042323] do_mmap+0xa10/0x1220 [ 41.046282] vm_mmap_pgoff+0x213/0x2c0 [ 41.050677] ksys_mmap_pgoff+0x4da/0x660 [ 41.055370] __x64_sys_mmap+0xe9/0x1b0 [ 41.059766] do_syscall_64+0x1b9/0x820 [ 41.064167] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.069871] [ 41.069871] -> #1 (&mm->mmap_sem){++++}: [ 41.075411] __might_fault+0x155/0x1e0 [ 41.079810] _copy_to_user+0x30/0x110 [ 41.084125] filldir+0x1ea/0x3a0 [ 41.088000] dcache_readdir+0x13a/0x620 [ 41.092480] iterate_dir+0x48b/0x5d0 [ 41.096703] __x64_sys_getdents+0x29f/0x510 [ 41.101532] do_syscall_64+0x1b9/0x820 [ 41.105935] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.111625] [ 41.111625] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 41.118379] lock_acquire+0x1e4/0x4f0 [ 41.122691] down_write+0x8f/0x130 [ 41.126737] shmem_fallocate+0x18b/0x12e0 [ 41.131389] ashmem_shrink_scan+0x236/0x630 [ 41.136222] ashmem_ioctl+0x3ae/0x13a0 [ 41.140626] do_vfs_ioctl+0x1de/0x1720 [ 41.145128] ksys_ioctl+0xa9/0xd0 [ 41.149113] __x64_sys_ioctl+0x73/0xb0 [ 41.153507] do_syscall_64+0x1b9/0x820 [ 41.157899] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.163584] [ 41.163584] other info that might help us debug this: [ 41.163584] [ 41.171749] Chain exists of: [ 41.171749] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 41.171749] [ 41.183357] Possible unsafe locking scenario: [ 41.183357] [ 41.189418] CPU0 CPU1 [ 41.194061] ---- ---- [ 41.198706] lock(ashmem_mutex); [ 41.202142] lock(&mm->mmap_sem); [ 41.208192] lock(ashmem_mutex); [ 41.214162] lock(&sb->s_type->i_mutex_key#11); [ 41.218902] [ 41.218902] *** DEADLOCK *** [ 41.218902] [ 41.224991] 1 lock held by syz-executor687/4715: [ 41.229727] #0: 000000001572f9e1 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 41.238139] [ 41.238139] stack backtrace: [ 41.242631] CPU: 0 PID: 4715 Comm: syz-executor687 Not tainted 4.19.0-rc1-next-20180831+ #53 [ 41.251245] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.260584] Call Trace: [ 41.263161] dump_stack+0x1c9/0x2b4 [ 41.266775] ? dump_stack_print_info.cold.2+0x52/0x52 [ 41.271950] ? vprintk_func+0x81/0x117 [ 41.275826] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 41.281522] ? save_trace+0xe0/0x290 [ 41.285221] __lock_acquire+0x3449/0x5020 [ 41.289352] ? mark_held_locks+0x160/0x160 [ 41.293617] ? mark_held_locks+0x160/0x160 [ 41.297844] ? is_bpf_text_address+0xd7/0x170 [ 41.302323] ? __kernel_text_address+0xd/0x40 [ 41.306801] ? unwind_get_return_address+0x61/0xa0 [ 41.311716] ? __save_stack_trace+0x8d/0xf0 [ 41.316020] ? graph_lock+0x170/0x170 [ 41.319876] ? print_usage_bug+0xc0/0xc0 [ 41.323929] ? save_trace+0x290/0x290 [ 41.327713] ? graph_lock+0x170/0x170 [ 41.331625] ? graph_lock+0x170/0x170 [ 41.335410] lock_acquire+0x1e4/0x4f0 [ 41.339203] ? shmem_fallocate+0x18b/0x12e0 [ 41.343517] ? lock_release+0x9f0/0x9f0 [ 41.347513] ? check_same_owner+0x340/0x340 [ 41.351820] ? mark_held_locks+0x160/0x160 [ 41.356041] ? rcu_note_context_switch+0x680/0x680 [ 41.360958] down_write+0x8f/0x130 [ 41.364483] ? shmem_fallocate+0x18b/0x12e0 [ 41.368793] ? down_read+0x1d0/0x1d0 [ 41.372494] ? kasan_check_write+0x14/0x20 [ 41.376715] ? do_raw_spin_lock+0xc1/0x200 [ 41.380936] shmem_fallocate+0x18b/0x12e0 [ 41.385071] ? depot_save_stack+0x291/0x470 [ 41.389374] ? save_stack+0xa9/0xd0 [ 41.392999] ? save_stack+0x43/0xd0 [ 41.396608] ? shmem_setattr+0xda0/0xda0 [ 41.400654] ? ashmem_ioctl+0x1181/0x13a0 [ 41.404785] ? do_vfs_ioctl+0x1de/0x1720 [ 41.408829] ? ksys_ioctl+0xa9/0xd0 [ 41.412442] ? __x64_sys_ioctl+0x73/0xb0 [ 41.416488] ? do_syscall_64+0x1b9/0x820 [ 41.420534] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.425944] ? find_held_lock+0x36/0x1c0 [ 41.430060] ? find_held_lock+0x36/0x1c0 [ 41.435155] ? lock_acquire+0x1e4/0x4f0 [ 41.439118] ? ashmem_shrink_scan+0xb4/0x630 [ 41.443513] ? lock_downgrade+0x8f0/0x8f0 [ 41.447689] ? lock_release+0x9f0/0x9f0 [ 41.451653] ? refcount_sub_and_test_checked+0x21a/0x350 [ 41.457088] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 41.462532] ? mutex_trylock+0x24c/0x2b0 [ 41.466588] ? ashmem_shrink_scan+0xb4/0x630 [ 41.470977] ? __mutex_add_waiter+0x2a0/0x2a0 [ 41.475461] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 41.480996] ? apparmor_capable+0x351/0x6c0 [ 41.485303] ashmem_shrink_scan+0x236/0x630 [ 41.489623] ? cap_capable+0x1f9/0x260 [ 41.493493] ? ashmem_release+0x190/0x190 [ 41.497626] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.503159] ? ns_capable_common+0x13f/0x170 [ 41.507555] ashmem_ioctl+0x3ae/0x13a0 [ 41.511430] ? ashmem_shrink_scan+0x630/0x630 [ 41.515909] ? find_held_lock+0x36/0x1c0 [ 41.519956] ? __do_page_fault+0x620/0xe50 [ 41.524182] ? ashmem_shrink_scan+0x630/0x630 [ 41.528786] do_vfs_ioctl+0x1de/0x1720 [ 41.532753] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 41.538281] ? ioctl_preallocate+0x300/0x300 [ 41.542686] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.548522] ? __fget_light+0x2f7/0x440 [ 41.552488] ? __handle_mm_fault+0x4350/0x4350 [ 41.557061] ? fget_raw+0x20/0x20 [ 41.560505] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.566031] ? __do_page_fault+0x449/0xe50 [ 41.570261] ? do_syscall_64+0x9a/0x820 [ 41.574227] ? do_syscall_64+0x9a/0x820 [ 41.578196] ? lockdep_hardirqs_on+0x421/0x5c0 [ 41.582767] ? security_file_ioctl+0x94/0xc0 [ 41.587166] ksys_ioctl+0xa9/0xd0 [ 41.590636] __x64_sys_ioctl+0x73/0xb0 [ 41.594516] do_syscall_64+0x1b9/0x820 [ 41.598394] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 41.603746] ? syscall_return_slowpath+0x5e0/0x5e0 [ 41.608661] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.613494] ? trace_hardirqs_on_caller+0x2b0/0x2b0 [ 41.618500] ? prepare_exit_to_usermode+0x291/0x3b0 [ 41.623578] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.628415] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.633591] RIP: 0033:0x440099 [ 41.636845] 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 f