[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 33.620927] audit: type=1800 audit(1544826360.646:33): pid=5981 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 33.647278] audit: type=1800 audit(1544826360.646:34): pid=5981 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 [ 34.036057] audit: type=1400 audit(1544826361.056:35): avc: denied { map } for pid=6158 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.91' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 131.261706] audit: type=1400 audit(1544826458.286:36): avc: denied { map } for pid=6173 comm="syz-executor660" path="/root/syz-executor660439455" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 131.300063] audit: type=1400 audit(1544826458.286:37): avc: denied { map } for pid=6182 comm="syz-executor660" path="/dev/ashmem" dev="devtmpfs" ino=16745 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 131.309280] hrtimer: interrupt took 43689 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 209.380751] [ 209.382423] ====================================================== [ 209.388734] WARNING: possible circular locking dependency detected [ 209.395066] 4.20.0-rc6+ #153 Not tainted [ 209.399120] ------------------------------------------------------ [ 209.405433] syz-executor660/10668 is trying to acquire lock: [ 209.411224] 000000007ab3e610 (&mm->mmap_sem){++++}, at: __do_page_fault+0xbc9/0xe60 [ 209.419046] [ 209.419046] but task is already holding lock: [ 209.425020] 0000000063c638ff (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 209.434673] [ 209.434673] which lock already depends on the new lock. [ 209.434673] [ 209.442996] [ 209.442996] the existing dependency chain (in reverse order) is: [ 209.450628] [ 209.450628] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 209.457410] down_write+0x8a/0x130 [ 209.461490] shmem_fallocate+0x18b/0x12c0 [ 209.466164] ashmem_shrink_scan+0x238/0x660 [ 209.471011] ashmem_ioctl+0x3ae/0x13a0 [ 209.475453] do_vfs_ioctl+0x1de/0x1790 [ 209.479873] ksys_ioctl+0xa9/0xd0 [ 209.483867] __x64_sys_ioctl+0x73/0xb0 [ 209.488280] do_syscall_64+0x1b9/0x820 [ 209.492701] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 209.498408] [ 209.498408] -> #1 (ashmem_mutex){+.+.}: [ 209.503890] __mutex_lock+0x166/0x16f0 [ 209.508337] mutex_lock_nested+0x16/0x20 [ 209.512927] ashmem_mmap+0x55/0x520 [ 209.517076] mmap_region+0xe85/0x1cd0 [ 209.521394] do_mmap+0xa22/0x1230 [ 209.525376] vm_mmap_pgoff+0x213/0x2c0 [ 209.529788] ksys_mmap_pgoff+0x4da/0x660 [ 209.534391] __x64_sys_mmap+0xe9/0x1b0 [ 209.538812] do_syscall_64+0x1b9/0x820 [ 209.543240] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 209.548956] [ 209.548956] -> #0 (&mm->mmap_sem){++++}: [ 209.554511] lock_acquire+0x1ed/0x520 [ 209.558849] down_read+0x8d/0x120 [ 209.562859] __do_page_fault+0xbc9/0xe60 [ 209.567443] do_page_fault+0xf2/0x7e0 [ 209.571764] page_fault+0x1e/0x30 [ 209.575736] iov_iter_fault_in_readable+0x1b4/0x450 [ 209.581273] generic_perform_write+0x216/0x6a0 [ 209.586377] __generic_file_write_iter+0x26e/0x630 [ 209.591825] generic_file_write_iter+0x34d/0x6b0 [ 209.597108] __vfs_write+0x6b8/0x9f0 [ 209.601370] vfs_write+0x1fc/0x560 [ 209.605460] ksys_write+0x101/0x260 [ 209.609605] __x64_sys_write+0x73/0xb0 [ 209.614011] do_syscall_64+0x1b9/0x820 [ 209.618431] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 209.624145] [ 209.624145] other info that might help us debug this: [ 209.624145] [ 209.632280] Chain exists of: [ 209.632280] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 209.632280] [ 209.643825] Possible unsafe locking scenario: [ 209.643825] [ 209.649871] CPU0 CPU1 [ 209.654525] ---- ---- [ 209.659177] lock(&sb->s_type->i_mutex_key#12); [ 209.663937] lock(ashmem_mutex); [ 209.669909] lock(&sb->s_type->i_mutex_key#12); [ 209.677175] lock(&mm->mmap_sem); [ 209.680707] [ 209.680707] *** DEADLOCK *** [ 209.680707] [ 209.686768] 2 locks held by syz-executor660/10668: [ 209.691683] #0: 000000009af6c6e6 (sb_writers#6){.+.+}, at: vfs_write+0x42a/0x560 [ 209.699332] #1: 0000000063c638ff (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 [ 209.709401] [ 209.709401] stack backtrace: [ 209.713912] CPU: 0 PID: 10668 Comm: syz-executor660 Not tainted 4.20.0-rc6+ #153 [ 209.721434] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 209.730775] Call Trace: [ 209.733373] dump_stack+0x244/0x39d [ 209.737002] ? dump_stack_print_info.cold.1+0x20/0x20 [ 209.742189] ? vprintk_func+0x85/0x181 [ 209.746078] print_circular_bug.isra.35.cold.54+0x1bd/0x27d [ 209.751800] ? save_trace+0xe0/0x290 [ 209.755515] __lock_acquire+0x3399/0x4c20 [ 209.759665] ? mark_held_locks+0x130/0x130 [ 209.763898] ? print_usage_bug+0xc0/0xc0 [ 209.767957] ? __bpf_trace_preemptirq_template+0x30/0x30 [ 209.773423] ? retint_kernel+0x2d/0x2d [ 209.777313] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 209.782860] ? page_mapping+0x5a2/0xa50 [ 209.786842] ? print_usage_bug+0xc0/0xc0 [ 209.790915] ? __sanitizer_cov_trace_pc+0x26/0x50 [ 209.795757] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 209.801293] ? __set_page_dirty_no_writeback+0x3c9/0x6c0 [ 209.806751] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 209.811507] ? __lock_is_held+0xb5/0x140 [ 209.815566] lock_acquire+0x1ed/0x520 [ 209.819374] ? __do_page_fault+0xbc9/0xe60 [ 209.823613] ? lock_release+0xa00/0xa00 [ 209.827583] ? perf_trace_sched_process_exec+0x860/0x860 [ 209.833039] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 209.838058] ? cmp_ex_search+0x8c/0xb0 [ 209.841951] down_read+0x8d/0x120 [ 209.845403] ? __do_page_fault+0xbc9/0xe60 [ 209.849636] ? __down_interruptible+0x700/0x700 [ 209.854310] ? iov_iter_fault_in_readable+0x1b4/0x450 [ 209.859506] __do_page_fault+0xbc9/0xe60 [ 209.863566] ? balance_dirty_pages_ratelimited+0x1f7/0x2370 [ 209.869296] do_page_fault+0xf2/0x7e0 [ 209.873100] ? vmalloc_sync_all+0x30/0x30 [ 209.877249] ? error_entry+0x76/0xd0 [ 209.880964] ? trace_hardirqs_off_caller+0xbb/0x310 [ 209.885979] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 209.890818] ? trace_hardirqs_on_caller+0x310/0x310 [ 209.895833] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 209.900687] page_fault+0x1e/0x30 [ 209.904147] RIP: 0010:iov_iter_fault_in_readable+0x1b4/0x450 [ 209.909961] Code: fd 49 39 dc 76 17 eb 3c e8 89 f2 ee fd 49 81 c4 00 10 00 00 4c 39 a5 28 ff ff ff 72 2e e8 74 f2 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 66 f3 ee fd [ 209.928858] RSP: 0018:ffff8881b965f7d8 EFLAGS: 00010246 [ 209.934216] RAX: ffff8881bc56e640 RBX: 0000000000000000 RCX: ffffffff839091cd [ 209.941482] RDX: 0000000000000000 RSI: ffffffff839091fc RDI: 0000000000000005 [ 209.948747] RBP: ffff8881b965f8b0 R08: ffff8881bc56e640 R09: fffff94000dd4cde [ 209.956012] R10: fffff94000dd4cde R11: ffffea0006ea66f7 R12: 0000000020200000 [ 209.963278] R13: 0000000000001000 R14: 0000000000001000 R15: ffff8881b965fbc8 [ 209.970562] ? iov_iter_fault_in_readable+0x17d/0x450 [ 209.975753] ? iov_iter_fault_in_readable+0x1ac/0x450 [ 209.980943] ? iov_iter_fault_in_readable+0x1ac/0x450 [ 209.986144] ? _copy_from_iter_flushcache+0xfc0/0xfc0 [ 209.991356] ? _copy_to_iter_mcsafe+0x1680/0x1680 [ 209.996217] ? shmem_write_begin+0x10a/0x1e0 [ 210.000620] ? shmem_write_begin+0x113/0x1e0 [ 210.005027] generic_perform_write+0x216/0x6a0 [ 210.009614] ? may_umount_tree+0x210/0x210 [ 210.013855] ? add_page_wait_queue+0x400/0x400 [ 210.018439] ? current_time+0x1b0/0x1b0 [ 210.022410] ? generic_write_check_limits+0x113/0x370 [ 210.027600] ? generic_write_check_limits+0x15e/0x370 [ 210.032789] ? generic_write_check_limits+0x180/0x370 [ 210.037975] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 210.042989] ? generic_write_check_limits+0x28d/0x370 [ 210.048179] __generic_file_write_iter+0x26e/0x630 [ 210.053111] ? generic_file_write_iter+0x73/0x6b0 [ 210.057952] generic_file_write_iter+0x34d/0x6b0 [ 210.062705] ? __generic_file_write_iter+0x630/0x630 [ 210.067838] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 210.073371] ? iov_iter_init+0xe5/0x210 [ 210.077355] __vfs_write+0x6b8/0x9f0 [ 210.081066] ? kernel_read+0x120/0x120 [ 210.084957] ? __lock_is_held+0xb5/0x140 [ 210.089026] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 210.094560] ? __sb_start_write+0x1b2/0x370 [ 210.098896] vfs_write+0x1fc/0x560 [ 210.102439] ksys_write+0x101/0x260 [ 210.106069] ? __ia32_sys_read+0xb0/0xb0 [ 210.110126] __x64_sys_write+0x73/0xb0 [ 210.114029] do_syscall_64+0x1b9/0x820 [ 210.117930] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 210.123300] ? syscall_return_slowpath+0x5e0/0x5e0 [ 210.128248] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 210.133091] ? trace_hardirqs_on_caller+0x310/0x310 [ 210.138101] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 210.143127] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 210.148662] ? prepare_exit_to_usermode+0x291/0x3b0 [ 210.153678] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 210.158527] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 210.163709] RIP: 0033:0x447899 executing program executing program executing program executing program executing program [ 210.166916] Code: e8 dc e6 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 4b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 210.185820] RSP: 002b:00007f69e4af0ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 210.193553] RAX: ffffffffffffffda RBX: 00000000006ddc28 RCX: 0000000000447899 [ 210.200820] RDX: 00000000ffffff76 RSI: 0000000020000000 RDI: 0000000000000005 [ 210.208085] RBP: 00000000006ddc20 R08: 0000000000000000 R09: 0000000000000000 [ 210.215347] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc2c [ 210.222616] R13: 00007fffc910fd9f R14: 00007f69e4af19c0 R15: 00000000006ddd2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program