[ 51.434681] audit: type=1800 audit(1561136605.799:29): pid=8386 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=2447 res=0 [ 51.474076] audit: type=1800 audit(1561136605.799:30): pid=8386 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 Warning: Permanently added '10.128.0.67' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 60.922980] kauditd_printk_skb: 5 callbacks suppressed [ 60.922998] audit: type=1400 audit(1561136615.279:36): avc: denied { map } for pid=8574 comm="syz-executor195" path="/root/syz-executor195977418" 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 [ 66.005625] [ 66.007491] ======================================================== [ 66.013979] WARNING: possible irq lock inversion dependency detected [ 66.020570] 4.19.53+ #25 Not tainted [ 66.024367] -------------------------------------------------------- [ 66.030855] syz-executor195/8575 just changed the state of lock: [ 66.036994] 0000000080a8535d (&ctx->fault_pending_wqh){+.+.}, at: userfaultfd_release+0x4d6/0x720 [ 66.046064] but this lock was taken by another, SOFTIRQ-safe lock in the past: [ 66.053531] (&(&ctx->ctx_lock)->rlock){..-.} [ 66.053542] [ 66.053542] [ 66.053542] and interrupts could create inverse lock ordering between them. [ 66.053542] [ 66.069922] [ 66.069922] other info that might help us debug this: [ 66.076845] Chain exists of: [ 66.076845] &(&ctx->ctx_lock)->rlock --> &ctx->fd_wqh --> &ctx->fault_pending_wqh [ 66.076845] [ 66.089002] Possible interrupt unsafe locking scenario: [ 66.089002] [ 66.095927] CPU0 CPU1 [ 66.100588] ---- ---- [ 66.105295] lock(&ctx->fault_pending_wqh); [ 66.109712] local_irq_disable(); [ 66.115882] lock(&(&ctx->ctx_lock)->rlock); [ 66.122888] lock(&ctx->fd_wqh); [ 66.128949] [ 66.131729] lock(&(&ctx->ctx_lock)->rlock); [ 66.136389] [ 66.136389] *** DEADLOCK *** [ 66.136389] [ 66.142769] no locks held by syz-executor195/8575. [ 66.148028] [ 66.148028] the shortest dependencies between 2nd lock and 1st lock: [ 66.156622] -> (&(&ctx->ctx_lock)->rlock){..-.} ops: 2 { [ 66.162517] IN-SOFTIRQ-W at: [ 66.166218] lock_acquire+0x16f/0x3f0 [ 66.172332] _raw_spin_lock_irq+0x60/0x80 [ 66.178486] free_ioctx_users+0x2d/0x490 [ 66.184736] percpu_ref_switch_to_atomic_rcu+0x407/0x540 [ 66.192291] rcu_process_callbacks+0xba0/0x1a30 [ 66.198970] __do_softirq+0x25c/0x921 [ 66.205292] irq_exit+0x180/0x1d0 [ 66.211021] smp_apic_timer_interrupt+0x13b/0x550 [ 66.218468] apic_timer_interrupt+0xf/0x20 [ 66.224918] native_safe_halt+0xe/0x10 [ 66.230818] arch_cpu_idle+0xa/0x10 [ 66.237338] default_idle_call+0x36/0x90 [ 66.243414] do_idle+0x377/0x560 [ 66.249236] cpu_startup_entry+0xc8/0xe0 [ 66.255296] start_secondary+0x3e8/0x5b0 [ 66.261510] secondary_startup_64+0xa4/0xb0 [ 66.268230] INITIAL USE at: [ 66.271628] lock_acquire+0x16f/0x3f0 [ 66.278534] _raw_spin_lock_irq+0x60/0x80 [ 66.284779] io_submit_one+0xead/0x2eb0 [ 66.290845] __x64_sys_io_submit+0x1aa/0x520 [ 66.297434] do_syscall_64+0xfd/0x620 [ 66.303518] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.310806] } [ 66.313002] ... key at: [] __key.50193+0x0/0x40 [ 66.321526] ... acquired at: [ 66.330327] _raw_spin_lock+0x2f/0x40 [ 66.335326] io_submit_one+0xef2/0x2eb0 [ 66.340646] __x64_sys_io_submit+0x1aa/0x520 [ 66.345451] do_syscall_64+0xfd/0x620 [ 66.349665] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.355015] [ 66.357386] -> (&ctx->fd_wqh){....} ops: 4 { [ 66.362141] INITIAL USE at: [ 66.365880] lock_acquire+0x16f/0x3f0 [ 66.372378] _raw_spin_lock_irqsave+0x95/0xcd [ 66.378605] add_wait_queue+0x4c/0x170 [ 66.384342] aio_poll_queue_proc+0x9e/0x110 [ 66.390640] userfaultfd_poll+0x91/0x210 [ 66.396535] io_submit_one+0xe4b/0x2eb0 [ 66.402603] __x64_sys_io_submit+0x1aa/0x520 [ 66.409338] do_syscall_64+0xfd/0x620 [ 66.415609] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.423067] } [ 66.425572] ... key at: [] __key.43730+0x0/0x40 [ 66.433029] ... acquired at: [ 66.436281] _raw_spin_lock+0x2f/0x40 [ 66.440911] userfaultfd_read+0x394/0x18c0 [ 66.445323] __vfs_read+0x114/0x800 [ 66.449140] vfs_read+0x194/0x3d0 [ 66.452891] ksys_read+0x14f/0x2d0 [ 66.456895] __x64_sys_read+0x73/0xb0 [ 66.460969] do_syscall_64+0xfd/0x620 [ 66.464995] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.471416] [ 66.473042] -> (&ctx->fault_pending_wqh){+.+.} ops: 3 { [ 66.479257] HARDIRQ-ON-W at: [ 66.482889] lock_acquire+0x16f/0x3f0 [ 66.488446] _raw_spin_lock+0x2f/0x40 [ 66.502475] userfaultfd_release+0x4d6/0x720 [ 66.508842] __fput+0x2dd/0x8b0 [ 66.513994] ____fput+0x16/0x20 [ 66.519067] task_work_run+0x145/0x1c0 [ 66.525055] do_exit+0x933/0x2fa0 [ 66.535124] do_group_exit+0x135/0x370 [ 66.541680] get_signal+0x3ec/0x1fc0 [ 66.547411] do_signal+0x95/0x1960 [ 66.554498] exit_to_usermode_loop+0x244/0x2c0 [ 66.561433] do_syscall_64+0x53d/0x620 [ 66.568876] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.578341] SOFTIRQ-ON-W at: [ 66.582011] lock_acquire+0x16f/0x3f0 [ 66.588142] _raw_spin_lock+0x2f/0x40 [ 66.594608] userfaultfd_release+0x4d6/0x720 [ 66.601936] __fput+0x2dd/0x8b0 [ 66.608495] ____fput+0x16/0x20 [ 66.615213] task_work_run+0x145/0x1c0 [ 66.620943] do_exit+0x933/0x2fa0 [ 66.626827] do_group_exit+0x135/0x370 [ 66.632927] get_signal+0x3ec/0x1fc0 [ 66.638503] do_signal+0x95/0x1960 [ 66.644256] exit_to_usermode_loop+0x244/0x2c0 [ 66.651132] do_syscall_64+0x53d/0x620 [ 66.656910] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.664503] INITIAL USE at: [ 66.667892] lock_acquire+0x16f/0x3f0 [ 66.673527] _raw_spin_lock+0x2f/0x40 [ 66.679455] userfaultfd_read+0x394/0x18c0 [ 66.685763] __vfs_read+0x114/0x800 [ 66.691102] vfs_read+0x194/0x3d0 [ 66.696218] ksys_read+0x14f/0x2d0 [ 66.701335] __x64_sys_read+0x73/0xb0 [ 66.707265] do_syscall_64+0xfd/0x620 [ 66.712898] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.719736] } [ 66.721628] ... key at: [] __key.43727+0x0/0x40 [ 66.729036] ... acquired at: [ 66.732744] mark_lock+0x420/0x1370 [ 66.736875] __lock_acquire+0x6b5/0x48f0 [ 66.741109] lock_acquire+0x16f/0x3f0 [ 66.745206] _raw_spin_lock+0x2f/0x40 [ 66.749453] userfaultfd_release+0x4d6/0x720 [ 66.754388] __fput+0x2dd/0x8b0 [ 66.757942] ____fput+0x16/0x20 [ 66.761416] task_work_run+0x145/0x1c0 [ 66.765613] do_exit+0x933/0x2fa0 [ 66.769232] do_group_exit+0x135/0x370 [ 66.773413] get_signal+0x3ec/0x1fc0 [ 66.777295] do_signal+0x95/0x1960 [ 66.781072] exit_to_usermode_loop+0x244/0x2c0 [ 66.785931] do_syscall_64+0x53d/0x620 [ 66.790169] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.795612] [ 66.797281] [ 66.797281] stack backtrace: [ 66.801833] CPU: 1 PID: 8575 Comm: syz-executor195 Not tainted 4.19.53+ #25 [ 66.809119] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 66.818670] Call Trace: [ 66.824418] dump_stack+0x172/0x1f0 [ 66.831192] print_irq_inversion_bug.part.0+0x2c0/0x2cd [ 66.837036] check_usage_backwards.cold+0x1d/0x26 [ 66.841980] ? print_shortest_lock_dependencies+0x90/0x90 [ 66.847682] ? save_stack_trace+0x1a/0x20 [ 66.851880] ? save_trace+0xe0/0x290 [ 66.855749] mark_lock+0x420/0x1370 [ 66.859380] ? print_shortest_lock_dependencies+0x90/0x90 [ 66.864920] __lock_acquire+0x6b5/0x48f0 [ 66.869282] ? depot_save_stack+0x1de/0x460 [ 66.873634] ? is_bpf_text_address+0xd3/0x170 [ 66.878262] ? mark_held_locks+0x100/0x100 [ 66.882608] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 66.887726] ? depot_save_stack+0x1de/0x460 [ 66.892235] ? __lock_acquire+0x6eb/0x48f0 [ 66.896471] ? __lock_acquire+0x6eb/0x48f0 [ 66.900702] ? free_fs_struct+0x4f/0x70 [ 66.904676] ? do_exit+0x902/0x2fa0 [ 66.908566] lock_acquire+0x16f/0x3f0 [ 66.912563] ? userfaultfd_release+0x4d6/0x720 [ 66.917256] _raw_spin_lock+0x2f/0x40 [ 66.921056] ? userfaultfd_release+0x4d6/0x720 [ 66.925645] userfaultfd_release+0x4d6/0x720 [ 66.930476] ? userfaultfd_ctx_get+0x1a0/0x1a0 [ 66.935060] ? ___might_sleep+0x163/0x280 [ 66.939218] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 66.944877] ? ima_file_free+0xc9/0x4a0 [ 66.948863] ? userfaultfd_ctx_get+0x1a0/0x1a0 [ 66.953620] __fput+0x2dd/0x8b0 [ 66.956908] ____fput+0x16/0x20 [ 66.960196] task_work_run+0x145/0x1c0 [ 66.964123] do_exit+0x933/0x2fa0 [ 66.967582] ? get_signal+0x384/0x1fc0 [ 66.971603] ? mm_update_next_owner+0x660/0x660 [ 66.978324] ? _raw_spin_unlock_irq+0x28/0x90 [ 66.983561] ? get_signal+0x384/0x1fc0 [ 66.987580] ? _raw_spin_unlock_irq+0x28/0x90 [ 66.992135] do_group_exit+0x135/0x370 [ 66.996079] get_signal+0x3ec/0x1fc0 [ 66.999895] ? file_has_perm+0x26d/0x390 [ 67.003975] ? userfaultfd_release+0x720/0x720 [ 67.008576] do_signal+0x95/0x1960 [ 67.012219] ? setup_sigcontext+0x7d0/0x7d0 [ 67.016660] ? security_file_permission+0x89/0x230 [ 67.021596] ? rw_verify_area+0x118/0x360 [ 67.025749] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 67.031298] ? vfs_read+0x15d/0x3d0 [ 67.035026] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 67.040844] ? ksys_read+0x1f1/0x2d0 [ 67.044662] ? exit_to_usermode_loop+0x43/0x2c0 [ 67.049628] ? do_syscall_64+0x53d/0x620 [ 67.053975] ? exit_to_usermode_loop+0x43/0x2c0 [ 67.058851] ? lockdep_hardirqs_on+0x415/0x5d0 [ 67.063474] ? trace_hardirqs_on+0x67/0x220 [ 67.067904] exit_to_usermode_loop+0x244/0x2c0 [ 67.072658] do_syscall_64+0x53d/0x620 [ 67.076606] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.081815] RIP: 0033:0x441299 [ 67.085124] Code: Bad RIP value. [ 67.088503] RSP: 002b:00007ffd8a8aaf48 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 67.096645] RAX: fffffffffffffe00 RBX: 0000000000000000 RCX: 0000000000441299 [ 67.103968] RDX: 0000000000000064 RSI: 0000000020009f9c RDI: 0000000000000005 executing program [ 67.111441] RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8 [ 67.119645] R10: 00000000004002c8 R11: 0000000000000246 R12: 00000000004020c0 [ 67.127050] R13: 0000000000402150 R14: 0000000000000000 R15: 0000000000000000 executing program