[....] 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.185745] kauditd_printk_skb: 8 callbacks suppressed [ 29.185769] audit: type=1800 audit(1545405519.667:29): pid=5918 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 [ 29.218572] audit: type=1800 audit(1545405519.667:30): pid=5918 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.0.19' (ECDSA) to the list of known hosts. executing program executing program executing program executing program syzkaller login: [ 41.151428] [ 41.153104] ====================================================== [ 41.159426] WARNING: possible circular locking dependency detected [ 41.165751] 4.20.0-rc7+ #381 Not tainted [ 41.169818] ------------------------------------------------------ [ 41.176127] syz-executor891/6084 is trying to acquire lock: [ 41.181984] 000000009ea6c0ef (&mm->mmap_sem){++++}, at: __do_page_fault+0xbc9/0xe60 [ 41.189792] [ 41.189792] but task is already holding lock: [ 41.195763] 0000000011791312 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 41.205394] [ 41.205394] which lock already depends on the new lock. [ 41.205394] [ 41.213704] [ 41.213704] the existing dependency chain (in reverse order) is: [ 41.221318] [ 41.221318] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 41.228085] down_write+0x8a/0x130 [ 41.232144] shmem_fallocate+0x18b/0x12c0 [ 41.236808] ashmem_shrink_scan+0x238/0x660 [ 41.241664] ashmem_ioctl+0x3ae/0x13a0 [ 41.246080] do_vfs_ioctl+0x1de/0x1790 [ 41.250486] ksys_ioctl+0xa9/0xd0 [ 41.254452] __x64_sys_ioctl+0x73/0xb0 [ 41.258858] do_syscall_64+0x1b9/0x820 [ 41.263259] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.268953] [ 41.268953] -> #1 (ashmem_mutex){+.+.}: [ 41.274457] __mutex_lock+0x166/0x16f0 [ 41.278879] mutex_lock_nested+0x16/0x20 [ 41.283453] ashmem_mmap+0x55/0x520 [ 41.287592] mmap_region+0xe85/0x1cd0 [ 41.291909] do_mmap+0xa22/0x1230 [ 41.295878] vm_mmap_pgoff+0x213/0x2c0 [ 41.300295] ksys_mmap_pgoff+0x4da/0x660 [ 41.304878] __x64_sys_mmap+0xe9/0x1b0 [ 41.309276] do_syscall_64+0x1b9/0x820 [ 41.313681] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.319381] [ 41.319381] -> #0 (&mm->mmap_sem){++++}: [ 41.324924] lock_acquire+0x1ed/0x520 [ 41.329251] down_read+0x8d/0x120 [ 41.333219] __do_page_fault+0xbc9/0xe60 [ 41.337796] do_page_fault+0xf2/0x7e0 [ 41.342114] page_fault+0x1e/0x30 [ 41.346097] iov_iter_fault_in_readable+0x1b4/0x450 [ 41.351629] generic_perform_write+0x216/0x6a0 [ 41.356724] __generic_file_write_iter+0x26e/0x630 [ 41.362189] generic_file_write_iter+0x34d/0x6b0 [ 41.367456] __vfs_write+0x6b8/0x9f0 [ 41.371684] vfs_write+0x1fc/0x560 [ 41.375747] ksys_write+0x101/0x260 [ 41.379884] __x64_sys_write+0x73/0xb0 [ 41.384298] do_syscall_64+0x1b9/0x820 [ 41.388697] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.394390] [ 41.394390] other info that might help us debug this: [ 41.394390] [ 41.402522] Chain exists of: [ 41.402522] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 41.402522] [ 41.414084] Possible unsafe locking scenario: [ 41.414084] [ 41.420146] CPU0 CPU1 [ 41.424801] ---- ---- [ 41.429456] lock(&sb->s_type->i_mutex_key#12); [ 41.434207] lock(ashmem_mutex); [ 41.440179] lock(&sb->s_type->i_mutex_key#12); [ 41.447439] lock(&mm->mmap_sem); [ 41.450964] [ 41.450964] *** DEADLOCK *** [ 41.450964] [ 41.457020] 2 locks held by syz-executor891/6084: [ 41.461845] #0: 000000008e22affe (sb_writers#5){.+.+}, at: vfs_write+0x42a/0x560 [ 41.469479] #1: 0000000011791312 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 41.479534] [ 41.479534] stack backtrace: [ 41.484057] CPU: 0 PID: 6084 Comm: syz-executor891 Not tainted 4.20.0-rc7+ #381 [ 41.491490] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.500832] Call Trace: [ 41.503420] dump_stack+0x244/0x39d [ 41.507044] ? dump_stack_print_info.cold.1+0x20/0x20 [ 41.512233] ? vprintk_func+0x85/0x181 [ 41.516139] print_circular_bug.isra.35.cold.54+0x1bd/0x27d [ 41.521884] ? save_trace+0xe0/0x290 [ 41.525597] __lock_acquire+0x3399/0x4c20 [ 41.529759] ? mark_held_locks+0x130/0x130 [ 41.533991] ? finish_task_switch+0x2f4/0x910 [ 41.538483] ? preempt_notifier_register+0x200/0x200 [ 41.543593] ? __switch_to_asm+0x34/0x70 [ 41.547644] ? __switch_to_asm+0x34/0x70 [ 41.551711] ? vmf_insert_mixed_mkwrite+0x40/0x40 [ 41.556557] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 41.561587] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.567128] ? page_mapping+0x5a2/0xa50 [ 41.571098] ? __page_mapcount+0x580/0x580 [ 41.575358] ? __set_page_dirty_no_writeback+0x3c9/0x6c0 [ 41.580809] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 41.586339] ? ex_handler_uaccess+0x9d/0xc0 [ 41.590658] ? bogus_uaccess.isra.2+0x180/0x180 [ 41.595320] ? fixup_exception+0xb1/0xde [ 41.599398] ? __lock_is_held+0xb5/0x140 [ 41.603470] lock_acquire+0x1ed/0x520 [ 41.607264] ? __do_page_fault+0xbc9/0xe60 [ 41.611511] ? lock_release+0xa00/0xa00 [ 41.615480] ? perf_trace_sched_process_exec+0x860/0x860 [ 41.620930] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 41.625952] ? cmp_ex_search+0x8c/0xb0 [ 41.629843] down_read+0x8d/0x120 [ 41.633291] ? __do_page_fault+0xbc9/0xe60 [ 41.637518] ? __down_interruptible+0x700/0x700 [ 41.642179] ? mark_held_locks+0xc7/0x130 [ 41.646325] ? iov_iter_fault_in_readable+0x1b4/0x450 [ 41.651507] __do_page_fault+0xbc9/0xe60 [ 41.655573] ? retint_kernel+0x2d/0x2d [ 41.659473] do_page_fault+0xf2/0x7e0 [ 41.663273] ? vmalloc_sync_all+0x30/0x30 [ 41.667416] ? error_entry+0x76/0xd0 [ 41.671129] ? trace_hardirqs_off_caller+0xbb/0x310 [ 41.676141] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.680983] ? trace_hardirqs_on_caller+0x310/0x310 [ 41.685995] ? __do_page_fault+0x491/0xe60 [ 41.690223] ? retint_kernel+0x2d/0x2d [ 41.694108] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.698952] page_fault+0x1e/0x30 [ 41.702403] RIP: 0010:iov_iter_fault_in_readable+0x1b4/0x450 [ 41.708193] Code: fd 49 39 dc 76 17 eb 3c e8 e9 e9 ee fd 49 81 c4 00 10 00 00 4c 39 a5 28 ff ff ff 72 2e e8 d4 e9 ee fd 0f 1f 00 0f ae e8 31 db <41> 8a 04 24 0f 1f 00 31 ff 89 de 88 85 58 ff ff ff e8 c6 ea ee fd [ 41.727088] RSP: 0018:ffff8881c01b77d8 EFLAGS: 00010246 [ 41.732441] RAX: ffff8881c02f41c0 RBX: 0000000000000000 RCX: ffffffff83909a6d [ 41.739702] RDX: 0000000000000000 RSI: ffffffff83909a9c RDI: 0000000000000005 [ 41.746965] RBP: ffff8881c01b78b0 R08: ffff8881c02f41c0 R09: fffff94000d8213e [ 41.754224] R10: fffff94000d8213e R11: ffffea0006c109f7 R12: 0000000020e31240 [ 41.761484] R13: 0000000000001000 R14: 0000000000001000 R15: ffff8881c01b7bc8 [ 41.768763] ? iov_iter_fault_in_readable+0x17d/0x450 [ 41.773955] ? iov_iter_fault_in_readable+0x1ac/0x450 [ 41.779146] ? iov_iter_fault_in_readable+0x1ac/0x450 [ 41.784332] ? _copy_from_iter_flushcache+0xfc0/0xfc0 [ 41.789525] ? _copy_to_iter_mcsafe+0x1680/0x1680 [ 41.794362] ? shmem_write_begin+0x10a/0x1e0 [ 41.798796] ? shmem_write_begin+0x113/0x1e0 [ 41.803202] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.808748] generic_perform_write+0x216/0x6a0 [ 41.813333] ? add_page_wait_queue+0x400/0x400 [ 41.817914] ? current_time+0x1b0/0x1b0 [ 41.821893] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 41.826903] ? generic_write_check_limits+0x28d/0x370 [ 41.832094] __generic_file_write_iter+0x26e/0x630 [ 41.837021] generic_file_write_iter+0x34d/0x6b0 [ 41.841782] ? __generic_file_write_iter+0x630/0x630 [ 41.846884] ? __kasan_slab_free+0x102/0x150 [ 41.851293] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.856827] ? iov_iter_init+0xe5/0x210 [ 41.860806] __vfs_write+0x6b8/0x9f0 [ 41.864521] ? kernel_read+0x120/0x120 [ 41.868407] ? __lock_is_held+0xb5/0x140 [ 41.872470] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.878003] ? __sb_start_write+0x1b2/0x370 [ 41.882319] vfs_write+0x1fc/0x560 [ 41.885863] ksys_write+0x101/0x260 [ 41.889505] ? __ia32_sys_read+0xb0/0xb0 [ 41.893563] ? trace_hardirqs_off_caller+0x310/0x310 [ 41.898663] __x64_sys_write+0x73/0xb0 [ 41.902548] do_syscall_64+0x1b9/0x820 [ 41.906433] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 41.911816] ? syscall_return_slowpath+0x5e0/0x5e0 [ 41.916779] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.921617] ? trace_hardirqs_on_caller+0x310/0x310 [ 41.926656] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 41.931675] ? prepare_exit_to_usermode+0x291/0x3b0 [ 41.936684] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.941524] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.946703] RIP: 0033:0x446369 [ 41.949891] 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 [ 41.968783] RSP: 002b:00007f558a774da8 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 41.976483] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446369 [ 41.983782] RDX: 00000000fffffe48 RSI: 0000000020004240 RDI: 0000000000000003 [ 41.991045] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 executing program [ 41.998318] R10: 0000000000000000 R11: 0000000000000293 R12: 00000000006dbc2c [ 42.005609] R13: 5f7869736f70275b R14: 6873612f7665642f R15: 00000000006dbd2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program