[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 34.809580] kauditd_printk_skb: 8 callbacks suppressed [ 34.809591] audit: type=1800 audit(1550799664.683:29): pid=7375 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 34.841340] audit: type=1800 audit(1550799664.683:30): pid=7375 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.10.39' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 103.170976] hrtimer: interrupt took 28278 ns executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 104.222022] [ 104.223686] ====================================================== [ 104.230134] WARNING: possible circular locking dependency detected [ 104.236450] 5.0.0-rc7+ #83 Not tainted [ 104.240325] ------------------------------------------------------ [ 104.246632] syz-executor024/7591 is trying to acquire lock: [ 104.252329] 000000003fe6d951 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 104.260132] [ 104.260132] but task is already holding lock: [ 104.266100] 000000006e381745 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 104.275734] [ 104.275734] which lock already depends on the new lock. [ 104.275734] [ 104.284386] [ 104.284386] the existing dependency chain (in reverse order) is: [ 104.292004] [ 104.292004] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 104.298762] down_write+0x38/0x90 [ 104.302741] shmem_fallocate+0x15a/0xc60 [ 104.307326] ashmem_shrink_scan+0x1d7/0x4f0 [ 104.312179] ashmem_ioctl+0x2f0/0x11a0 [ 104.316585] do_vfs_ioctl+0xd6e/0x1390 [ 104.321004] ksys_ioctl+0xab/0xd0 [ 104.324981] __x64_sys_ioctl+0x73/0xb0 [ 104.329389] do_syscall_64+0x103/0x610 [ 104.333799] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 104.339497] [ 104.339497] -> #1 (ashmem_mutex){+.+.}: [ 104.344957] __mutex_lock+0xf7/0x1310 [ 104.349279] mutex_lock_nested+0x16/0x20 [ 104.353863] ashmem_mmap+0x55/0x520 [ 104.358009] mmap_region+0xc37/0x1760 [ 104.362327] do_mmap+0x8e2/0x1080 [ 104.366300] vm_mmap_pgoff+0x1c5/0x230 [ 104.370711] ksys_mmap_pgoff+0x4aa/0x630 [ 104.375289] __x64_sys_mmap+0xe9/0x1b0 [ 104.379705] do_syscall_64+0x103/0x610 [ 104.384116] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 104.389829] [ 104.389829] -> #0 (&mm->mmap_sem){++++}: [ 104.395372] lock_acquire+0x16f/0x3f0 [ 104.399690] down_read+0x3b/0x90 [ 104.403574] __do_page_fault+0x9c2/0xd60 [ 104.408153] do_page_fault+0x71/0x581 [ 104.412476] page_fault+0x1e/0x30 [ 104.416451] iov_iter_fault_in_readable+0x377/0x450 [ 104.421993] generic_perform_write+0x195/0x530 [ 104.427105] __generic_file_write_iter+0x25e/0x630 [ 104.432558] generic_file_write_iter+0x360/0x610 [ 104.437839] __vfs_write+0x613/0x8e0 [ 104.442157] vfs_write+0x20c/0x580 [ 104.446226] ksys_write+0xea/0x1f0 [ 104.450281] __x64_sys_write+0x73/0xb0 [ 104.454676] do_syscall_64+0x103/0x610 [ 104.459093] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 104.464782] [ 104.464782] other info that might help us debug this: [ 104.464782] [ 104.472901] Chain exists of: [ 104.472901] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 104.472901] [ 104.484430] Possible unsafe locking scenario: [ 104.484430] [ 104.490470] CPU0 CPU1 [ 104.495130] ---- ---- [ 104.499775] lock(&sb->s_type->i_mutex_key#12); [ 104.504512] lock(ashmem_mutex); [ 104.510462] lock(&sb->s_type->i_mutex_key#12); [ 104.517718] lock(&mm->mmap_sem); [ 104.521412] [ 104.521412] *** DEADLOCK *** [ 104.521412] [ 104.527466] 2 locks held by syz-executor024/7591: [ 104.532292] #0: 00000000a76030fb (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 104.539914] #1: 000000006e381745 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 104.549971] [ 104.549971] stack backtrace: [ 104.554454] CPU: 1 PID: 7591 Comm: syz-executor024 Not tainted 5.0.0-rc7+ #83 [ 104.561709] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 104.571052] Call Trace: [ 104.573626] dump_stack+0x172/0x1f0 [ 104.577237] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 104.582601] __lock_acquire+0x2f00/0x4700 [ 104.586750] ? mark_held_locks+0x100/0x100 [ 104.590975] ? mark_held_locks+0x100/0x100 [ 104.595196] ? __lock_is_held+0xb6/0x140 [ 104.599265] lock_acquire+0x16f/0x3f0 [ 104.603055] ? __do_page_fault+0x9c2/0xd60 [ 104.607276] down_read+0x3b/0x90 [ 104.610640] ? __do_page_fault+0x9c2/0xd60 [ 104.614861] __do_page_fault+0x9c2/0xd60 [ 104.618906] do_page_fault+0x71/0x581 [ 104.622694] page_fault+0x1e/0x30 [ 104.626137] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 104.631922] Code: 89 f6 41 88 57 e0 e8 b8 2b 47 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 29 2a 47 fe 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 85 2b 47 fe 85 db [ 104.651071] RSP: 0018:ffff88808f7df9b8 EFLAGS: 00010293 [ 104.656415] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e0b53f [ 104.663668] RDX: 0000000000000000 RSI: ffffffff8328b757 RDI: 0000000000000007 [ 104.670920] RBP: ffff88808f7dfa58 R08: ffff88809aca0700 R09: fffff94000454e6f [ 104.678176] R10: fffff94000454e6e R11: ffffea00022a7377 R12: 0000000000001000 [ 104.685539] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88808f7dfa30 [ 104.692797] ? iov_iter_fault_in_readable+0x367/0x450 [ 104.697972] ? iov_iter_fault_in_readable+0x367/0x450 [ 104.703142] ? copy_page_from_iter+0x750/0x750 [ 104.707708] generic_perform_write+0x195/0x530 [ 104.712278] ? page_endio+0x780/0x780 [ 104.716065] ? current_time+0x140/0x140 [ 104.720044] ? lock_acquire+0x16f/0x3f0 [ 104.724005] __generic_file_write_iter+0x25e/0x630 [ 104.728923] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 104.733929] generic_file_write_iter+0x360/0x610 [ 104.738671] ? __generic_file_write_iter+0x630/0x630 [ 104.743753] ? __fget+0x340/0x540 [ 104.747190] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 104.752708] ? iov_iter_init+0xea/0x220 [ 104.756666] __vfs_write+0x613/0x8e0 [ 104.760361] ? kernel_read+0x120/0x120 [ 104.764234] ? rcu_read_lock_sched_held+0x110/0x130 [ 104.769233] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 104.773971] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 104.779503] ? __sb_start_write+0x1ac/0x360 [ 104.783814] vfs_write+0x20c/0x580 [ 104.787437] ksys_write+0xea/0x1f0 [ 104.790962] ? __ia32_sys_read+0xb0/0xb0 [ 104.795011] ? do_syscall_64+0x26/0x610 [ 104.798980] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 104.804339] ? do_syscall_64+0x26/0x610 [ 104.808301] __x64_sys_write+0x73/0xb0 [ 104.812177] do_syscall_64+0x103/0x610 [ 104.816049] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 104.821373] RIP: 0033:0x446599 [ 104.824557] Code: e8 0c e8 ff ff 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 7b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 104.843441] RSP: 002b:00007f861e1fbdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 104.851144] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446599 [ 104.858406] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000005 [ 104.865654] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 104.872908] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 104.880159] R13: 00007fff433879df R14: 00007f861e1fc9c0 R15: 0000000000000000 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program