[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 10.123310] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 14.601912] random: crng init done Warning: Permanently added '10.128.0.41' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program [ 42.461659] [ 42.463339] ====================================================== [ 42.469644] [ INFO: possible circular locking dependency detected ] [ 42.476068] 4.9.130+ #46 Not tainted [ 42.479765] ------------------------------------------------------- [ 42.486157] syz-executor792/2073 is trying to acquire lock: [ 42.491854] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x7db/0xa60 [ 42.500655] but task is already holding lock: [ 42.505312] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9d/0x620 [ 42.516098] which lock already depends on the new lock. [ 42.516098] [ 42.523102] [ 42.523102] the existing dependency chain (in reverse order) is: [ 42.530706] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 42.536974] lock_acquire+0x130/0x3e0 [ 42.541301] down_write+0x41/0xa0 [ 42.545268] shmem_fallocate+0x13c/0xb10 [ 42.549835] ashmem_shrink_scan+0x1b9/0x4c0 [ 42.554653] ashmem_ioctl+0x2c3/0xf00 executing program [ 42.558959] do_vfs_ioctl+0x1ac/0x11a0 [ 42.563358] SyS_ioctl+0x8f/0xc0 [ 42.567254] do_syscall_64+0x19f/0x550 [ 42.571652] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 42.577283] -> #1 (ashmem_mutex){+.+.+.}: [ 42.582153] lock_acquire+0x130/0x3e0 [ 42.586466] mutex_lock_nested+0xc0/0x900 [ 42.591121] ashmem_mmap+0x53/0x3f0 [ 42.595258] mmap_region+0x80c/0xf90 [ 42.599497] do_mmap+0x53d/0xbb0 [ 42.603382] vm_mmap_pgoff+0x168/0x1b0 [ 42.607780] SyS_mmap_pgoff+0xfe/0x1b0 executing program [ 42.612183] SyS_mmap+0x16/0x20 [ 42.616002] do_syscall_64+0x19f/0x550 [ 42.620402] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 42.626023] -> #0 (&mm->mmap_sem){++++++}: [ 42.630936] __lock_acquire+0x3189/0x4a10 [ 42.635608] lock_acquire+0x130/0x3e0 [ 42.639946] down_read+0x44/0xb0 [ 42.643831] __do_page_fault+0x7db/0xa60 [ 42.648405] do_page_fault+0x27/0x30 [ 42.652632] page_fault+0x25/0x30 [ 42.656599] generic_perform_write+0x1c7/0x500 executing program [ 42.661718] __generic_file_write_iter+0x352/0x540 [ 42.667158] generic_file_write_iter+0x37a/0x620 [ 42.672425] __vfs_write+0x3d7/0x580 [ 42.676652] vfs_write+0x187/0x520 [ 42.680738] SyS_write+0xd9/0x1c0 [ 42.684713] do_syscall_64+0x19f/0x550 [ 42.689113] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 42.694718] [ 42.694718] other info that might help us debug this: [ 42.694718] [ 42.702850] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 executing program executing program [ 42.712696] Possible unsafe locking scenario: [ 42.712696] [ 42.718739] CPU0 CPU1 [ 42.723394] ---- ---- [ 42.728050] lock(&sb->s_type->i_mutex_key#10); [ 42.733212] lock(ashmem_mutex); [ 42.739484] lock(&sb->s_type->i_mutex_key#10); [ 42.747177] lock(&mm->mmap_sem); [ 42.750970] [ 42.750970] *** DEADLOCK *** [ 42.750970] [ 42.757023] 2 locks held by syz-executor792/2073: executing program [ 42.761848] #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x3eb/0x520 [ 42.770726] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9d/0x620 [ 42.782074] [ 42.782074] stack backtrace: [ 42.786579] CPU: 1 PID: 2073 Comm: syz-executor792 Not tainted 4.9.130+ #46 [ 42.793665] ffff8801ce127548 ffffffff81b36c89 ffffffff83cc2a10 ffffffff83cace70 [ 42.801759] ffffffff83ca3690 ffff8801ce80b878 ffff8801ce80af80 ffff8801ce127590 executing program [ 42.809888] ffffffff813fe8a5 0000000000000002 00000000ce80b858 0000000000000002 [ 42.817951] Call Trace: [ 42.820541] [] dump_stack+0xc1/0x128 [ 42.825898] [] print_circular_bug.cold.36+0x2f7/0x432 [ 42.832758] [] __lock_acquire+0x3189/0x4a10 [ 42.838720] [] ? mark_held_locks+0xc7/0x130 [ 42.844684] [] ? trace_hardirqs_on+0x10/0x10 [ 42.850748] [] ? mark_held_locks+0xc7/0x130 [ 42.856708] [] ? retint_kernel+0x2d/0x2d executing program executing program [ 42.862409] [] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.868991] [] lock_acquire+0x130/0x3e0 [ 42.874607] [] ? __do_page_fault+0x7db/0xa60 [ 42.880680] [] down_read+0x44/0xb0 [ 42.885863] [] ? __do_page_fault+0x7db/0xa60 [ 42.891916] [] __do_page_fault+0x7db/0xa60 [ 42.897792] [] ? bad_area_access_error+0x3a0/0x3a0 [ 42.904371] [] ? debug_lockdep_rcu_enabled+0x77/0x90 executing program [ 42.911116] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.917773] [] do_page_fault+0x27/0x30 [ 42.923312] [] page_fault+0x25/0x30 [ 42.928614] [] ? shmem_put_link+0xe0/0xe0 [ 42.934403] [] ? iov_iter_fault_in_readable+0x330/0x400 [ 42.941421] [] ? iov_iter_fault_in_readable+0x323/0x400 [ 42.948423] [] ? flex_array_free_parts+0xe0/0xe0 [ 42.954828] [] ? do_writepages+0x1d0/0x1d0 executing program [ 42.960703] [] ? do_writepages+0x1d0/0x1d0 [ 42.966577] [] ? iov_iter_advance+0x216/0xd40 [ 42.972713] [] generic_perform_write+0x1c7/0x500 [ 42.979111] [] ? filemap_page_mkwrite+0x280/0x280 [ 42.985609] [] ? file_update_time+0xbc/0x390 [ 42.991653] [] ? current_time+0xd0/0xd0 [ 42.997269] [] __generic_file_write_iter+0x352/0x540 [ 43.004017] [] generic_file_write_iter+0x37a/0x620 executing program [ 43.010590] [] __vfs_write+0x3d7/0x580 [ 43.016117] [] ? __vfs_read+0x560/0x560 [ 43.021735] [] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 43.028320] [] ? __sb_start_write+0x161/0x300 [ 43.034450] [] vfs_write+0x187/0x520 [ 43.039814] [] SyS_write+0xd9/0x1c0 [ 43.045097] [] ? SyS_read+0x1c0/0x1c0 [ 43.050543] [] ? do_syscall_64+0x48/0x550 [ 43.056329] [] ? SyS_read+0x1c0/0x1c0 executing program executing program executing program executing program executing program [ 43.061783] [] do_syscall_64+0x19f/0x550 [ 43.067502] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program