[ 45.002435] audit: type=1800 audit(1549035656.100:29): pid=7971 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 45.042206] audit: type=1800 audit(1549035656.100:30): pid=7971 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 Starting mcstransd: [....] 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. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.77' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 70.195476] kauditd_printk_skb: 5 callbacks suppressed [ 70.195492] audit: type=1400 audit(1549035681.290:36): avc: denied { map } for pid=8157 comm="syz-executor975" path="/root/syz-executor975067043" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 70.230717] audit: type=1400 audit(1549035681.320:37): avc: denied { map } for pid=8158 comm="syz-executor975" path="/dev/ashmem" dev="devtmpfs" ino=17926 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 73.829589] [ 73.831265] ====================================================== [ 73.837581] WARNING: possible circular locking dependency detected [ 73.843998] 5.0.0-rc4+ #55 Not tainted [ 73.847930] ------------------------------------------------------ [ 73.854255] syz-executor975/8282 is trying to acquire lock: [ 73.860022] 000000003ea4471e (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 73.867817] [ 73.867817] but task is already holding lock: [ 73.874466] 00000000bc650cb3 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 73.884095] [ 73.884095] which lock already depends on the new lock. [ 73.884095] [ 73.892445] [ 73.892445] the existing dependency chain (in reverse order) is: [ 73.900087] [ 73.900087] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 73.906838] down_write+0x8a/0x130 [ 73.910894] shmem_fallocate+0x168/0x1200 [ 73.915568] ashmem_shrink_scan+0x239/0x630 [ 73.920440] ashmem_ioctl+0x38a/0x12c0 [ 73.924840] do_vfs_ioctl+0x107b/0x17d0 [ 73.929363] ksys_ioctl+0xab/0xd0 [ 73.933334] __x64_sys_ioctl+0x73/0xb0 [ 73.937744] do_syscall_64+0x1a3/0x800 [ 73.942246] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 73.947939] [ 73.947939] -> #1 (ashmem_mutex){+.+.}: [ 73.953408] __mutex_lock+0x12f/0x1670 [ 73.957809] mutex_lock_nested+0x16/0x20 [ 73.962391] ashmem_mmap+0x55/0x520 [ 73.966538] mmap_region+0xde5/0x1ca0 [ 73.970851] do_mmap+0xa09/0x1220 [ 73.974815] vm_mmap_pgoff+0x20b/0x2b0 [ 73.979212] ksys_mmap_pgoff+0x4f8/0x650 [ 73.983784] __x64_sys_mmap+0xe9/0x1b0 [ 73.988182] do_syscall_64+0x1a3/0x800 [ 73.992583] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 73.998276] [ 73.998276] -> #0 (&mm->mmap_sem){++++}: [ 74.003811] lock_acquire+0x1db/0x570 [ 74.008120] down_read+0x8d/0x120 [ 74.012093] __do_page_fault+0x9c2/0xd60 [ 74.016677] do_page_fault+0xe6/0x7d8 [ 74.021013] page_fault+0x1e/0x30 [ 74.025000] iov_iter_fault_in_readable+0x377/0x450 [ 74.030527] generic_perform_write+0x202/0x6b0 [ 74.035623] __generic_file_write_iter+0x25e/0x630 [ 74.041065] generic_file_write_iter+0x34e/0x6a0 [ 74.046334] __vfs_write+0x764/0xb40 [ 74.050597] vfs_write+0x20c/0x580 [ 74.054692] ksys_write+0x105/0x260 [ 74.058832] __x64_sys_write+0x73/0xb0 [ 74.063230] do_syscall_64+0x1a3/0x800 [ 74.067628] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 74.073320] [ 74.073320] other info that might help us debug this: [ 74.073320] [ 74.081444] Chain exists of: [ 74.081444] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 74.081444] [ 74.092986] Possible unsafe locking scenario: [ 74.092986] [ 74.099069] CPU0 CPU1 [ 74.103731] ---- ---- [ 74.108394] lock(&sb->s_type->i_mutex_key#12); [ 74.113135] lock(ashmem_mutex); [ 74.119092] lock(&sb->s_type->i_mutex_key#12); [ 74.126350] lock(&mm->mmap_sem); [ 74.129887] [ 74.129887] *** DEADLOCK *** [ 74.129887] [ 74.135933] 2 locks held by syz-executor975/8282: [ 74.140784] #0: 0000000066490220 (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 74.148458] #1: 00000000bc650cb3 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 74.158554] [ 74.158554] stack backtrace: [ 74.163060] CPU: 0 PID: 8282 Comm: syz-executor975 Not tainted 5.0.0-rc4+ #55 [ 74.170321] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 74.179657] Call Trace: [ 74.182249] dump_stack+0x1db/0x2d0 [ 74.185893] ? dump_stack_print_info.cold+0x20/0x20 [ 74.190901] ? print_stack_trace+0x77/0xb0 [ 74.195123] ? vprintk_func+0x86/0x189 [ 74.199000] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 74.204348] __lock_acquire+0x3014/0x4a30 [ 74.208483] ? mark_held_locks+0x100/0x100 [ 74.212706] ? shmem_getpage_gfp+0x197e/0x4b70 [ 74.217273] ? trace_hardirqs_off_caller+0x300/0x300 [ 74.222364] ? do_raw_spin_trylock+0x270/0x270 [ 74.226968] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 74.231551] ? __lock_is_held+0xb6/0x140 [ 74.235617] lock_acquire+0x1db/0x570 [ 74.239402] ? __do_page_fault+0x9c2/0xd60 [ 74.243627] ? ___might_sleep+0x1e7/0x310 [ 74.247764] ? lock_release+0xc40/0xc40 [ 74.251719] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 74.256729] ? cmp_ex_search+0x8c/0xb0 [ 74.260607] down_read+0x8d/0x120 [ 74.264041] ? __do_page_fault+0x9c2/0xd60 [ 74.268255] ? __down_interruptible+0x740/0x740 [ 74.272909] ? do_writepages+0x1a0/0x1a0 [ 74.276966] ? set_page_dirty+0x5dd/0xfc0 [ 74.281112] __do_page_fault+0x9c2/0xd60 [ 74.285160] do_page_fault+0xe6/0x7d8 [ 74.288942] ? unlock_page+0x2b1/0x4a0 [ 74.292824] ? vmalloc_sync_all+0x30/0x30 [ 74.296966] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 74.302701] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 74.307545] page_fault+0x1e/0x30 [ 74.311015] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 74.316792] Code: 89 f6 41 88 57 e0 e8 e8 ad f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 59 ac 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 b5 ad f3 fd 85 db [ 74.335854] RSP: 0018:ffff88809146f8a8 EFLAGS: 00010293 [ 74.341211] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020c00c3f [ 74.348465] RDX: 0000000000000000 RSI: ffffffff838e5807 RDI: 0000000000000007 [ 74.355718] RBP: ffff88809146f948 R08: ffff8880a0c18300 R09: fffff940004347df [ 74.362977] R10: fffff940004347de R11: ffffea00021a3ef7 R12: 0000000000001000 [ 74.370229] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88809146f920 [ 74.377492] ? iov_iter_fault_in_readable+0x367/0x450 [ 74.382697] ? iov_iter_fault_in_readable+0x367/0x450 [ 74.387870] ? copy_page_from_iter+0x900/0x900 [ 74.392435] ? shmem_write_begin+0x105/0x1e0 [ 74.396824] ? shmem_write_begin+0x10f/0x1e0 [ 74.401215] generic_perform_write+0x202/0x6b0 [ 74.405781] ? add_page_wait_queue+0x480/0x480 [ 74.410347] ? current_time+0x1b0/0x1b0 [ 74.414311] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 74.419306] ? generic_write_check_limits+0x291/0x380 [ 74.424483] __generic_file_write_iter+0x25e/0x630 [ 74.429392] ? __fget+0x499/0x710 [ 74.432831] generic_file_write_iter+0x34e/0x6a0 [ 74.437569] ? __generic_file_write_iter+0x630/0x630 [ 74.442666] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 74.448195] ? iov_iter_init+0xea/0x220 [ 74.452157] __vfs_write+0x764/0xb40 [ 74.455855] ? kernel_read+0x120/0x120 [ 74.459736] ? rcu_read_lock_sched_held+0x110/0x130 [ 74.464737] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 74.469477] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 74.474997] ? __sb_start_write+0x1ac/0x360 [ 74.479301] vfs_write+0x20c/0x580 [ 74.482826] ksys_write+0x105/0x260 [ 74.486437] ? __ia32_sys_read+0xb0/0xb0 [ 74.490484] ? do_futex+0x2910/0x2910 [ 74.494269] ? trace_hardirqs_off_caller+0x300/0x300 [ 74.499354] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 74.504095] __x64_sys_write+0x73/0xb0 [ 74.507977] do_syscall_64+0x1a3/0x800 [ 74.511850] ? syscall_return_slowpath+0x5f0/0x5f0 [ 74.516766] ? prepare_exit_to_usermode+0x232/0x3b0 [ 74.521765] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 74.526601] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 74.531788] RIP: 0033:0x4463d9 [ 74.534975] 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 [ 74.553859] RSP: 002b:00007fdb052ddda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 74.561544] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004463d9 [ 74.568794] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 74.576048] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 executing program [ 74.583307] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 74.590554] R13: 0000000000000000 R14: 0080000080000000 R15: 20c49ba5e353f7cf executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program