[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 19.636484] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 20.790522] random: sshd: uninitialized urandom read (32 bytes read) Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 21.102985] random: sshd: uninitialized urandom read (32 bytes read) [ 21.692665] random: sshd: uninitialized urandom read (32 bytes read) [ 21.872459] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.46' (ECDSA) to the list of known hosts. [ 27.391338] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 27.496984] [ 27.498627] ====================================================== [ 27.504921] WARNING: possible circular locking dependency detected [ 27.511219] 4.19.0-rc2+ #226 Not tainted [ 27.515260] ------------------------------------------------------ [ 27.521555] syz-executor323/4283 is trying to acquire lock: [ 27.527287] 0000000060f3f8da (&sb->s_type->i_mutex_key#11){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 27.536409] [ 27.536409] but task is already holding lock: [ 27.542365] 000000001b0c6c43 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 27.550251] [ 27.550251] which lock already depends on the new lock. [ 27.550251] [ 27.558548] [ 27.558548] the existing dependency chain (in reverse order) is: [ 27.566154] [ 27.566154] -> #2 (ashmem_mutex){+.+.}: [ 27.571612] __mutex_lock+0x171/0x1700 [ 27.576015] mutex_lock_nested+0x16/0x20 [ 27.580583] ashmem_mmap+0x55/0x520 [ 27.584718] mmap_region+0xf27/0x1c50 [ 27.589020] do_mmap+0xa10/0x1220 [ 27.592982] vm_mmap_pgoff+0x213/0x2c0 [ 27.597375] ksys_mmap_pgoff+0x4da/0x660 [ 27.601943] __x64_sys_mmap+0xe9/0x1b0 [ 27.606339] do_syscall_64+0x1b9/0x820 [ 27.610750] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.616439] [ 27.616439] -> #1 (&mm->mmap_sem){++++}: [ 27.621976] __might_fault+0x155/0x1e0 [ 27.626369] _copy_to_user+0x30/0x110 [ 27.630689] filldir+0x1ea/0x3a0 [ 27.634570] dcache_readdir+0x13a/0x620 [ 27.639051] iterate_dir+0x48b/0x5d0 [ 27.643272] __x64_sys_getdents+0x29f/0x510 [ 27.648112] do_syscall_64+0x1b9/0x820 [ 27.652526] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.658227] [ 27.658227] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 27.665017] lock_acquire+0x1e4/0x4f0 [ 27.669340] down_write+0x8f/0x130 [ 27.673411] shmem_fallocate+0x18b/0x12e0 [ 27.678083] ashmem_shrink_scan+0x236/0x630 [ 27.682933] ashmem_ioctl+0x3ae/0x13a0 [ 27.687343] do_vfs_ioctl+0x1de/0x1720 [ 27.691759] ksys_ioctl+0xa9/0xd0 [ 27.695733] __x64_sys_ioctl+0x73/0xb0 [ 27.700150] do_syscall_64+0x1b9/0x820 [ 27.704559] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.710251] [ 27.710251] other info that might help us debug this: [ 27.710251] [ 27.718385] Chain exists of: [ 27.718385] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 27.718385] [ 27.729933] Possible unsafe locking scenario: [ 27.729933] [ 27.735979] CPU0 CPU1 [ 27.740630] ---- ---- [ 27.745274] lock(ashmem_mutex); [ 27.748709] lock(&mm->mmap_sem); [ 27.754745] lock(ashmem_mutex); [ 27.760699] lock(&sb->s_type->i_mutex_key#11); [ 27.765437] [ 27.765437] *** DEADLOCK *** [ 27.765437] [ 27.771479] 1 lock held by syz-executor323/4283: [ 27.776212] #0: 000000001b0c6c43 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 27.784531] [ 27.784531] stack backtrace: [ 27.789015] CPU: 0 PID: 4283 Comm: syz-executor323 Not tainted 4.19.0-rc2+ #226 [ 27.796446] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.805803] Call Trace: [ 27.808418] dump_stack+0x1c9/0x2b4 [ 27.812040] ? dump_stack_print_info.cold.2+0x52/0x52 [ 27.817219] ? vprintk_func+0x81/0x117 [ 27.821095] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 27.826802] ? save_trace+0xe0/0x290 [ 27.830503] __lock_acquire+0x3449/0x5020 [ 27.834639] ? mark_held_locks+0x160/0x160 [ 27.838856] ? mark_held_locks+0x160/0x160 [ 27.843079] ? is_bpf_text_address+0xd7/0x170 [ 27.847561] ? __kernel_text_address+0xd/0x40 [ 27.852041] ? unwind_get_return_address+0x61/0xa0 [ 27.856958] ? __save_stack_trace+0x8d/0xf0 [ 27.861262] ? graph_lock+0x170/0x170 [ 27.865046] ? print_usage_bug+0xc0/0xc0 [ 27.869095] ? save_trace+0x290/0x290 [ 27.872885] ? graph_lock+0x170/0x170 [ 27.876669] ? graph_lock+0x170/0x170 [ 27.880466] lock_acquire+0x1e4/0x4f0 [ 27.884258] ? shmem_fallocate+0x18b/0x12e0 [ 27.888573] ? lock_release+0x9f0/0x9f0 [ 27.892538] ? check_same_owner+0x340/0x340 [ 27.896845] ? mark_held_locks+0x160/0x160 [ 27.901073] ? rcu_note_context_switch+0x680/0x680 [ 27.905992] down_write+0x8f/0x130 [ 27.909526] ? shmem_fallocate+0x18b/0x12e0 [ 27.913833] ? down_read+0x1d0/0x1d0 [ 27.917537] ? kasan_check_write+0x14/0x20 [ 27.921757] ? do_raw_spin_lock+0xc1/0x200 [ 27.925976] shmem_fallocate+0x18b/0x12e0 [ 27.930119] ? depot_save_stack+0x291/0x470 [ 27.934440] ? save_stack+0xa9/0xd0 [ 27.938050] ? save_stack+0x43/0xd0 [ 27.941662] ? shmem_setattr+0xda0/0xda0 [ 27.945713] ? ashmem_ioctl+0x1181/0x13a0 [ 27.949848] ? do_vfs_ioctl+0x1de/0x1720 [ 27.953894] ? ksys_ioctl+0xa9/0xd0 [ 27.957529] ? __x64_sys_ioctl+0x73/0xb0 [ 27.961576] ? do_syscall_64+0x1b9/0x820 [ 27.965631] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.971009] ? find_held_lock+0x36/0x1c0 [ 27.975083] ? find_held_lock+0x36/0x1c0 [ 27.979159] ? lock_acquire+0x1e4/0x4f0 [ 27.983133] ? ashmem_shrink_scan+0xb4/0x630 [ 27.987538] ? lock_downgrade+0x8f0/0x8f0 [ 27.991673] ? lock_release+0x9f0/0x9f0 [ 27.995639] ? refcount_sub_and_test_checked+0x21a/0x350 [ 28.001073] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 28.006511] ? mutex_trylock+0x24c/0x2b0 [ 28.010558] ? ashmem_shrink_scan+0xb4/0x630 [ 28.014965] ? __mutex_add_waiter+0x2a0/0x2a0 [ 28.019448] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 28.024999] ? apparmor_capable+0x351/0x6c0 [ 28.029309] ashmem_shrink_scan+0x236/0x630 [ 28.033617] ? cap_capable+0x1f9/0x260 [ 28.037496] ? ashmem_release+0x190/0x190 [ 28.041632] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 28.047160] ? ns_capable_common+0x13f/0x170 [ 28.051563] ashmem_ioctl+0x3ae/0x13a0 [ 28.055445] ? ashmem_shrink_scan+0x630/0x630 [ 28.059927] ? find_held_lock+0x36/0x1c0 [ 28.063975] ? __do_page_fault+0x620/0xe50 [ 28.068204] ? ashmem_shrink_scan+0x630/0x630 [ 28.072696] do_vfs_ioctl+0x1de/0x1720 [ 28.076596] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 28.082148] ? ioctl_preallocate+0x300/0x300 [ 28.086547] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 28.092069] ? __fget_light+0x2f7/0x440 [ 28.096046] ? __handle_mm_fault+0x4350/0x4350 [ 28.100610] ? fget_raw+0x20/0x20 [ 28.104051] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 28.109588] ? __do_page_fault+0x449/0xe50 [ 28.113806] ? do_syscall_64+0x9a/0x820 [ 28.117766] ? do_syscall_64+0x9a/0x820 [ 28.121727] ? lockdep_hardirqs_on+0x421/0x5c0 [ 28.126295] ? security_file_ioctl+0x94/0xc0 [ 28.130696] ksys_ioctl+0xa9/0xd0 [ 28.134164] __x64_sys_ioctl+0x73/0xb0 [ 28.138046] do_syscall_64+0x1b9/0x820 [ 28.141920] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 28.147276] ? syscall_return_slowpath+0x5e0/0x5e0 [ 28.152201] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.157036] ? trace_hardirqs_on_caller+0x2c0/0x2c0 [ 28.162043] ? prepare_exit_to_usermode+0x291/0x3b0 [ 28.167043] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.171872] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 28.177057] RIP: 0033:0x440089 [ 28.180245] 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 [ 28.19914