[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 41.217494] audit: type=1800 audit(1546602814.554:25): pid=7935 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 41.253882] audit: type=1800 audit(1546602814.554:26): pid=7935 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 41.282811] audit: type=1800 audit(1546602814.554:27): pid=7935 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 Warning: Permanently added '10.128.10.36' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 65.936949] [ 65.938625] ====================================================== [ 65.945086] WARNING: possible circular locking dependency detected [ 65.951549] 4.20.0+ #8 Not tainted [ 65.955082] ------------------------------------------------------ [ 65.962179] syz-executor670/8090 is trying to acquire lock: [ 65.968027] 000000005ebb4fbd (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 65.975937] [ 65.975937] but task is already holding lock: [ 65.981909] 00000000f9d6f906 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 65.991641] [ 65.991641] which lock already depends on the new lock. [ 65.991641] [ 66.000262] [ 66.000262] the existing dependency chain (in reverse order) is: [ 66.008154] [ 66.008154] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 66.015029] down_write+0x8a/0x130 [ 66.019083] shmem_fallocate+0x168/0x1200 [ 66.024031] ashmem_shrink_scan+0x239/0x630 [ 66.028871] ashmem_ioctl+0x38a/0x12c0 [ 66.033271] do_vfs_ioctl+0x107b/0x17d0 [ 66.038040] ksys_ioctl+0xab/0xd0 [ 66.042136] __x64_sys_ioctl+0x73/0xb0 [ 66.046663] do_syscall_64+0x1a3/0x800 [ 66.051066] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.057044] [ 66.057044] -> #1 (ashmem_mutex){+.+.}: [ 66.062493] __mutex_lock+0x12f/0x1670 [ 66.066893] mutex_lock_nested+0x16/0x20 [ 66.071585] ashmem_mmap+0x55/0x520 [ 66.075824] mmap_region+0xde5/0x1ca0 [ 66.080274] do_mmap+0xa09/0x1220 [ 66.084239] vm_mmap_pgoff+0x20b/0x2b0 [ 66.088640] ksys_mmap_pgoff+0x4f8/0x650 [ 66.093431] __x64_sys_mmap+0xe9/0x1b0 [ 66.097839] do_syscall_64+0x1a3/0x800 [ 66.102236] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.108051] [ 66.108051] -> #0 (&mm->mmap_sem){++++}: [ 66.113648] lock_acquire+0x1db/0x570 [ 66.118097] down_read+0x8d/0x120 [ 66.122068] __do_page_fault+0x9c2/0xd60 [ 66.126789] do_page_fault+0xe6/0x7d8 [ 66.131207] page_fault+0x1e/0x30 [ 66.135281] iov_iter_fault_in_readable+0x377/0x450 [ 66.140939] generic_perform_write+0x202/0x6b0 [ 66.146174] __generic_file_write_iter+0x25e/0x630 [ 66.151686] generic_file_write_iter+0x34e/0x6a0 [ 66.157073] __vfs_write+0x764/0xb40 [ 66.161300] vfs_write+0x20c/0x580 [ 66.165351] ksys_write+0x105/0x260 [ 66.169603] __x64_sys_write+0x73/0xb0 [ 66.174006] do_syscall_64+0x1a3/0x800 [ 66.178538] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.184399] [ 66.184399] other info that might help us debug this: [ 66.184399] [ 66.192676] Chain exists of: [ 66.192676] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 66.192676] [ 66.204971] Possible unsafe locking scenario: [ 66.204971] [ 66.211172] CPU0 CPU1 [ 66.216097] ---- ---- [ 66.220869] lock(&sb->s_type->i_mutex_key#11); [ 66.225614] lock(ashmem_mutex); [ 66.231683] lock(&sb->s_type->i_mutex_key#11); [ 66.239180] lock(&mm->mmap_sem); [ 66.242962] [ 66.242962] *** DEADLOCK *** [ 66.242962] [ 66.249219] 2 locks held by syz-executor670/8090: [ 66.254110] #0: 00000000e30007b9 (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 66.261730] #1: 00000000f9d6f906 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 66.271795] [ 66.271795] stack backtrace: [ 66.276280] CPU: 1 PID: 8090 Comm: syz-executor670 Not tainted 4.20.0+ #8 [ 66.283450] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 66.292801] Call Trace: [ 66.295377] dump_stack+0x1db/0x2d0 [ 66.298992] ? dump_stack_print_info.cold+0x20/0x20 [ 66.304371] ? print_stack_trace+0x77/0xb0 [ 66.308661] ? vprintk_func+0x86/0x189 [ 66.312662] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 66.318136] __lock_acquire+0x3014/0x4a30 [ 66.322278] ? mark_held_locks+0x100/0x100 [ 66.326637] ? shmem_getpage_gfp+0x197e/0x4b70 [ 66.331208] ? trace_hardirqs_off_caller+0x300/0x300 [ 66.336682] ? do_raw_spin_trylock+0x270/0x270 [ 66.341363] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 66.345941] ? __lock_is_held+0xb6/0x140 [ 66.349994] lock_acquire+0x1db/0x570 [ 66.353891] ? __do_page_fault+0x9c2/0xd60 [ 66.358128] ? ___might_sleep+0x1e7/0x310 [ 66.362377] ? lock_release+0xc40/0xc40 [ 66.366350] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 66.371361] ? cmp_ex_search+0x8c/0xb0 [ 66.375245] down_read+0x8d/0x120 [ 66.378687] ? __do_page_fault+0x9c2/0xd60 [ 66.382970] ? __down_interruptible+0x740/0x740 [ 66.387630] ? do_writepages+0x1a0/0x1a0 [ 66.391899] ? set_page_dirty+0x5dd/0xfc0 [ 66.396200] __do_page_fault+0x9c2/0xd60 [ 66.400362] do_page_fault+0xe6/0x7d8 [ 66.404303] ? unlock_page+0x2b1/0x4a0 [ 66.408182] ? vmalloc_sync_all+0x30/0x30 [ 66.412491] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 66.418190] ? retint_kernel+0x2d/0x2d [ 66.422081] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 66.427040] page_fault+0x1e/0x30 [ 66.430483] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 66.436482] Code: 89 f6 41 88 57 e0 e8 f8 d7 f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 69 d6 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 c5 d7 f3 fd 85 db [ 66.455379] RSP: 0018:ffff8880a39b78a8 EFLAGS: 00010293 [ 66.460997] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e5dc3f [ 66.468393] RDX: 0000000000000000 RSI: ffffffff838e1ee7 RDI: 0000000000000007 [ 66.475650] RBP: ffff8880a39b7948 R08: ffff88808e752480 R09: fffff9400041afa7 [ 66.483014] R10: fffff9400041afa6 R11: ffffea00020d7d37 R12: 0000000000001000 [ 66.490270] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880a39b7920 [ 66.497537] ? iov_iter_fault_in_readable+0x367/0x450 [ 66.502935] ? iov_iter_fault_in_readable+0x367/0x450 [ 66.508235] ? copy_page_from_iter+0x900/0x900 [ 66.512922] ? shmem_write_begin+0x105/0x1e0 [ 66.517395] ? shmem_write_begin+0x10f/0x1e0 [ 66.521808] generic_perform_write+0x202/0x6b0 [ 66.526514] ? add_page_wait_queue+0x480/0x480 [ 66.531204] ? current_time+0x1b0/0x1b0 [ 66.535168] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 66.540197] ? generic_write_check_limits+0x291/0x380 [ 66.545658] __generic_file_write_iter+0x25e/0x630 [ 66.550724] ? __fget+0x499/0x710 [ 66.554421] generic_file_write_iter+0x34e/0x6a0 [ 66.559282] ? __generic_file_write_iter+0x630/0x630 [ 66.564508] ? kfree+0xcf/0x230 [ 66.567796] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.573273] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 66.578910] ? iov_iter_init+0xea/0x220 [ 66.582880] __vfs_write+0x764/0xb40 [ 66.586590] ? kernel_read+0x120/0x120 [ 66.590584] ? rcu_read_lock_sched_held+0x110/0x130 [ 66.595589] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 66.600388] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.605921] ? __sb_start_write+0x1ac/0x360 [ 66.610241] vfs_write+0x20c/0x580 [ 66.613788] ksys_write+0x105/0x260 [ 66.617542] ? __ia32_sys_read+0xb0/0xb0 [ 66.621593] ? do_futex+0x2910/0x2910 [ 66.625500] ? trace_hardirqs_off_caller+0x300/0x300 [ 66.630594] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 66.635455] __x64_sys_write+0x73/0xb0 [ 66.639473] do_syscall_64+0x1a3/0x800 [ 66.643477] ? syscall_return_slowpath+0x5f0/0x5f0 [ 66.648402] ? prepare_exit_to_usermode+0x232/0x3b0 [ 66.653412] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 66.658340] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.663858] RIP: 0033:0x446359 [ 66.667057] 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 executing program [ 66.686169] RSP: 002b:00007f59732b7da8 EFLAGS: 00000297 ORIG_RAX: 0000000000000001 [ 66.693865] RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000446359 [ 66.701239] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 66.708646] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 66.715906] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dac2c [ 66.723270] R13: 3ed592df9946286b R14: dfdd4f11168a8b2b R15: 00000000006dad2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program