[ 47.217571] audit: type=1800 audit(1549970221.004:29): pid=8077 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 [ 47.246519] audit: type=1800 audit(1549970221.004:30): pid=8077 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 periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] 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.54' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 128.225648] kauditd_printk_skb: 5 callbacks suppressed [ 128.225664] audit: type=1400 audit(1549970302.014:36): avc: denied { map } for pid=8264 comm="syz-executor204" path="/root/syz-executor204756531" 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 [ 128.257745] audit: type=1400 audit(1549970302.024:37): avc: denied { map } for pid=8265 comm="syz-executor204" path="/dev/ashmem" dev="devtmpfs" ino=1936 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 128.310211] hrtimer: interrupt took 54398 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 [ 157.670459] [ 157.672149] ====================================================== [ 157.678466] WARNING: possible circular locking dependency detected [ 157.684779] 5.0.0-rc6+ #68 Not tainted [ 157.688663] ------------------------------------------------------ [ 157.694976] syz-executor204/8682 is trying to acquire lock: [ 157.700693] 000000008378c8fa (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 157.708482] [ 157.708482] but task is already holding lock: [ 157.714435] 00000000b9e212c5 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 157.724046] [ 157.724046] which lock already depends on the new lock. [ 157.724046] [ 157.732341] [ 157.732341] the existing dependency chain (in reverse order) is: [ 157.740079] [ 157.740079] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 157.746841] down_write+0x38/0x90 [ 157.750816] shmem_fallocate+0x15a/0xc60 [ 157.755458] ashmem_shrink_scan+0x1d7/0x4f0 [ 157.760825] ashmem_ioctl+0x2f0/0x11a0 [ 157.765233] do_vfs_ioctl+0xd6e/0x1390 [ 157.769636] ksys_ioctl+0xab/0xd0 [ 157.773606] __x64_sys_ioctl+0x73/0xb0 [ 157.778012] do_syscall_64+0x103/0x610 [ 157.782421] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 157.788129] [ 157.788129] -> #1 (ashmem_mutex){+.+.}: [ 157.793595] __mutex_lock+0xf7/0x1310 [ 157.797918] mutex_lock_nested+0x16/0x20 [ 157.802497] ashmem_mmap+0x55/0x520 [ 157.806639] mmap_region+0xc37/0x1760 [ 157.810950] do_mmap+0x8e2/0x1080 [ 157.814916] vm_mmap_pgoff+0x1c5/0x230 [ 157.819341] ksys_mmap_pgoff+0x4aa/0x630 [ 157.823915] __x64_sys_mmap+0xe9/0x1b0 [ 157.828346] do_syscall_64+0x103/0x610 [ 157.832750] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 157.838449] [ 157.838449] -> #0 (&mm->mmap_sem){++++}: [ 157.843994] lock_acquire+0x16f/0x3f0 [ 157.848307] down_read+0x3b/0x90 [ 157.852191] __do_page_fault+0x9c2/0xd60 [ 157.856790] do_page_fault+0x71/0x581 [ 157.861099] page_fault+0x1e/0x30 [ 157.865068] iov_iter_fault_in_readable+0x377/0x450 [ 157.870598] generic_perform_write+0x195/0x530 [ 157.875692] __generic_file_write_iter+0x25e/0x630 [ 157.881134] generic_file_write_iter+0x360/0x610 [ 157.886421] __vfs_write+0x613/0x8e0 [ 157.890651] vfs_write+0x20c/0x580 [ 157.894719] ksys_write+0xea/0x1f0 [ 157.898771] __x64_sys_write+0x73/0xb0 [ 157.903176] do_syscall_64+0x103/0x610 [ 157.907605] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 157.913296] [ 157.913296] other info that might help us debug this: [ 157.913296] [ 157.921425] Chain exists of: [ 157.921425] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 157.921425] [ 157.932956] Possible unsafe locking scenario: [ 157.932956] [ 157.938993] CPU0 CPU1 [ 157.943643] ---- ---- [ 157.948294] lock(&sb->s_type->i_mutex_key#12); [ 157.953059] lock(ashmem_mutex); [ 157.959015] lock(&sb->s_type->i_mutex_key#12); [ 157.966277] lock(&mm->mmap_sem); [ 157.969803] [ 157.969803] *** DEADLOCK *** [ 157.969803] [ 157.975851] 2 locks held by syz-executor204/8682: [ 157.980704] #0: 00000000295715d0 (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 157.988332] #1: 00000000b9e212c5 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 157.998436] [ 157.998436] stack backtrace: [ 158.002926] CPU: 0 PID: 8682 Comm: syz-executor204 Not tainted 5.0.0-rc6+ #68 [ 158.010189] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 158.019532] Call Trace: [ 158.022133] dump_stack+0x172/0x1f0 [ 158.025760] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 158.031119] __lock_acquire+0x2f00/0x4700 [ 158.035287] ? retint_kernel+0x2d/0x2d [ 158.039166] ? trace_hardirqs_on_caller+0x6a/0x220 [ 158.044087] ? mark_held_locks+0x100/0x100 [ 158.048352] ? iov_iter_fault_in_readable+0x377/0x450 [ 158.053539] ? cmp_ex_sort+0xd0/0xd0 [ 158.057260] ? cmp_ex_search+0x14/0xb0 [ 158.061157] ? __lock_is_held+0xb6/0x140 [ 158.065228] lock_acquire+0x16f/0x3f0 [ 158.069035] ? __do_page_fault+0x9c2/0xd60 [ 158.073269] down_read+0x3b/0x90 [ 158.076630] ? __do_page_fault+0x9c2/0xd60 [ 158.080865] __do_page_fault+0x9c2/0xd60 [ 158.084949] do_page_fault+0x71/0x581 [ 158.088766] page_fault+0x1e/0x30 [ 158.092218] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 158.098033] Code: 89 f6 41 88 57 e0 e8 f8 1e 47 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 69 1d 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 c5 1e 47 fe 85 db [ 158.116923] RSP: 0018:ffff88807c62f9b8 EFLAGS: 00010293 [ 158.122279] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000002040053f [ 158.129539] RDX: 0000000000000000 RSI: ffffffff8328c3b7 RDI: 0000000000000007 [ 158.136811] RBP: ffff88807c62fa58 R08: ffff8880a051a5c0 R09: fffff94000474cff [ 158.144070] R10: fffff94000474cfe R11: ffffea00023a67f7 R12: 0000000000001000 [ 158.151345] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88807c62fa30 [ 158.158624] ? iov_iter_fault_in_readable+0x367/0x450 [ 158.163810] ? iov_iter_fault_in_readable+0x367/0x450 [ 158.169002] ? copy_page_from_iter+0x750/0x750 [ 158.173597] generic_perform_write+0x195/0x530 [ 158.178173] ? page_endio+0x780/0x780 [ 158.181968] ? current_time+0x140/0x140 [ 158.185934] ? lock_acquire+0x16f/0x3f0 [ 158.189900] __generic_file_write_iter+0x25e/0x630 [ 158.194824] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 158.199836] generic_file_write_iter+0x360/0x610 [ 158.204599] ? __generic_file_write_iter+0x630/0x630 [ 158.209695] ? lockdep_hardirqs_on+0x415/0x5d0 [ 158.214272] ? retint_kernel+0x2d/0x2d [ 158.218151] ? trace_hardirqs_on_caller+0x6a/0x220 [ 158.223072] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 158.228600] ? iov_iter_init+0xea/0x220 [ 158.232582] __vfs_write+0x613/0x8e0 [ 158.236301] ? kernel_read+0x120/0x120 [ 158.240191] ? rcu_read_lock_sched_held+0x110/0x130 [ 158.245202] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 158.249956] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 158.255493] ? __sb_start_write+0x1ac/0x360 [ 158.259821] vfs_write+0x20c/0x580 [ 158.263355] ksys_write+0xea/0x1f0 [ 158.266904] ? __ia32_sys_read+0xb0/0xb0 [ 158.270961] ? do_syscall_64+0x26/0x610 [ 158.274925] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 158.280284] ? do_syscall_64+0x26/0x610 [ 158.284253] __x64_sys_write+0x73/0xb0 [ 158.288134] do_syscall_64+0x103/0x610 [ 158.292018] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 158.297213] RIP: 0033:0x4469f9 [ 158.300440] Code: e8 bc b9 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 fb 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 executing program [ 158.319335] RSP: 002b:00007f527d4fed98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 158.327033] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 00000000004469f9 [ 158.334292] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000005 [ 158.341560] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 158.348817] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c [ 158.356076] R13: 00000000004af228 R14: 00000000000000c3 R15: 00000000000022b6 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program