[ 42.631121] audit: type=1800 audit(1556227523.628:30): pid=7701 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=2490 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] 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 syzkaller login: [ 48.182660] kauditd_printk_skb: 4 callbacks suppressed [ 48.182676] audit: type=1400 audit(1556227529.218:35): avc: denied { map } for pid=7873 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 Warning: Permanently added '10.128.10.21' (ECDSA) to the list of known hosts. executing program [ 54.870359] audit: type=1400 audit(1556227535.908:36): avc: denied { map } for pid=7885 comm="syz-executor142" path="/root/syz-executor142574044" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 54.898730] audit: type=1400 audit(1556227535.938:37): avc: denied { map } for pid=7885 comm="syz-executor142" path="/dev/usbmon0" dev="devtmpfs" ino=15181 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usbmon_device_t:s0 tclass=chr_file permissive=1 [ 54.902785] [ 54.926930] ====================================================== [ 54.933567] WARNING: possible circular locking dependency detected [ 54.940033] 4.19.36 #4 Not tainted [ 54.943557] ------------------------------------------------------ [ 54.949991] syz-executor142/7886 is trying to acquire lock: [ 54.956107] 00000000ffd3bf0e (&mm->mmap_sem){++++}, at: __might_fault+0xfb/0x1e0 [ 54.963650] [ 54.963650] but task is already holding lock: [ 54.969693] 000000005c4f3497 (&rp->fetch_lock){+.+.}, at: mon_bin_read+0x60/0x640 [ 54.977368] [ 54.977368] which lock already depends on the new lock. [ 54.977368] [ 54.985825] [ 54.985825] the existing dependency chain (in reverse order) is: [ 54.993670] [ 54.993670] -> #1 (&rp->fetch_lock){+.+.}: [ 54.999471] __mutex_lock+0xf7/0x1300 [ 55.003802] mutex_lock_nested+0x16/0x20 [ 55.008432] mon_bin_vma_fault+0x73/0x2d0 [ 55.013094] __do_fault+0x116/0x480 [ 55.017411] __handle_mm_fault+0xf72/0x3f80 [ 55.022250] handle_mm_fault+0x43f/0xb30 [ 55.026821] __get_user_pages+0x609/0x1770 [ 55.031669] populate_vma_page_range+0x20d/0x2a0 [ 55.036975] __mm_populate+0x204/0x380 [ 55.041554] vm_mmap_pgoff+0x213/0x230 [ 55.046072] ksys_mmap_pgoff+0x4aa/0x630 [ 55.050670] __x64_sys_mmap+0xe9/0x1b0 [ 55.055154] do_syscall_64+0x103/0x610 [ 55.059718] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.065558] [ 55.065558] -> #0 (&mm->mmap_sem){++++}: [ 55.071101] lock_acquire+0x16f/0x3f0 [ 55.075508] __might_fault+0x15e/0x1e0 [ 55.079925] _copy_to_user+0x30/0x120 [ 55.084254] mon_bin_read+0x329/0x640 [ 55.088575] __vfs_read+0x116/0x800 [ 55.092825] vfs_read+0x194/0x3d0 [ 55.096884] ksys_read+0xea/0x1f0 [ 55.101101] __x64_sys_read+0x73/0xb0 [ 55.105473] do_syscall_64+0x103/0x610 [ 55.109935] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.115639] [ 55.115639] other info that might help us debug this: [ 55.115639] [ 55.123856] Possible unsafe locking scenario: [ 55.123856] [ 55.129989] CPU0 CPU1 [ 55.134644] ---- ---- [ 55.139290] lock(&rp->fetch_lock); [ 55.142994] lock(&mm->mmap_sem); [ 55.149184] lock(&rp->fetch_lock); [ 55.155553] lock(&mm->mmap_sem); [ 55.159227] [ 55.159227] *** DEADLOCK *** [ 55.159227] [ 55.165323] 1 lock held by syz-executor142/7886: [ 55.170066] #0: 000000005c4f3497 (&rp->fetch_lock){+.+.}, at: mon_bin_read+0x60/0x640 [ 55.178135] [ 55.178135] stack backtrace: [ 55.182634] CPU: 0 PID: 7886 Comm: syz-executor142 Not tainted 4.19.36 #4 [ 55.189542] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.199278] Call Trace: [ 55.201874] dump_stack+0x172/0x1f0 [ 55.205499] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 55.210988] __lock_acquire+0x2e6d/0x48f0 [ 55.215149] ? mark_held_locks+0xb1/0x100 [ 55.219687] ? mark_held_locks+0x100/0x100 [ 55.224067] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 55.229226] lock_acquire+0x16f/0x3f0 [ 55.233115] ? __might_fault+0xfb/0x1e0 [ 55.237083] __might_fault+0x15e/0x1e0 [ 55.240967] ? __might_fault+0xfb/0x1e0 [ 55.244950] _copy_to_user+0x30/0x120 [ 55.248753] mon_bin_read+0x329/0x640 [ 55.252550] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 55.258207] __vfs_read+0x116/0x800 [ 55.261920] ? copy_from_buf.isra.0+0x1c0/0x1c0 [ 55.266809] ? vfs_copy_file_range+0xba0/0xba0 [ 55.271391] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 55.277225] ? __inode_security_revalidate+0xda/0x120 [ 55.282463] ? avc_policy_seqno+0xd/0x70 [ 55.286523] ? __sanitizer_cov_trace_cmp4+0x16/0x20 [ 55.291715] ? security_file_permission+0x1ce/0x230 [ 55.296988] ? security_file_permission+0x8f/0x230 [ 55.301920] ? rw_verify_area+0x118/0x360 [ 55.306166] vfs_read+0x194/0x3d0 [ 55.309759] ksys_read+0xea/0x1f0 [ 55.313343] ? kernel_write+0x120/0x120 [ 55.317324] ? do_syscall_64+0x26/0x610 [ 55.321540] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.327031] ? do_syscall_64+0x26/0x610 [ 55.331250] __x64_sys_read+0x73/0xb0 [ 55.335046] do_syscall_64+0x103/0x610 [ 55.338930] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.344367] RIP: 0033:0x449739 [ 55.347549] Code: e8 ec 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 ab d6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 [ 55.366593] RSP: 002b:00007f4ddce14ce8 EFLAGS: 00000246 ORIG_