[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [ 9.277638] random: sshd: uninitialized urandom read (32 bytes read) [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 17.172975] random: sshd: uninitialized urandom read (32 bytes read) [ 17.403155] random: sshd: uninitialized urandom read (32 bytes read) [ 17.539904] random: crng init done Warning: Permanently added '10.128.0.56' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program [ 35.418597] hrtimer: interrupt took 25792 ns executing program executing program executing program [ 35.962289] [ 35.964097] ====================================================== [ 35.970500] [ INFO: possible circular locking dependency detected ] [ 35.977150] 4.9.190+ #5 Not tainted [ 35.980870] ------------------------------------------------------- [ 35.988062] syz-executor534/2086 is trying to acquire lock: [ 35.993759] (&mm->mmap_sem){++++++}, at: [<000000002bcfb8bc>] __do_page_fault+0x7bd/0xa60 [ 36.002650] but task is already holding lock: [ 36.007307] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<00000000e5dcf918>] generic_file_write_iter+0x9a/0x630 [ 36.018057] which lock already depends on the new lock. [ 36.018057] [ 36.025058] [ 36.025058] the existing dependency chain (in reverse order) is: [ 36.032677] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 36.038954] lock_acquire+0x133/0x3d0 [ 36.043270] down_write+0x41/0xa0 [ 36.047234] shmem_fallocate+0x143/0xab0 [ 36.051816] ashmem_shrink_scan+0x1c3/0x4c0 [ 36.056648] ashmem_ioctl+0x29b/0xdd0 [ 36.061003] do_vfs_ioctl+0xb87/0x11d0 [ 36.065405] SyS_ioctl+0x8f/0xc0 [ 36.069282] do_syscall_64+0x1ad/0x5c0 [ 36.073681] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 36.079286] -> #1 (ashmem_mutex){+.+.+.}: [ 36.084124] lock_acquire+0x133/0x3d0 [ 36.088431] mutex_lock_nested+0xc7/0x920 [ 36.093087] ashmem_mmap+0x53/0x470 [ 36.097224] mmap_region+0x7e7/0xfa0 [ 36.101444] do_mmap+0x539/0xbc0 [ 36.105320] vm_mmap_pgoff+0x179/0x1c0 [ 36.109714] SyS_mmap_pgoff+0xfa/0x1b0 [ 36.114113] SyS_mmap+0x16/0x20 [ 36.117897] do_syscall_64+0x1ad/0x5c0 [ 36.122296] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 36.127902] -> #0 (&mm->mmap_sem){++++++}: [ 36.132841] __lock_acquire+0x2d22/0x4390 [ 36.137494] lock_acquire+0x133/0x3d0 [ 36.141799] down_read+0x44/0xb0 [ 36.145670] __do_page_fault+0x7bd/0xa60 [ 36.150247] do_page_fault+0x28/0x30 [ 36.154467] page_fault+0x25/0x30 [ 36.158426] generic_perform_write+0x1b6/0x500 [ 36.163513] __generic_file_write_iter+0x340/0x530 [ 36.168946] generic_file_write_iter+0x38a/0x630 [ 36.174208] __vfs_write+0x3c1/0x560 [ 36.178425] vfs_write+0x185/0x520 [ 36.182472] SyS_write+0x121/0x270 [ 36.186525] do_syscall_64+0x1ad/0x5c0 [ 36.190926] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 36.196530] [ 36.196530] other info that might help us debug this: [ 36.196530] [ 36.204655] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 [ 36.214509] Possible unsafe locking scenario: [ 36.214509] [ 36.220551] CPU0 CPU1 [ 36.225200] ---- ---- [ 36.229850] lock(&sb->s_type->i_mutex_key#10); [ 36.234981] lock(ashmem_mutex); [ 36.241196] lock(&sb->s_type->i_mutex_key#10); [ 36.248846] lock(&mm->mmap_sem); [ 36.252630] [ 36.252630] *** DEADLOCK *** [ 36.252630] [ 36.258674] 2 locks held by syz-executor534/2086: [ 36.263505] #0: (sb_writers#6){.+.+.+}, at: [<000000003f868c80>] vfs_write+0x3e9/0x520 [ 36.272413] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<00000000e5dcf918>] generic_file_write_iter+0x9a/0x630 [ 36.283722] [ 36.283722] stack backtrace: [ 36.288207] CPU: 1 PID: 2086 Comm: syz-executor534 Not tainted 4.9.190+ #5 [ 36.295211] ffff8801ced0f5d8 ffffffff81b65c51 ffffffff83caf440 ffffffff83cb8dd0 [ 36.303253] ffffffff83ccccc0 ffffffff84250fc0 ffff8801cf2b97c0 ffff8801ced0f630 [ 36.311288] ffffffff814069f3 dffffc0000000000 ffffffff84029bc0 ffff8801cf2ba0c0 [ 36.319327] Call Trace: [ 36.321906] [<0000000024ac8c2e>] dump_stack+0xc1/0x120 [ 36.327266] [<000000007767f001>] print_circular_bug.cold+0x2f6/0x454 [ 36.333832] [<0000000066084f99>] __lock_acquire+0x2d22/0x4390 [ 36.339792] [<00000000f88274e9>] ? kasan_unpoison_shadow+0x35/0x50 [ 36.346189] [<00000000d1e702b9>] ? kasan_alloc_pages+0x38/0x40 [ 36.352234] [<00000000e9e7ed19>] ? trace_hardirqs_on+0x10/0x10 [ 36.358282] [<000000008fc496cd>] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 36.365112] [<000000002f3b89d5>] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.371682] [<00000000194c6423>] ? check_preemption_disabled+0x3c/0x200 [ 36.378506] [<000000001e85c3ae>] lock_acquire+0x133/0x3d0 [ 36.384119] [<000000002bcfb8bc>] ? __do_page_fault+0x7bd/0xa60 [ 36.390166] [<00000000c8812813>] down_read+0x44/0xb0 [ 36.395347] [<000000002bcfb8bc>] ? __do_page_fault+0x7bd/0xa60 [ 36.401395] [<000000002bcfb8bc>] __do_page_fault+0x7bd/0xa60 [ 36.407279] [<0000000017032c64>] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 36.414195] [<00000000bcf882c6>] ? bad_area_access_error+0x3d0/0x3d0 [ 36.420770] [<000000009db0942d>] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 36.427427] [<0000000006c7666f>] do_page_fault+0x28/0x30 [ 36.432950] [<000000006dd33d96>] page_fault+0x25/0x30 [ 36.438218] [<00000000f4d522ed>] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 36.445221] [<0000000015f93eaa>] ? iov_iter_fault_in_readable+0x30d/0x3d0 [ 36.452219] [<00000000f4d522ed>] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 36.459221] [<00000000174d458d>] ? iov_iter_init+0x1d0/0x1d0 [ 36.465097] [<00000000cc068bea>] generic_perform_write+0x1b6/0x500 [ 36.471492] [<000000007295c419>] ? filemap_page_mkwrite+0x280/0x280 [ 36.477973] [<0000000029b6c34f>] ? current_time+0xd0/0xd0 [ 36.483584] [<00000000f940ce63>] __generic_file_write_iter+0x340/0x530 [ 36.490323] [<00000000103d1f22>] generic_file_write_iter+0x38a/0x630 [ 36.496892] [<00000000f36b52b3>] __vfs_write+0x3c1/0x560 [ 36.502414] [<00000000b63a806c>] ? bpf_fd_pass+0x270/0x270 [ 36.508115] [<0000000007f05c6b>] ? __vfs_read+0x550/0x550 [ 36.513727] [<00000000951d8537>] ? rcu_read_lock_sched_held+0x10b/0x130 [ 36.520556] [<00000000723f321b>] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 36.527120] [<0000000049d2050d>] ? __sb_start_write+0x161/0x310 [ 36.533250] [<00000000bef1e415>] vfs_write+0x185/0x520 [ 36.538602] [<0000000001d6d3d2>] SyS_write+0x121/0x270 [ 36.543954] [<000000009806e3a5>] ? SyS_read+0x270/0x270 [ 36.549395] [<00000000fb582d51>] ? do_syscall_64+0x4a/0x5c0 [ 36.555178] [<000000009806e3a5>] ? SyS_read+0x270/0x270 executing program executing program executing program executing program executing program executing program [ 36.560612] [<0000000069256ca3>] do_syscall_64+0x1ad/0x5c0 [ 36.566591] [<00000000e706def4>] 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