[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 39.071303] audit: type=1800 audit(1546536217.777:25): pid=7762 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 39.107610] audit: type=1800 audit(1546536217.777:26): pid=7762 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 39.160868] audit: type=1800 audit(1546536217.777:27): pid=7762 uid=0 auid=4294967295 ses=4294967295 subj==unconfined 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.54' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 48.232030] [ 48.233695] ====================================================== [ 48.239994] WARNING: possible circular locking dependency detected [ 48.246294] 4.20.0-next-20190103 #4 Not tainted [ 48.250951] ------------------------------------------------------ [ 48.257242] syz-executor788/7918 is trying to acquire lock: [ 48.262942] 00000000513ba3b1 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 48.270752] [ 48.270752] but task is already holding lock: [ 48.276700] 0000000007f257cf (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 48.286337] [ 48.286337] which lock already depends on the new lock. [ 48.286337] [ 48.294639] [ 48.294639] the existing dependency chain (in reverse order) is: [ 48.302247] [ 48.302247] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 48.309005] down_write+0x8a/0x130 [ 48.313049] shmem_fallocate+0x168/0x1200 [ 48.317716] ashmem_shrink_scan+0x239/0x630 [ 48.322541] ashmem_ioctl+0x38a/0x12c0 [ 48.327285] do_vfs_ioctl+0x107b/0x17d0 [ 48.331763] ksys_ioctl+0xab/0xd0 [ 48.335721] __x64_sys_ioctl+0x73/0xb0 [ 48.340113] do_syscall_64+0x1a3/0x800 [ 48.344507] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.350210] [ 48.350210] -> #1 (ashmem_mutex){+.+.}: [ 48.355649] __mutex_lock+0x12f/0x1670 [ 48.360045] mutex_lock_nested+0x16/0x20 [ 48.364608] ashmem_mmap+0x55/0x520 [ 48.368770] mmap_region+0xdd4/0x1ca0 [ 48.373083] do_mmap+0xa09/0x1220 [ 48.377037] vm_mmap_pgoff+0x20b/0x2b0 [ 48.381427] ksys_mmap_pgoff+0x4f8/0x650 [ 48.385992] __x64_sys_mmap+0xe9/0x1b0 [ 48.390383] do_syscall_64+0x1a3/0x800 [ 48.394776] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.400462] [ 48.400462] -> #0 (&mm->mmap_sem){++++}: [ 48.405983] lock_acquire+0x1db/0x570 [ 48.410300] down_read+0x8d/0x120 [ 48.414284] __do_page_fault+0x9c2/0xd60 [ 48.418848] do_page_fault+0xe6/0x7d8 [ 48.423148] page_fault+0x1e/0x30 [ 48.427138] iov_iter_fault_in_readable+0x377/0x450 [ 48.432685] generic_perform_write+0x202/0x6b0 [ 48.437773] __generic_file_write_iter+0x25e/0x630 [ 48.443205] generic_file_write_iter+0x34e/0x6a0 [ 48.448462] __vfs_write+0x764/0xb40 [ 48.452676] vfs_write+0x20c/0x580 [ 48.456715] ksys_write+0x105/0x260 [ 48.460847] __x64_sys_write+0x73/0xb0 [ 48.465240] do_syscall_64+0x1a3/0x800 [ 48.469639] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.475322] [ 48.475322] other info that might help us debug this: [ 48.475322] [ 48.483434] Chain exists of: [ 48.483434] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 48.483434] [ 48.494958] Possible unsafe locking scenario: [ 48.494958] [ 48.500990] CPU0 CPU1 [ 48.505632] ---- ---- [ 48.510284] lock(&sb->s_type->i_mutex_key#12); [ 48.515020] lock(ashmem_mutex); [ 48.520967] lock(&sb->s_type->i_mutex_key#12); [ 48.528230] lock(&mm->mmap_sem); [ 48.531756] [ 48.531756] *** DEADLOCK *** [ 48.531756] [ 48.537791] 2 locks held by syz-executor788/7918: [ 48.542608] #0: 0000000002ea9b5f (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 48.550217] #1: 0000000007f257cf (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 48.560285] [ 48.560285] stack backtrace: [ 48.564759] CPU: 0 PID: 7918 Comm: syz-executor788 Not tainted 4.20.0-next-20190103 #4 [ 48.572789] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.582136] Call Trace: [ 48.584705] dump_stack+0x1db/0x2d0 [ 48.588315] ? dump_stack_print_info.cold+0x20/0x20 [ 48.593315] ? print_stack_trace+0x77/0xb0 [ 48.597534] ? vprintk_func+0x86/0x189 [ 48.601404] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 48.606752] __lock_acquire+0x2fed/0x4a10 [ 48.610887] ? mark_held_locks+0x100/0x100 [ 48.615102] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.620013] ? __lru_cache_add+0x2eb/0x4b0 [ 48.624231] ? print_usage_bug+0xd0/0xd0 [ 48.628288] ? __pagevec_lru_add+0x30/0x30 [ 48.632502] ? trace_hardirqs_off_caller+0x300/0x300 [ 48.637591] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 48.642852] ? _raw_spin_unlock_irq+0x28/0x90 [ 48.647331] ? lockdep_hardirqs_on+0x415/0x5d0 [ 48.651895] ? __lock_is_held+0xb6/0x140 [ 48.655938] lock_acquire+0x1db/0x570 [ 48.659737] ? __do_page_fault+0x9c2/0xd60 [ 48.663963] ? ___might_sleep+0x1e7/0x310 [ 48.668090] ? lock_release+0xc40/0xc40 [ 48.672044] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 48.677041] ? cmp_ex_search+0x8c/0xb0 [ 48.680927] down_read+0x8d/0x120 [ 48.684365] ? __do_page_fault+0x9c2/0xd60 [ 48.688600] ? __down_interruptible+0x740/0x740 [ 48.693265] ? do_writepages+0x1a0/0x1a0 [ 48.697307] ? set_page_dirty+0x5dd/0xfc0 [ 48.701436] __do_page_fault+0x9c2/0xd60 [ 48.705482] do_page_fault+0xe6/0x7d8 [ 48.709287] ? unlock_page+0x2b1/0x4a0 [ 48.713177] ? vmalloc_sync_all+0x30/0x30 [ 48.717309] ? balance_dirty_pages_ratelimited+0x1b0/0x2380 [ 48.723002] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.727825] page_fault+0x1e/0x30 [ 48.731276] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 48.737056] Code: 89 f6 41 88 57 e0 e8 c8 07 f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 39 06 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 95 07 f3 fd 85 db [ 48.755936] RSP: 0018:ffff888095eff8a8 EFLAGS: 00010293 [ 48.761281] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e1923f [ 48.768535] RDX: 0000000000000000 RSI: ffffffff838e99c7 RDI: 0000000000000007 [ 48.775804] RBP: ffff888095eff948 R08: ffff88808dea6700 R09: fffff9400042069f [ 48.783054] R10: fffff9400042069e R11: ffffea00021034f7 R12: 0000000000001000 [ 48.790304] R13: 0000000000001000 R14: 0000000000000000 R15: ffff888095eff920 [ 48.797562] ? iov_iter_fault_in_readable+0x367/0x450 [ 48.802733] ? iov_iter_fault_in_readable+0x367/0x450 [ 48.807918] ? copy_page_from_iter+0x900/0x900 [ 48.812485] ? shmem_write_begin+0x105/0x1e0 [ 48.816887] ? shmem_write_begin+0x10f/0x1e0 [ 48.821293] generic_perform_write+0x202/0x6b0 [ 48.825861] ? add_page_wait_queue+0x480/0x480 [ 48.830429] ? current_time+0x1b0/0x1b0 [ 48.834392] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 48.839393] ? generic_write_check_limits+0x291/0x380 [ 48.844569] __generic_file_write_iter+0x25e/0x630 [ 48.849496] ? __fget+0x49a/0x710 [ 48.852931] generic_file_write_iter+0x34e/0x6a0 [ 48.857670] ? __generic_file_write_iter+0x630/0x630 [ 48.862752] ? kfree+0xcf/0x230 [ 48.866021] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.871364] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.876910] ? iov_iter_init+0xea/0x220 [ 48.880894] __vfs_write+0x764/0xb40 [ 48.884591] ? kernel_read+0x120/0x120 [ 48.888460] ? rcu_read_lock_sched_held+0x110/0x130 [ 48.893456] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 48.898189] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.903717] ? __sb_start_write+0x1ac/0x360 [ 48.908042] vfs_write+0x20c/0x580 [ 48.911567] ksys_write+0x105/0x260 [ 48.915177] ? __ia32_sys_read+0xb0/0xb0 [ 48.919225] ? do_futex+0x2910/0x2910 [ 48.923010] ? trace_hardirqs_off_caller+0x300/0x300 [ 48.928094] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.932827] __x64_sys_write+0x73/0xb0 [ 48.936695] do_syscall_64+0x1a3/0x800 [ 48.940564] ? syscall_return_slowpath+0x5f0/0x5f0 [ 48.945477] ? prepare_exit_to_usermode+0x232/0x3b0 [ 48.950475] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.955305] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.960487] RIP: 0033:0x446399 [ 48.963664] 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 [ 48.982542] RSP: 002b:00007f3d71cc7da8 EFLAGS: 00000297 ORIG_RAX: 0000000000000001 [ 48.990245] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 0000000000446399 [ 48.997521] RDX: 00000000fffffe48 RSI: 0000000020004240 RDI: 0000000000000004 [ 49.004771] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 49.012020] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dcc2c [ 49.019276] 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 executing program executing program executing program executing program executing program executing program executing program executing program