[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 42.002685] audit: type=1800 audit(1546626889.166:25): pid=7921 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 42.033044] audit: type=1800 audit(1546626889.176:26): pid=7921 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 42.076676] audit: type=1800 audit(1546626889.176:27): pid=7921 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [....] Starting periodic command scheduler: cron[?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: [ 48.012791] sshd (8060) used greatest stack depth: 19848 bytes left Warning: Permanently added '10.128.0.56' (ECDSA) to the list of known hosts. executing program executing program [ 54.754687] [ 54.756367] ====================================================== [ 54.762660] WARNING: possible circular locking dependency detected [ 54.768960] 4.20.0+ #9 Not tainted [ 54.772481] ------------------------------------------------------ [ 54.778804] syz-executor253/8079 is trying to acquire lock: [ 54.784494] 00000000910fda11 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 54.792302] [ 54.792302] but task is already holding lock: [ 54.798262] 00000000191ab218 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 54.807868] [ 54.807868] which lock already depends on the new lock. [ 54.807868] [ 54.816156] [ 54.816156] the existing dependency chain (in reverse order) is: [ 54.823748] [ 54.823748] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 54.830488] down_write+0x8a/0x130 [ 54.834531] shmem_fallocate+0x168/0x1200 [ 54.839181] ashmem_shrink_scan+0x239/0x630 [ 54.844005] ashmem_ioctl+0x38a/0x12c0 [ 54.848393] do_vfs_ioctl+0x107b/0x17d0 [ 54.852868] ksys_ioctl+0xab/0xd0 [ 54.856836] __x64_sys_ioctl+0x73/0xb0 [ 54.861226] do_syscall_64+0x1a3/0x800 [ 54.865627] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.871313] [ 54.871313] -> #1 (ashmem_mutex){+.+.}: [ 54.876748] __mutex_lock+0x12f/0x1670 [ 54.881137] mutex_lock_nested+0x16/0x20 [ 54.885702] ashmem_mmap+0x55/0x520 [ 54.889832] mmap_region+0xde5/0x1ca0 [ 54.894132] do_mmap+0xa09/0x1220 [ 54.898090] vm_mmap_pgoff+0x20b/0x2b0 [ 54.902503] ksys_mmap_pgoff+0x4f8/0x650 [ 54.907069] __x64_sys_mmap+0xe9/0x1b0 [ 54.911458] do_syscall_64+0x1a3/0x800 [ 54.915846] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.921529] [ 54.921529] -> #0 (&mm->mmap_sem){++++}: [ 54.927051] lock_acquire+0x1db/0x570 [ 54.931350] down_read+0x8d/0x120 [ 54.935313] __do_page_fault+0x9c2/0xd60 [ 54.939876] do_page_fault+0xe6/0x7d8 [ 54.944174] page_fault+0x1e/0x30 [ 54.948137] iov_iter_fault_in_readable+0x377/0x450 [ 54.953673] generic_perform_write+0x202/0x6b0 [ 54.958771] __generic_file_write_iter+0x25e/0x630 [ 54.964219] generic_file_write_iter+0x34e/0x6a0 [ 54.969499] __vfs_write+0x764/0xb40 [ 54.973725] vfs_write+0x20c/0x580 [ 54.977765] ksys_write+0x105/0x260 [ 54.981891] __x64_sys_write+0x73/0xb0 [ 54.986283] do_syscall_64+0x1a3/0x800 [ 54.990671] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.996355] [ 54.996355] other info that might help us debug this: [ 54.996355] [ 55.004466] Chain exists of: [ 55.004466] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 55.004466] [ 55.015974] Possible unsafe locking scenario: [ 55.015974] [ 55.022019] CPU0 CPU1 [ 55.026661] ---- ---- [ 55.031300] lock(&sb->s_type->i_mutex_key#11); [ 55.036033] lock(ashmem_mutex); [ 55.041991] lock(&sb->s_type->i_mutex_key#11); [ 55.049237] lock(&mm->mmap_sem); [ 55.052751] [ 55.052751] *** DEADLOCK *** [ 55.052751] [ 55.058785] 2 locks held by syz-executor253/8079: [ 55.063606] #0: 0000000087f4e85c (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 55.071238] #1: 00000000191ab218 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 55.081280] [ 55.081280] stack backtrace: [ 55.085753] CPU: 1 PID: 8079 Comm: syz-executor253 Not tainted 4.20.0+ #9 [ 55.092652] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.101981] Call Trace: [ 55.104549] dump_stack+0x1db/0x2d0 [ 55.108155] ? dump_stack_print_info.cold+0x20/0x20 [ 55.113151] ? print_stack_trace+0x77/0xb0 [ 55.117365] ? vprintk_func+0x86/0x189 [ 55.121235] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 55.126578] __lock_acquire+0x3014/0x4a30 [ 55.130717] ? mark_held_locks+0x100/0x100 [ 55.134954] ? shmem_getpage_gfp+0x197e/0x4b70 [ 55.139519] ? trace_hardirqs_off_caller+0x300/0x300 [ 55.144626] ? do_raw_spin_trylock+0x270/0x270 [ 55.149207] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 55.153772] ? __lock_is_held+0xb6/0x140 [ 55.157818] ? ip6gre_tunnel_lookup+0xf40/0x2170 [ 55.162563] lock_acquire+0x1db/0x570 [ 55.166348] ? __do_page_fault+0x9c2/0xd60 [ 55.170564] ? ___might_sleep+0x1e7/0x310 [ 55.174700] ? lock_release+0xc40/0xc40 [ 55.178672] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 55.183678] ? cmp_ex_search+0x8c/0xb0 [ 55.187550] down_read+0x8d/0x120 [ 55.190988] ? __do_page_fault+0x9c2/0xd60 [ 55.195208] ? __down_interruptible+0x740/0x740 [ 55.199863] ? do_writepages+0x1a0/0x1a0 [ 55.203904] ? set_page_dirty+0x5dd/0xfc0 [ 55.208037] __do_page_fault+0x9c2/0xd60 [ 55.212133] do_page_fault+0xe6/0x7d8 [ 55.215914] ? unlock_page+0x2b1/0x4a0 [ 55.219793] ? vmalloc_sync_all+0x30/0x30 [ 55.223955] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 55.229650] ? copyin+0xd5/0x100 [ 55.233000] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 55.237842] page_fault+0x1e/0x30 [ 55.241295] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 55.247099] Code: 89 f6 41 88 57 e0 e8 78 bd f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 e9 bb f3 fd 0f 1f 00 0f ae e8 44 89 f0 48 8b 8d 68 ff ff ff <8a> 11 89 c3 0f 1f 00 41 88 57 d0 31 ff 89 de e8 45 bd f3 fd 85 db [ 55.265984] RSP: 0018:ffff8880a8a9f8a8 EFLAGS: 00010293 [ 55.271323] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e1123f [ 55.278570] RDX: 0000000000000000 RSI: ffffffff838e3967 RDI: 0000000000000007 [ 55.285840] RBP: ffff8880a8a9f948 R08: ffff888090fae180 R09: fffff94000415c8f [ 55.293091] R10: fffff94000415c8e R11: ffffea00020ae477 R12: 0000000000001000 [ 55.300343] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880a8a9f920 [ 55.307615] ? iov_iter_fault_in_readable+0x367/0x450 [ 55.312790] ? iov_iter_fault_in_readable+0x367/0x450 [ 55.317976] ? copy_page_from_iter+0x900/0x900 [ 55.322550] ? shmem_write_begin+0x105/0x1e0 [ 55.326957] ? shmem_write_begin+0x10f/0x1e0 [ 55.331365] generic_perform_write+0x202/0x6b0 [ 55.335940] ? add_page_wait_queue+0x480/0x480 [ 55.340501] ? current_time+0x1b0/0x1b0 [ 55.344455] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 55.349490] ? generic_write_check_limits+0x291/0x380 [ 55.354664] __generic_file_write_iter+0x25e/0x630 [ 55.359575] ? __fget+0x499/0x710 [ 55.363012] generic_file_write_iter+0x34e/0x6a0 [ 55.367759] ? __generic_file_write_iter+0x630/0x630 [ 55.372845] ? kfree+0xcf/0x230 [ 55.376133] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.381479] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 55.386995] ? iov_iter_init+0xea/0x220 [ 55.390950] __vfs_write+0x764/0xb40 [ 55.394660] ? kernel_read+0x120/0x120 [ 55.398566] ? rcu_read_lock_sched_held+0x110/0x130 [ 55.403619] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 55.408357] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 55.413872] ? __sb_start_write+0x1ac/0x360 [ 55.418174] vfs_write+0x20c/0x580 [ 55.421697] ksys_write+0x105/0x260 [ 55.425306] ? __ia32_sys_read+0xb0/0xb0 [ 55.429370] ? do_futex+0x2910/0x2910 [ 55.433154] ? trace_hardirqs_off_caller+0x300/0x300 [ 55.438240] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 55.442994] __x64_sys_write+0x73/0xb0 [ 55.446868] do_syscall_64+0x1a3/0x800 [ 55.450753] ? syscall_return_slowpath+0x5f0/0x5f0 [ 55.455831] ? prepare_exit_to_usermode+0x232/0x3b0 [ 55.460831] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 55.465679] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.470850] RIP: 0033:0x446399 [ 55.474038] Code: e8 2c b3 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 55.492948] RSP: 002b:00007f184f34bda8 EFLAGS: 00000297 ORIG_RAX: 0000000000000001 [ 55.500635] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 0000000000446399 executing program [ 55.507883] RDX: 00000000fffffe48 RSI: 0000000020004240 RDI: 0000000000000004 [ 55.515133] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 55.522380] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dcc2c [ 55.529641] R13: 656363615f6c6361 R14: 5f7869736f70275b R15: 00000000006dcd2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program