[....] 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. [ 29.184747] kauditd_printk_skb: 8 callbacks suppressed [ 29.184773] audit: type=1800 audit(1545405524.500:29): pid=5894 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 29.210719] audit: type=1800 audit(1545405524.500:30): pid=5894 uid=0 auid=4294967295 ses=4294967295 subj=_ 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.0.15' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 52.332833] [ 52.334502] ====================================================== [ 52.340818] WARNING: possible circular locking dependency detected [ 52.347139] 4.20.0-rc7+ #160 Not tainted [ 52.351193] ------------------------------------------------------ [ 52.357524] syz-executor712/6296 is trying to acquire lock: [ 52.363235] 00000000702e6f80 (&mm->mmap_sem){++++}, at: __do_page_fault+0xbc9/0xe60 [ 52.371049] [ 52.371049] but task is already holding lock: [ 52.377020] 000000001d14bcca (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 52.386660] [ 52.386660] which lock already depends on the new lock. [ 52.386660] [ 52.394979] [ 52.394979] the existing dependency chain (in reverse order) is: [ 52.402599] [ 52.402599] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 52.409372] down_write+0x8a/0x130 [ 52.413446] shmem_fallocate+0x18b/0x12c0 [ 52.418123] ashmem_shrink_scan+0x238/0x660 [ 52.422971] ashmem_ioctl+0x3ae/0x13a0 [ 52.427386] do_vfs_ioctl+0x1de/0x1790 [ 52.431797] ksys_ioctl+0xa9/0xd0 [ 52.435792] __x64_sys_ioctl+0x73/0xb0 [ 52.440217] do_syscall_64+0x1b9/0x820 [ 52.444633] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.450340] [ 52.450340] -> #1 (ashmem_mutex){+.+.}: [ 52.455812] __mutex_lock+0x166/0x16f0 [ 52.460225] mutex_lock_nested+0x16/0x20 [ 52.464837] ashmem_mmap+0x55/0x520 [ 52.469019] mmap_region+0xe85/0x1cd0 [ 52.473380] do_mmap+0xa22/0x1230 [ 52.477368] vm_mmap_pgoff+0x213/0x2c0 [ 52.481812] ksys_mmap_pgoff+0x4da/0x660 [ 52.486399] __x64_sys_mmap+0xe9/0x1b0 [ 52.490808] do_syscall_64+0x1b9/0x820 [ 52.495217] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.500917] [ 52.500917] -> #0 (&mm->mmap_sem){++++}: [ 52.506473] lock_acquire+0x1ed/0x520 [ 52.510800] down_read+0x8d/0x120 [ 52.514786] __do_page_fault+0xbc9/0xe60 [ 52.519368] do_page_fault+0xf2/0x7e0 [ 52.523691] page_fault+0x1e/0x30 [ 52.527668] iov_iter_fault_in_readable+0x363/0x450 [ 52.533212] generic_perform_write+0x216/0x6a0 [ 52.538323] __generic_file_write_iter+0x26e/0x630 [ 52.543812] generic_file_write_iter+0x34d/0x6b0 [ 52.549100] __vfs_write+0x6b8/0x9f0 [ 52.553341] vfs_write+0x1fc/0x560 [ 52.557405] ksys_write+0x101/0x260 [ 52.561559] __x64_sys_write+0x73/0xb0 [ 52.565971] do_syscall_64+0x1b9/0x820 [ 52.570398] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.576105] [ 52.576105] other info that might help us debug this: [ 52.576105] [ 52.584261] Chain exists of: [ 52.584261] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 52.584261] [ 52.595835] Possible unsafe locking scenario: [ 52.595835] [ 52.601927] CPU0 CPU1 [ 52.606588] ---- ---- [ 52.611247] lock(&sb->s_type->i_mutex_key#11); [ 52.616004] lock(ashmem_mutex); [ 52.621974] lock(&sb->s_type->i_mutex_key#11); [ 52.629251] lock(&mm->mmap_sem); [ 52.632789] [ 52.632789] *** DEADLOCK *** [ 52.632789] [ 52.638857] 2 locks held by syz-executor712/6296: [ 52.643692] #0: 00000000883175a3 (sb_writers#5){.+.+}, at: vfs_write+0x42a/0x560 [ 52.651350] #1: 000000001d14bcca (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 52.661454] [ 52.661454] stack backtrace: [ 52.665962] CPU: 0 PID: 6296 Comm: syz-executor712 Not tainted 4.20.0-rc7+ #160 [ 52.673404] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.682769] Call Trace: [ 52.685368] dump_stack+0x244/0x39d [ 52.689035] ? dump_stack_print_info.cold.1+0x20/0x20 [ 52.694234] ? vprintk_func+0x85/0x181 [ 52.698130] print_circular_bug.isra.35.cold.54+0x1bd/0x27d [ 52.703844] ? save_trace+0xe0/0x290 [ 52.707568] __lock_acquire+0x3399/0x4c20 [ 52.711755] ? mark_held_locks+0x130/0x130 [ 52.716004] ? set_next_entity+0x493/0xc70 [ 52.720243] ? __lock_acquire+0x62f/0x4c20 [ 52.724483] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.730026] ? __enqueue_entity+0x10d/0x1f0 [ 52.734356] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 52.739895] ? page_mapping+0x5a2/0xa50 [ 52.743871] ? __page_mapcount+0x580/0x580 [ 52.748110] ? rcu_read_lock_sched_held+0x14f/0x180 [ 52.753127] ? rcu_note_context_switch+0x12ad/0x2150 [ 52.758235] ? __set_page_dirty_no_writeback+0x3c9/0x6c0 [ 52.763691] ? print_usage_bug+0xc0/0xc0 [ 52.767774] ? _raw_spin_unlock_irq+0x27/0x80 [ 52.772276] ? __lock_is_held+0xb5/0x140 [ 52.776346] lock_acquire+0x1ed/0x520 [ 52.780152] ? __do_page_fault+0xbc9/0xe60 [ 52.784397] ? lock_release+0xa00/0xa00 [ 52.788378] ? perf_trace_sched_process_exec+0x860/0x860 [ 52.793835] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 52.798857] ? cmp_ex_search+0x8c/0xb0 [ 52.802774] down_read+0x8d/0x120 [ 52.806239] ? __do_page_fault+0xbc9/0xe60 [ 52.810477] ? __down_interruptible+0x700/0x700 [ 52.815148] ? _raw_spin_unlock_irq+0x60/0x80 [ 52.819651] ? finish_task_switch+0x1f4/0x910 [ 52.824156] ? finish_task_switch+0x1b4/0x910 [ 52.828661] ? iov_iter_fault_in_readable+0x363/0x450 [ 52.833858] __do_page_fault+0xbc9/0xe60 [ 52.837927] ? balance_dirty_pages_ratelimited+0x1f7/0x2370 [ 52.843654] do_page_fault+0xf2/0x7e0 [ 52.847459] ? vmalloc_sync_all+0x30/0x30 [ 52.851613] ? error_entry+0x76/0xd0 [ 52.855333] ? trace_hardirqs_off_caller+0xbb/0x310 [ 52.860360] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 52.865209] ? trace_hardirqs_on_caller+0x310/0x310 [ 52.870688] ? __sched_text_start+0x8/0x8 [ 52.874849] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 52.879706] page_fault+0x1e/0x30 [ 52.883184] RIP: 0010:iov_iter_fault_in_readable+0x363/0x450 [ 52.888989] Code: 00 31 ff 44 89 ee 88 55 98 e8 49 e9 ee fd 45 85 ed 74 c2 e9 7d fe ff ff e8 2a e8 ee fd 0f 1f 00 0f ae e8 48 8b 85 28 ff ff ff <8a> 00 0f 1f 00 31 ff 89 de 88 85 58 ff ff ff e8 19 e9 ee fd 85 db [ 52.907903] RSP: 0018:ffff8881c01cf7d8 EFLAGS: 00010293 [ 52.913276] RAX: 000000002020023f RBX: 0000000000000000 RCX: ffffffff83909ae2 [ 52.920558] RDX: 0000000000000000 RSI: ffffffff83909c46 RDI: 0000000000000007 [ 52.927839] RBP: ffff8881c01cf8b0 R08: ffff8881bf4be1c0 R09: fffff94000d835ce [ 52.935222] R10: fffff94000d835ce R11: ffffea0006c1ae77 R12: 0000000000000000 [ 52.942501] R13: 0000000000001000 R14: 0000000000001000 R15: ffff8881c01cfbc8 [ 52.949813] ? iov_iter_fault_in_readable+0x1f2/0x450 [ 52.955019] ? iov_iter_fault_in_readable+0x356/0x450 [ 52.960223] ? iov_iter_fault_in_readable+0x356/0x450 [ 52.965422] ? _copy_from_iter_flushcache+0xfc0/0xfc0 [ 52.970620] ? _copy_to_iter_mcsafe+0x1680/0x1680 [ 52.975475] ? shmem_write_begin+0x10a/0x1e0 [ 52.979889] ? shmem_write_begin+0x113/0x1e0 [ 52.984307] generic_perform_write+0x216/0x6a0 [ 52.988897] ? may_umount_tree+0x210/0x210 [ 52.993142] ? add_page_wait_queue+0x400/0x400 [ 52.997768] ? current_time+0x1b0/0x1b0 [ 53.001769] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 53.006798] ? generic_write_check_limits+0x28d/0x370 [ 53.011993] __generic_file_write_iter+0x26e/0x630 [ 53.016933] generic_file_write_iter+0x34d/0x6b0 [ 53.021698] ? __generic_file_write_iter+0x630/0x630 [ 53.026820] ? __kasan_slab_free+0x102/0x150 [ 53.031234] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 53.036792] ? iov_iter_init+0xe5/0x210 [ 53.040782] __vfs_write+0x6b8/0x9f0 [ 53.044510] ? kernel_read+0x120/0x120 [ 53.048399] ? __lock_is_held+0xb5/0x140 [ 53.052470] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 53.058015] ? __sb_start_write+0x1b2/0x370 [ 53.062341] vfs_write+0x1fc/0x560 [ 53.065895] ksys_write+0x101/0x260 [ 53.069532] ? __ia32_sys_read+0xb0/0xb0 [ 53.073600] ? trace_hardirqs_off_caller+0x310/0x310 [ 53.078728] __x64_sys_write+0x73/0xb0 [ 53.082634] do_syscall_64+0x1b9/0x820 [ 53.086528] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 53.091902] ? syscall_return_slowpath+0x5e0/0x5e0 [ 53.096842] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 53.101693] ? trace_hardirqs_on_caller+0x310/0x310 [ 53.106715] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 53.111781] ? prepare_exit_to_usermode+0x291/0x3b0 [ 53.116807] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 53.121662] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 53.126865] RIP: 0033:0x446479 [ 53.130063] 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 [ 53.148965] RSP: 002b:00007f0f5a1c7da8 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 53.156678] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 0000000000446479 [ 53.163952] RDX: 00000000fffffe48 RSI: 0000000020004240 RDI: 0000000000000003 [ 53.171227] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 53.178499] R10: 0000000000000000 R11: 0000000000000293 R12: 00000000006dcc2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 53.185786] R13: 5f7869736f70275b R14: 6873612f7665642f 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program