[....] 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[ 9.965638] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 21.548756] random: sshd: uninitialized urandom read (32 bytes read) [ 21.590465] random: crng init done Warning: Permanently added '10.128.10.55' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 38.420792] [ 38.422440] ====================================================== [ 38.428729] [ INFO: possible circular locking dependency detected ] [ 38.435105] 4.9.148+ #2 Not tainted [ 38.438699] ------------------------------------------------------- [ 38.445073] syz-executor434/2104 is trying to acquire lock: [ 38.450764] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x7bd/0xa60 [ 38.459502] but task is already holding lock: executing program executing program [ 38.464138] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 38.474933] which lock already depends on the new lock. [ 38.474933] [ 38.481920] [ 38.481920] the existing dependency chain (in reverse order) is: [ 38.489512] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 38.495705] lock_acquire+0x133/0x3d0 [ 38.499999] down_write+0x41/0xa0 [ 38.503948] shmem_fallocate+0x143/0xab0 [ 38.508501] ashmem_shrink_scan+0x1c3/0x4c0 [ 38.513335] ashmem_ioctl+0x29b/0xdd0 executing program executing program [ 38.517632] do_vfs_ioctl+0xb87/0x11d0 [ 38.522010] SyS_ioctl+0x8f/0xc0 [ 38.525869] do_syscall_64+0x1ad/0x570 [ 38.530248] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.535839] -> #1 (ashmem_mutex){+.+.+.}: [ 38.540616] lock_acquire+0x133/0x3d0 [ 38.544927] mutex_lock_nested+0xc7/0x920 [ 38.549580] ashmem_mmap+0x53/0x470 [ 38.553698] mmap_region+0x7e7/0xfa0 [ 38.557962] do_mmap+0x539/0xbc0 [ 38.561832] vm_mmap_pgoff+0x179/0x1c0 [ 38.566219] SyS_mmap_pgoff+0xfa/0x1b0 executing program executing program [ 38.570612] SyS_mmap+0x16/0x20 [ 38.574382] do_syscall_64+0x1ad/0x570 [ 38.578905] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.584504] -> #0 (&mm->mmap_sem){++++++}: [ 38.589405] __lock_acquire+0x2d10/0x4350 [ 38.594066] lock_acquire+0x133/0x3d0 [ 38.598388] down_read+0x44/0xb0 [ 38.602263] __do_page_fault+0x7bd/0xa60 [ 38.606830] do_page_fault+0x28/0x30 [ 38.611071] page_fault+0x25/0x30 [ 38.615038] generic_perform_write+0x1b6/0x500 [ 38.620150] __generic_file_write_iter+0x340/0x530 [ 38.625594] generic_file_write_iter+0x38a/0x630 [ 38.630863] __vfs_write+0x3c1/0x560 [ 38.635085] vfs_write+0x185/0x520 [ 38.639139] SyS_write+0xdc/0x1c0 [ 38.643106] do_syscall_64+0x1ad/0x570 [ 38.647511] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.653133] [ 38.653133] other info that might help us debug this: [ 38.653133] [ 38.661294] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 executing program executing program [ 38.671151] Possible unsafe locking scenario: [ 38.671151] [ 38.677193] CPU0 CPU1 [ 38.681842] ---- ---- [ 38.686494] lock(&sb->s_type->i_mutex_key#10); [ 38.691681] lock(ashmem_mutex); [ 38.697904] lock(&sb->s_type->i_mutex_key#10); [ 38.705624] lock(&mm->mmap_sem); [ 38.709416] [ 38.709416] *** DEADLOCK *** [ 38.709416] [ 38.715478] 2 locks held by syz-executor434/2104: executing program [ 38.720314] #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x3e9/0x520 [ 38.729185] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 38.740538] [ 38.740538] stack backtrace: [ 38.745128] CPU: 0 PID: 2104 Comm: syz-executor434 Not tainted 4.9.148+ #2 [ 38.752132] ffff8801cf2df5d8 ffffffff81b44d01 ffffffff83cab180 ffffffff83cb4b10 [ 38.760209] ffffffff83cc8d60 ffffffff8424cd80 ffff8801cefb97c0 ffff8801cf2df630 executing program executing program [ 38.768299] ffffffff813ff0a8 dffffc0000000000 ffffffff84025b80 ffff8801cefba0c0 [ 38.776359] Call Trace: [ 38.778991] [] dump_stack+0xc1/0x120 [ 38.784362] [] print_circular_bug.cold+0x2f6/0x454 [ 38.790964] [] __lock_acquire+0x2d10/0x4350 [ 38.796976] [] ? kasan_unpoison_shadow+0x35/0x50 [ 38.803384] [] ? kasan_alloc_pages+0x38/0x40 [ 38.809431] [] ? trace_hardirqs_on+0x10/0x10 [ 38.815479] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 38.822327] [] lock_acquire+0x133/0x3d0 [ 38.827942] [] ? __do_page_fault+0x7bd/0xa60 [ 38.833991] [] down_read+0x44/0xb0 [ 38.839168] [] ? __do_page_fault+0x7bd/0xa60 [ 38.845213] [] __do_page_fault+0x7bd/0xa60 [ 38.851084] [] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 38.857827] [] ? bad_area_access_error+0x3d0/0x3d0 [ 38.864409] [] ? mark_held_locks+0xb1/0x100 executing program executing program [ 38.870365] [] ? shmem_getpage_gfp+0x9dd/0x1b00 [ 38.876672] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.883324] [] do_page_fault+0x28/0x30 [ 38.888853] [] page_fault+0x25/0x30 [ 38.894131] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 38.901138] [] ? iov_iter_fault_in_readable+0x30d/0x3d0 [ 38.908148] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 38.915156] [] ? iov_iter_init+0x1d0/0x1d0 executing program [ 38.921038] [] generic_perform_write+0x1b6/0x500 [ 38.927453] [] ? filemap_page_mkwrite+0x280/0x280 [ 38.933946] [] ? current_time+0xd0/0xd0 [ 38.939572] [] __generic_file_write_iter+0x340/0x530 [ 38.946332] [] generic_file_write_iter+0x38a/0x630 [ 38.952901] [] __vfs_write+0x3c1/0x560 [ 38.958433] [] ? bpf_fd_pass+0x270/0x270 [ 38.964151] [] ? __vfs_read+0x550/0x550 executing program executing program [ 38.969769] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 38.976598] [] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 38.983169] [] ? __sb_start_write+0x161/0x310 [ 38.989308] [] vfs_write+0x185/0x520 [ 38.994666] [] SyS_write+0xdc/0x1c0 [ 38.999933] [] ? SyS_read+0x1c0/0x1c0 [ 39.005390] [] ? do_syscall_64+0x4a/0x570 [ 39.011176] [] ? SyS_read+0x1c0/0x1c0 [ 39.016621] [] do_syscall_64+0x1ad/0x570 executing program executing program executing program executing program [ 39.022329] [] 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