[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 18.721034] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 23.575053] random: sshd: uninitialized urandom read (32 bytes read) [ 23.868506] random: sshd: uninitialized urandom read (32 bytes read) [ 24.399468] random: sshd: uninitialized urandom read (32 bytes read) [ 24.579884] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.21' (ECDSA) to the list of known hosts. [ 30.083350] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 30.182492] [ 30.184140] ====================================================== [ 30.190435] WARNING: possible circular locking dependency detected [ 30.196752] 4.19.0-rc2-next-20180904+ #55 Not tainted [ 30.201929] ------------------------------------------------------ [ 30.208224] syz-executor003/4243 is trying to acquire lock: [ 30.213917] 00000000593800e2 (&sb->s_type->i_mutex_key#11){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 30.223033] [ 30.223033] but task is already holding lock: [ 30.228984] 0000000003c6c474 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 30.236860] [ 30.236860] which lock already depends on the new lock. [ 30.236860] [ 30.245173] [ 30.245173] the existing dependency chain (in reverse order) is: [ 30.252774] [ 30.252774] -> #2 (ashmem_mutex){+.+.}: [ 30.258225] __mutex_lock+0x171/0x1700 [ 30.262616] mutex_lock_nested+0x16/0x20 [ 30.267181] ashmem_mmap+0x55/0x520 [ 30.271330] mmap_region+0xf27/0x1c50 [ 30.275653] do_mmap+0xa10/0x1220 [ 30.279609] vm_mmap_pgoff+0x213/0x2c0 [ 30.283998] ksys_mmap_pgoff+0x4da/0x660 [ 30.288565] __x64_sys_mmap+0xe9/0x1b0 [ 30.292958] do_syscall_64+0x1b9/0x820 [ 30.297386] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.303089] [ 30.303089] -> #1 (&mm->mmap_sem){++++}: [ 30.308618] __might_fault+0x155/0x1e0 [ 30.313009] _copy_to_user+0x30/0x110 [ 30.317312] filldir+0x1ea/0x3a0 [ 30.321180] dcache_readdir+0x13a/0x620 [ 30.325656] iterate_dir+0x48b/0x5d0 [ 30.329871] __x64_sys_getdents+0x29f/0x510 [ 30.334696] do_syscall_64+0x1b9/0x820 [ 30.339088] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.344778] [ 30.344778] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 30.351529] lock_acquire+0x1e4/0x4f0 [ 30.355831] down_write+0x8f/0x130 [ 30.359873] shmem_fallocate+0x18b/0x12e0 [ 30.364531] ashmem_shrink_scan+0x236/0x630 [ 30.369374] ashmem_ioctl+0x3ae/0x13a0 [ 30.373772] do_vfs_ioctl+0x1de/0x1720 [ 30.378166] ksys_ioctl+0xa9/0xd0 [ 30.382121] __x64_sys_ioctl+0x73/0xb0 [ 30.386512] do_syscall_64+0x1b9/0x820 [ 30.390912] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.396599] [ 30.396599] other info that might help us debug this: [ 30.396599] [ 30.404738] Chain exists of: [ 30.404738] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 30.404738] [ 30.416283] Possible unsafe locking scenario: [ 30.416283] [ 30.422318] CPU0 CPU1 [ 30.426977] ---- ---- [ 30.431639] lock(ashmem_mutex); [ 30.435074] lock(&mm->mmap_sem); [ 30.441112] lock(ashmem_mutex); [ 30.447063] lock(&sb->s_type->i_mutex_key#11); [ 30.451802] [ 30.451802] *** DEADLOCK *** [ 30.451802] [ 30.457875] 1 lock held by syz-executor003/4243: [ 30.462611] #0: 0000000003c6c474 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 30.470921] [ 30.470921] stack backtrace: [ 30.475403] CPU: 1 PID: 4243 Comm: syz-executor003 Not tainted 4.19.0-rc2-next-20180904+ #55 [ 30.483959] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.493307] Call Trace: [ 30.495885] dump_stack+0x1c9/0x2b4 [ 30.499521] ? dump_stack_print_info.cold.2+0x52/0x52 [ 30.504695] ? vprintk_func+0x81/0x117 [ 30.508566] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 30.514256] ? save_trace+0xe0/0x290 [ 30.517954] __lock_acquire+0x3449/0x5020 [ 30.522084] ? lock_pin_lock+0x350/0x350 [ 30.526128] ? mark_held_locks+0x160/0x160 [ 30.530345] ? graph_lock+0x170/0x170 [ 30.534128] ? mark_held_locks+0x160/0x160 [ 30.538344] ? find_held_lock+0x36/0x1c0 [ 30.542387] ? graph_lock+0x170/0x170 [ 30.546170] ? __lock_is_held+0xb5/0x140 [ 30.550213] ? print_usage_bug+0xc0/0xc0 [ 30.554256] ? graph_lock+0x170/0x170 [ 30.558055] ? graph_lock+0x170/0x170 [ 30.561843] lock_acquire+0x1e4/0x4f0 [ 30.565647] ? shmem_fallocate+0x18b/0x12e0 [ 30.569955] ? lock_release+0x9f0/0x9f0 [ 30.573934] ? check_same_owner+0x340/0x340 [ 30.578239] ? mark_held_locks+0x160/0x160 [ 30.582459] ? rcu_note_context_switch+0x680/0x680 [ 30.587371] down_write+0x8f/0x130 [ 30.590894] ? shmem_fallocate+0x18b/0x12e0 [ 30.595208] ? down_read+0x1d0/0x1d0 [ 30.598915] ? kasan_check_write+0x14/0x20 [ 30.603137] ? do_raw_spin_lock+0xc1/0x200 [ 30.607373] shmem_fallocate+0x18b/0x12e0 [ 30.611505] ? depot_save_stack+0x291/0x470 [ 30.615809] ? save_stack+0xa9/0xd0 [ 30.619415] ? save_stack+0x43/0xd0 [ 30.623028] ? shmem_setattr+0xda0/0xda0 [ 30.627070] ? ashmem_ioctl+0x1181/0x13a0 [ 30.631199] ? do_vfs_ioctl+0x1de/0x1720 [ 30.635239] ? ksys_ioctl+0xa9/0xd0 [ 30.638846] ? __x64_sys_ioctl+0x73/0xb0 [ 30.642889] ? do_syscall_64+0x1b9/0x820 [ 30.646945] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.652290] ? find_held_lock+0x36/0x1c0 [ 30.656332] ? find_held_lock+0x36/0x1c0 [ 30.660376] ? lock_acquire+0x1e4/0x4f0 [ 30.664334] ? ashmem_shrink_scan+0xb4/0x630 [ 30.668722] ? lock_downgrade+0x8f0/0x8f0 [ 30.672856] ? lock_release+0x9f0/0x9f0 [ 30.676815] ? refcount_sub_and_test_checked+0x21a/0x350 [ 30.682248] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 30.687680] ? mutex_trylock+0x24c/0x2b0 [ 30.691747] ? ashmem_shrink_scan+0xb4/0x630 [ 30.696149] ? __mutex_add_waiter+0x2a0/0x2a0 [ 30.700631] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 30.706149] ? apparmor_capable+0x351/0x6c0 [ 30.710456] ashmem_shrink_scan+0x236/0x630 [ 30.714770] ? cap_capable+0x1f9/0x260 [ 30.718663] ? ashmem_release+0x190/0x190 [ 30.722805] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.728327] ? ns_capable_common+0x13f/0x170 [ 30.732720] ashmem_ioctl+0x3ae/0x13a0 [ 30.736596] ? ashmem_shrink_scan+0x630/0x630 [ 30.741072] ? find_held_lock+0x36/0x1c0 [ 30.745117] ? __do_page_fault+0x620/0xe50 [ 30.749332] ? ashmem_shrink_scan+0x630/0x630 [ 30.753809] do_vfs_ioctl+0x1de/0x1720 [ 30.757683] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 30.763203] ? ioctl_preallocate+0x300/0x300 [ 30.767597] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.773136] ? __fget_light+0x2f7/0x440 [ 30.777093] ? __handle_mm_fault+0x4350/0x4350 [ 30.781658] ? fget_raw+0x20/0x20 [ 30.785096] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.790635] ? __do_page_fault+0x449/0xe50 [ 30.794855] ? do_syscall_64+0x9a/0x820 [ 30.798830] ? do_syscall_64+0x9a/0x820 [ 30.802799] ? lockdep_hardirqs_on+0x421/0x5c0 [ 30.807387] ? security_file_ioctl+0x94/0xc0 [ 30.811787] ksys_ioctl+0xa9/0xd0 [ 30.815228] __x64_sys_ioctl+0x73/0xb0 [ 30.819098] do_syscall_64+0x1b9/0x820 [ 30.822969] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 30.828318] ? syscall_return_slowpath+0x5e0/0x5e0 [ 30.833228] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.838056] ? trace_hardirqs_on_caller+0x2b0/0x2b0 [ 30.843056] ? prepare_exit_to_usermode+0x291/0x3b0 [ 30.848076] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.852912] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.858085] RIP: 0033:0x440089 [ 30.861262] 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 [ 30.880145] RSP: 002b:00007ffddd8e22d8 EFLAGS: 00000217 ORIG_