[....] 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[ 23.088619] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 27.087734] random: sshd: uninitialized urandom read (32 bytes read) [ 27.363579] random: sshd: uninitialized urandom read (32 bytes read) [ 27.903864] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.49' (ECDSA) to the list of known hosts. [ 33.605570] urandom_read: 1 callbacks suppressed [ 33.605576] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 33.708722] [ 33.710367] ====================================================== [ 33.716675] WARNING: possible circular locking dependency detected [ 33.722983] 4.18.0-next-20180814+ #38 Not tainted [ 33.727804] ------------------------------------------------------ [ 33.734103] syz-executor198/4398 is trying to acquire lock: [ 33.739793] 0000000064903879 (&sb->s_type->i_mutex_key#10){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 33.748893] [ 33.748893] but task is already holding lock: [ 33.754854] 00000000f7654466 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 33.762729] [ 33.762729] which lock already depends on the new lock. [ 33.762729] [ 33.771035] [ 33.771035] the existing dependency chain (in reverse order) is: [ 33.778657] [ 33.778657] -> #2 (ashmem_mutex){+.+.}: [ 33.784108] __mutex_lock+0x171/0x1700 [ 33.788501] mutex_lock_nested+0x16/0x20 [ 33.793072] ashmem_mmap+0x55/0x520 [ 33.797227] mmap_region+0xf27/0x1c50 [ 33.801552] do_mmap+0xa10/0x1220 [ 33.805511] vm_mmap_pgoff+0x213/0x2c0 [ 33.809904] ksys_mmap_pgoff+0x4da/0x660 [ 33.814473] __x64_sys_mmap+0xe9/0x1b0 [ 33.818867] do_syscall_64+0x1b9/0x820 [ 33.823277] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.828969] [ 33.828969] -> #1 (&mm->mmap_sem){++++}: [ 33.834499] __might_fault+0x155/0x1e0 [ 33.838889] _copy_to_user+0x30/0x110 [ 33.843214] filldir+0x1ea/0x3a0 [ 33.847090] dcache_readdir+0x13a/0x620 [ 33.851568] iterate_dir+0x48b/0x5d0 [ 33.855800] __x64_sys_getdents+0x29f/0x510 [ 33.860627] do_syscall_64+0x1b9/0x820 [ 33.865034] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.870730] [ 33.870730] -> #0 (&sb->s_type->i_mutex_key#10){++++}: [ 33.877478] lock_acquire+0x1e4/0x4f0 [ 33.881784] down_write+0x8f/0x130 [ 33.885827] shmem_fallocate+0x18b/0x12e0 [ 33.890491] ashmem_shrink_scan+0x236/0x630 [ 33.895324] ashmem_ioctl+0x3ae/0x13a0 [ 33.899724] do_vfs_ioctl+0x1de/0x1720 [ 33.904119] ksys_ioctl+0xa9/0xd0 [ 33.908079] __x64_sys_ioctl+0x73/0xb0 [ 33.912471] do_syscall_64+0x1b9/0x820 [ 33.916864] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.922556] [ 33.922556] other info that might help us debug this: [ 33.922556] [ 33.930691] Chain exists of: [ 33.930691] &sb->s_type->i_mutex_key#10 --> &mm->mmap_sem --> ashmem_mutex [ 33.930691] [ 33.942226] Possible unsafe locking scenario: [ 33.942226] [ 33.948262] CPU0 CPU1 [ 33.952909] ---- ---- [ 33.957554] lock(ashmem_mutex); [ 33.960988] lock(&mm->mmap_sem); [ 33.967040] lock(ashmem_mutex); [ 33.973007] lock(&sb->s_type->i_mutex_key#10); [ 33.977765] [ 33.977765] *** DEADLOCK *** [ 33.977765] [ 33.983809] 1 lock held by syz-executor198/4398: [ 33.988543] #0: 00000000f7654466 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 33.996851] [ 33.996851] stack backtrace: [ 34.001332] CPU: 0 PID: 4398 Comm: syz-executor198 Not tainted 4.18.0-next-20180814+ #38 [ 34.009538] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.018872] Call Trace: [ 34.021452] dump_stack+0x1c9/0x2b4 [ 34.025078] ? dump_stack_print_info.cold.2+0x52/0x52 [ 34.030259] ? vprintk_func+0x81/0x117 [ 34.034156] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 34.039863] ? save_trace+0xe0/0x290 [ 34.043562] __lock_acquire+0x3449/0x5020 [ 34.047695] ? mark_held_locks+0x160/0x160 [ 34.051916] ? mark_held_locks+0x160/0x160 [ 34.056141] ? is_bpf_text_address+0xd7/0x170 [ 34.060624] ? __kernel_text_address+0xd/0x40 [ 34.065115] ? unwind_get_return_address+0x61/0xa0 [ 34.070044] ? __save_stack_trace+0x8d/0xf0 [ 34.074356] ? graph_lock+0x170/0x170 [ 34.078149] ? print_usage_bug+0xc0/0xc0 [ 34.082198] ? save_trace+0x290/0x290 [ 34.085983] ? graph_lock+0x170/0x170 [ 34.089788] ? graph_lock+0x170/0x170 [ 34.093576] lock_acquire+0x1e4/0x4f0 [ 34.097360] ? shmem_fallocate+0x18b/0x12e0 [ 34.101672] ? lock_release+0x9f0/0x9f0 [ 34.105632] ? check_same_owner+0x340/0x340 [ 34.109939] ? mark_held_locks+0x160/0x160 [ 34.114157] ? rcu_note_context_switch+0x680/0x680 [ 34.119082] down_write+0x8f/0x130 [ 34.122618] ? shmem_fallocate+0x18b/0x12e0 [ 34.126936] ? down_read+0x1d0/0x1d0 [ 34.130643] ? kasan_check_write+0x14/0x20 [ 34.134862] ? do_raw_spin_lock+0xc1/0x200 [ 34.139085] shmem_fallocate+0x18b/0x12e0 [ 34.143248] ? depot_save_stack+0x291/0x470 [ 34.147566] ? save_stack+0xa9/0xd0 [ 34.151192] ? save_stack+0x43/0xd0 [ 34.154804] ? shmem_setattr+0xda0/0xda0 [ 34.158848] ? ashmem_ioctl+0x1181/0x13a0 [ 34.162978] ? do_vfs_ioctl+0x1de/0x1720 [ 34.167033] ? ksys_ioctl+0xa9/0xd0 [ 34.170662] ? __x64_sys_ioctl+0x73/0xb0 [ 34.174720] ? do_syscall_64+0x1b9/0x820 [ 34.178765] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.184157] ? find_held_lock+0x36/0x1c0 [ 34.188216] ? find_held_lock+0x36/0x1c0 [ 34.192258] ? lock_acquire+0x1e4/0x4f0 [ 34.196239] ? ashmem_shrink_scan+0xb4/0x630 [ 34.200718] ? lock_downgrade+0x8f0/0x8f0 [ 34.204877] ? lock_release+0x9f0/0x9f0 [ 34.208838] ? __lock_is_held+0xb5/0x140 [ 34.212887] ? mutex_trylock+0x24c/0x2b0 [ 34.216939] ? ashmem_shrink_scan+0xb4/0x630 [ 34.221332] ? __mutex_add_waiter+0x2a0/0x2a0 [ 34.225813] ? wait_for_completion+0x8d0/0x8d0 [ 34.230388] ashmem_shrink_scan+0x236/0x630 [ 34.234708] ? cap_capable+0x1f9/0x260 [ 34.238580] ? ashmem_release+0x190/0x190 [ 34.242724] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.248245] ? ns_capable_common+0x13f/0x170 [ 34.252637] ashmem_ioctl+0x3ae/0x13a0 [ 34.256528] ? ashmem_shrink_scan+0x630/0x630 [ 34.261011] ? find_held_lock+0x36/0x1c0 [ 34.265073] ? __do_page_fault+0x620/0xe50 [ 34.269290] ? ashmem_shrink_scan+0x630/0x630 [ 34.273769] do_vfs_ioctl+0x1de/0x1720 [ 34.277664] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 34.283186] ? ioctl_preallocate+0x300/0x300 [ 34.287594] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.293160] ? __fget_light+0x2f7/0x440 [ 34.297118] ? __handle_mm_fault+0x4470/0x4470 [ 34.301709] ? fget_raw+0x20/0x20 [ 34.305153] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.310699] ? __do_page_fault+0x449/0xe50 [ 34.314920] ? do_syscall_64+0x9a/0x820 [ 34.318880] ? do_syscall_64+0x9a/0x820 [ 34.322836] ? lockdep_hardirqs_on+0x421/0x5c0 [ 34.327677] ? security_file_ioctl+0x94/0xc0 [ 34.332072] ksys_ioctl+0xa9/0xd0 [ 34.335512] __x64_sys_ioctl+0x73/0xb0 [ 34.339395] do_syscall_64+0x1b9/0x820 [ 34.343270] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 34.348624] ? syscall_return_slowpath+0x5e0/0x5e0 [ 34.353541] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.358369] ? trace_hardirqs_on_caller+0x2b0/0x2b0 [ 34.363387] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 34.368412] ? prepare_exit_to_usermode+0x291/0x3b0 [ 34.373421] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.378248] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.383423] RIP: 0033:0x4400a9 [ 34.386603] 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 [ 34.405486] RSP: 002b:00007ffdcf2010e8 EFLAGS: 00000217 ORIG_RAX: 0000