[ 49.141752] audit: type=1800 audit(1546580414.275:29): pid=8215 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 [ 49.189779] audit: type=1800 audit(1546580414.275:30): pid=8215 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.97' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 257.639635] kauditd_printk_skb: 5 callbacks suppressed [ 257.639646] audit: type=1400 audit(1546580622.765:36): avc: denied { map } for pid=8401 comm="syz-executor443" path="/root/syz-executor443268004" 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 [ 257.672977] audit: type=1400 audit(1546580622.805:37): avc: denied { map } for pid=8402 comm="syz-executor443" path="/dev/ashmem" dev="devtmpfs" ino=16032 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 [ 257.972157] [ 257.973919] ====================================================== [ 257.980212] WARNING: possible circular locking dependency detected [ 257.986509] 4.20.0+ #8 Not tainted [ 257.990083] ------------------------------------------------------ [ 257.996389] syz-executor443/8412 is trying to acquire lock: [ 258.002074] 0000000005839313 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 258.009859] [ 258.009859] but task is already holding lock: [ 258.015805] 0000000015ef38be (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 258.025411] [ 258.025411] which lock already depends on the new lock. [ 258.025411] [ 258.033700] [ 258.033700] the existing dependency chain (in reverse order) is: [ 258.041292] [ 258.041292] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 258.048028] down_write+0x8a/0x130 [ 258.052155] shmem_fallocate+0x168/0x1200 [ 258.056824] ashmem_shrink_scan+0x239/0x630 [ 258.061645] ashmem_ioctl+0x38a/0x12c0 [ 258.066032] do_vfs_ioctl+0x107b/0x17d0 [ 258.070504] ksys_ioctl+0xab/0xd0 [ 258.074459] __x64_sys_ioctl+0x73/0xb0 [ 258.078850] do_syscall_64+0x1a3/0x800 [ 258.083238] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 258.088923] [ 258.088923] -> #1 (ashmem_mutex){+.+.}: [ 258.094670] __mutex_lock+0x12f/0x1670 [ 258.099060] mutex_lock_nested+0x16/0x20 [ 258.103619] ashmem_mmap+0x55/0x520 [ 258.107748] mmap_region+0xde5/0x1ca0 [ 258.112054] do_mmap+0xa09/0x1220 [ 258.116007] vm_mmap_pgoff+0x20b/0x2b0 [ 258.120409] ksys_mmap_pgoff+0x4f8/0x650 [ 258.124972] __x64_sys_mmap+0xe9/0x1b0 [ 258.129359] do_syscall_64+0x1a3/0x800 [ 258.133745] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 258.139431] [ 258.139431] -> #0 (&mm->mmap_sem){++++}: [ 258.144959] lock_acquire+0x1db/0x570 [ 258.149257] down_read+0x8d/0x120 [ 258.153213] __do_page_fault+0x9c2/0xd60 [ 258.157781] do_page_fault+0xe6/0x7d8 [ 258.162085] page_fault+0x1e/0x30 [ 258.166038] iov_iter_fault_in_readable+0x377/0x450 [ 258.171552] generic_perform_write+0x202/0x6b0 [ 258.176637] __generic_file_write_iter+0x25e/0x630 [ 258.182074] generic_file_write_iter+0x34e/0x6a0 [ 258.187330] __vfs_write+0x764/0xb40 [ 258.191541] vfs_write+0x20c/0x580 [ 258.195580] ksys_write+0x105/0x260 [ 258.199705] __x64_sys_write+0x73/0xb0 [ 258.204091] do_syscall_64+0x1a3/0x800 [ 258.208519] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 258.214211] [ 258.214211] other info that might help us debug this: [ 258.214211] [ 258.222373] Chain exists of: [ 258.222373] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 258.222373] [ 258.233993] Possible unsafe locking scenario: [ 258.233993] [ 258.240032] CPU0 CPU1 [ 258.244677] ---- ---- [ 258.249315] lock(&sb->s_type->i_mutex_key#12); [ 258.254050] lock(ashmem_mutex); [ 258.259998] lock(&sb->s_type->i_mutex_key#12); [ 258.267250] lock(&mm->mmap_sem); [ 258.270768] [ 258.270768] *** DEADLOCK *** [ 258.270768] [ 258.276811] 2 locks held by syz-executor443/8412: [ 258.281631] #0: 000000000a8c1094 (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 258.289246] #1: 0000000015ef38be (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 258.299347] [ 258.299347] stack backtrace: [ 258.303830] CPU: 1 PID: 8412 Comm: syz-executor443 Not tainted 4.20.0+ #8 [ 258.310742] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 258.320076] Call Trace: [ 258.322650] dump_stack+0x1db/0x2d0 [ 258.326259] ? dump_stack_print_info.cold+0x20/0x20 [ 258.331255] ? print_stack_trace+0x77/0xb0 [ 258.335470] ? vprintk_func+0x86/0x189 [ 258.339342] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 258.344725] __lock_acquire+0x3014/0x4a30 [ 258.348868] ? mark_held_locks+0x100/0x100 [ 258.353125] ? shmem_getpage_gfp+0x197e/0x4b70 [ 258.357701] ? trace_hardirqs_off_caller+0x300/0x300 [ 258.362784] ? do_raw_spin_trylock+0x270/0x270 [ 258.367356] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 258.371918] ? __lock_is_held+0xb6/0x140 [ 258.375960] lock_acquire+0x1db/0x570 [ 258.379743] ? __do_page_fault+0x9c2/0xd60 [ 258.383958] ? ___might_sleep+0x1e7/0x310 [ 258.388084] ? lock_release+0xc40/0xc40 [ 258.392039] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 258.397033] ? cmp_ex_search+0x8c/0xb0 [ 258.400901] down_read+0x8d/0x120 [ 258.404333] ? __do_page_fault+0x9c2/0xd60 [ 258.408546] ? __down_interruptible+0x740/0x740 [ 258.413193] ? do_writepages+0x1a0/0x1a0 [ 258.417230] ? set_page_dirty+0x5dd/0xfc0 [ 258.421358] __do_page_fault+0x9c2/0xd60 [ 258.425409] do_page_fault+0xe6/0x7d8 [ 258.429193] ? unlock_page+0x2b1/0x4a0 [ 258.433060] ? vmalloc_sync_all+0x30/0x30 [ 258.437191] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 258.442884] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 258.447709] page_fault+0x1e/0x30 [ 258.451144] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 258.456920] Code: 89 f6 41 88 57 e0 e8 f8 d7 f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 69 d6 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 c5 d7 f3 fd 85 db [ 258.475816] RSP: 0018:ffff88809b1a78a8 EFLAGS: 00010293 [ 258.481179] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e3ec3f [ 258.488432] RDX: 0000000000000000 RSI: ffffffff838e1ee7 RDI: 0000000000000007 [ 258.495689] RBP: ffff88809b1a7948 R08: ffff88807ee1a1c0 R09: fffff940003ed317 [ 258.502939] R10: fffff940003ed316 R11: ffffea0001f698b7 R12: 0000000000001000 [ 258.510187] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88809b1a7920 [ 258.517456] ? iov_iter_fault_in_readable+0x367/0x450 [ 258.522642] ? iov_iter_fault_in_readable+0x367/0x450 [ 258.527908] ? copy_page_from_iter+0x900/0x900 [ 258.532478] ? shmem_write_begin+0x105/0x1e0 [ 258.536868] ? shmem_write_begin+0x10f/0x1e0 [ 258.541258] generic_perform_write+0x202/0x6b0 [ 258.545822] ? add_page_wait_queue+0x480/0x480 [ 258.550380] ? current_time+0x1b0/0x1b0 [ 258.554336] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 258.559339] ? generic_write_check_limits+0x291/0x380 [ 258.564510] __generic_file_write_iter+0x25e/0x630 [ 258.569420] ? __fget+0x499/0x710 [ 258.572854] generic_file_write_iter+0x34e/0x6a0 [ 258.577590] ? __generic_file_write_iter+0x630/0x630 [ 258.582675] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 258.588258] ? iov_iter_init+0xea/0x220 [ 258.592221] __vfs_write+0x764/0xb40 [ 258.595919] ? kernel_read+0x120/0x120 [ 258.599788] ? rcu_read_lock_sched_held+0x110/0x130 [ 258.604786] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 258.609538] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 258.615063] ? __sb_start_write+0x1ac/0x360 [ 258.619362] vfs_write+0x20c/0x580 [ 258.622885] ksys_write+0x105/0x260 [ 258.626495] ? __ia32_sys_read+0xb0/0xb0 [ 258.630535] ? do_futex+0x2910/0x2910 [ 258.634312] ? trace_hardirqs_off_caller+0x300/0x300 [ 258.639396] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 258.644130] __x64_sys_write+0x73/0xb0 [ 258.648002] do_syscall_64+0x1a3/0x800 [ 258.651874] ? syscall_return_slowpath+0x5f0/0x5f0 [ 258.656797] ? prepare_exit_to_usermode+0x232/0x3b0 [ 258.661800] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 258.666626] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 258.671798] RIP: 0033:0x446359 [ 258.674979] 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 [ 258.693859] RSP: 002b:00007f0a528a9da8 EFLAGS: 00000297 ORIG_RAX: 0000000000000001 [ 258.701550] RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000446359 [ 258.709006] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 258.716257] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 executing program [ 258.723504] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dac2c [ 258.730759] R13: 3ed592df9946286b R14: dfdd4f11168a8b2b R15: 00000000006dad2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program