[?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.378748] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 15.387603] random: crng init done Warning: Permanently added '10.128.0.90' (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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 40.604219] [ 40.605892] ====================================================== [ 40.612187] [ INFO: possible circular locking dependency detected ] [ 40.618567] 4.9.135+ #65 Not tainted [ 40.622252] ------------------------------------------------------- [ 40.628637] syz-executor281/2783 is trying to acquire lock: [ 40.634326] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x7db/0xa60 [ 40.643111] but task is already holding lock: [ 40.647769] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9d/0x620 [ 40.658478] which lock already depends on the new lock. [ 40.658478] [ 40.665466] [ 40.665466] the existing dependency chain (in reverse order) is: [ 40.673060] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 40.679322] lock_acquire+0x130/0x3e0 [ 40.683622] down_write+0x41/0xa0 [ 40.687587] shmem_fallocate+0x13c/0xb10 [ 40.692147] ashmem_shrink_scan+0x1b9/0x4c0 [ 40.696971] ashmem_ioctl+0x2c3/0xf00 [ 40.701276] do_vfs_ioctl+0x1ac/0x11a0 [ 40.705675] SyS_ioctl+0x8f/0xc0 [ 40.709542] do_syscall_64+0x19f/0x550 [ 40.713947] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 40.719551] -> #1 (ashmem_mutex){+.+.+.}: [ 40.724366] lock_acquire+0x130/0x3e0 [ 40.728671] mutex_lock_nested+0xc0/0x900 [ 40.733326] ashmem_mmap+0x55/0x480 [ 40.737455] mmap_region+0x80c/0xf90 [ 40.741674] do_mmap+0x53d/0xbb0 [ 40.745544] vm_mmap_pgoff+0x168/0x1b0 [ 40.749945] SyS_mmap_pgoff+0xfe/0x1b0 [ 40.754349] SyS_mmap+0x16/0x20 [ 40.758131] do_syscall_64+0x19f/0x550 [ 40.762518] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 40.768133] -> #0 (&mm->mmap_sem){++++++}: [ 40.773064] __lock_acquire+0x3189/0x4a10 [ 40.777718] lock_acquire+0x130/0x3e0 [ 40.782019] down_read+0x44/0xb0 [ 40.785904] __do_page_fault+0x7db/0xa60 [ 40.790462] do_page_fault+0x27/0x30 [ 40.794672] page_fault+0x25/0x30 [ 40.798625] generic_perform_write+0x1c7/0x500 [ 40.803738] __generic_file_write_iter+0x352/0x540 [ 40.809199] generic_file_write_iter+0x37a/0x620 [ 40.814483] __vfs_write+0x3d7/0x580 [ 40.818695] vfs_write+0x187/0x520 [ 40.822731] SyS_write+0xd9/0x1c0 [ 40.826687] do_syscall_64+0x19f/0x550 [ 40.831091] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 40.836685] [ 40.836685] other info that might help us debug this: [ 40.836685] [ 40.844800] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 [ 40.854577] Possible unsafe locking scenario: [ 40.854577] [ 40.860609] CPU0 CPU1 [ 40.865257] ---- ---- [ 40.869894] lock(&sb->s_type->i_mutex_key#10); [ 40.875010] lock(ashmem_mutex); [ 40.881245] lock(&sb->s_type->i_mutex_key#10); [ 40.888894] lock(&mm->mmap_sem); [ 40.892685] [ 40.892685] *** DEADLOCK *** [ 40.892685] [ 40.898722] 2 locks held by syz-executor281/2783: [ 40.903549] #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x3eb/0x520 [ 40.912365] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9d/0x620 [ 40.923637] [ 40.923637] stack backtrace: [ 40.928110] CPU: 1 PID: 2783 Comm: syz-executor281 Not tainted 4.9.135+ #65 [ 40.935211] ffff8801c560f548 ffffffff81b42b89 ffffffff83cc2bb0 ffffffff83cae7b0 [ 40.943247] ffffffff83ca4fd0 ffff8801cae988f8 ffff8801cae98000 ffff8801c560f590 [ 40.951245] ffffffff813feb15 0000000000000002 00000000cae988d8 0000000000000002 [ 40.959237] Call Trace: [ 40.961803] [] dump_stack+0xc1/0x128 [ 40.967147] [] print_circular_bug.cold.36+0x2f7/0x432 [ 40.973965] [] __lock_acquire+0x3189/0x4a10 [ 40.979911] [] ? get_page_from_freelist+0xda3/0x1d80 [ 40.986658] [] ? trace_hardirqs_on+0x10/0x10 [ 40.992694] [] ? check_preemption_disabled+0x3b/0x170 [ 40.999507] [] lock_acquire+0x130/0x3e0 [ 41.005135] [] ? __do_page_fault+0x7db/0xa60 [ 41.011169] [] down_read+0x44/0xb0 [ 41.016349] [] ? __do_page_fault+0x7db/0xa60 [ 41.022422] [] __do_page_fault+0x7db/0xa60 [ 41.028281] [] ? bad_area_access_error+0x3a0/0x3a0 [ 41.034838] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.041593] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.048254] [] do_page_fault+0x27/0x30 [ 41.053768] [] page_fault+0x25/0x30 [ 41.059019] [] ? shmem_put_link+0xe0/0xe0 [ 41.064809] [] ? iov_iter_fault_in_readable+0x330/0x400 [ 41.071798] [] ? iov_iter_fault_in_readable+0x323/0x400 [ 41.078790] [] ? flex_array_free_parts+0xe0/0xe0 [ 41.085176] [] ? do_writepages+0x160/0x1d0 [ 41.091055] [] ? do_writepages+0x1d0/0x1d0 [ 41.096944] [] ? iov_iter_advance+0x216/0xd40 [ 41.103082] [] generic_perform_write+0x1c7/0x500 [ 41.109468] [] ? filemap_page_mkwrite+0x280/0x280 [ 41.115950] [] ? file_update_time+0xbc/0x390 [ 41.121999] [] ? current_time+0xd0/0xd0 [ 41.127599] [] __generic_file_write_iter+0x352/0x540 [ 41.134325] [] generic_file_write_iter+0x37a/0x620 [ 41.140879] [] __vfs_write+0x3d7/0x580 [ 41.146409] [] ? __vfs_read+0x560/0x560 executing program [ 41.152012] [] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 41.158578] [] ? __sb_start_write+0x161/0x300 [ 41.164696] [] vfs_write+0x187/0x520 [ 41.170035] [] SyS_write+0xd9/0x1c0 [ 41.175286] [] ? SyS_read+0x1c0/0x1c0 [ 41.180718] [] ? do_syscall_64+0x48/0x550 [ 41.186490] [] ? SyS_read+0x1c0/0x1c0 [ 41.191926] [] do_syscall_64+0x19f/0x550 [ 41.197634] [] 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