[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 29.234868] kauditd_printk_skb: 8 callbacks suppressed [ 29.234881] audit: type=1800 audit(1543362568.280:29): pid=5900 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 29.269593] audit: type=1800 audit(1543362568.280:30): pid=5900 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.100' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 63.827652] [ 63.829426] ===================================================== [ 63.835637] WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected [ 63.842366] 4.20.0-rc4+ #352 Not tainted [ 63.846420] ----------------------------------------------------- [ 63.852650] syz-executor155/6207 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 63.859991] 00000000807c203f (&ctx->fd_wqh){....}, at: aio_poll+0x760/0x1420 [ 63.867201] [ 63.867201] and this task is already holding: [ 63.873149] 0000000033a98fbc (&(&ctx->ctx_lock)->rlock){..-.}, at: aio_poll+0x738/0x1420 [ 63.881384] which would create a new lock dependency: [ 63.886547] (&(&ctx->ctx_lock)->rlock){..-.} -> (&ctx->fd_wqh){....} [ 63.893347] [ 63.893347] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 63.901457] (&(&ctx->ctx_lock)->rlock){..-.} [ 63.901463] [ 63.901463] ... which became SOFTIRQ-irq-safe at: [ 63.912465] lock_acquire+0x1ed/0x520 [ 63.916340] _raw_spin_lock_irq+0x61/0x80 [ 63.920639] free_ioctx_users+0xbc/0x710 [ 63.924883] percpu_ref_switch_to_atomic_rcu+0x563/0x730 [ 63.930404] rcu_process_callbacks+0x100a/0x1ac0 [ 63.935234] __do_softirq+0x308/0xb7e [ 63.939123] irq_exit+0x17f/0x1c0 [ 63.942725] smp_apic_timer_interrupt+0x1cb/0x760 [ 63.947643] apic_timer_interrupt+0xf/0x20 [ 63.951966] native_safe_halt+0x6/0x10 [ 63.955920] default_idle+0xbf/0x490 [ 63.959701] arch_cpu_idle+0x10/0x20 [ 63.963497] default_idle_call+0x6d/0x90 [ 63.967733] do_idle+0x49b/0x5c0 [ 63.971179] cpu_startup_entry+0x18/0x20 [ 63.975307] rest_init+0x243/0x372 [ 63.978914] arch_call_rest_init+0xe/0x1b [ 63.983209] start_kernel+0x9f0/0xa2b [ 63.987082] x86_64_start_reservations+0x2e/0x30 [ 63.991907] x86_64_start_kernel+0x76/0x79 [ 63.996210] secondary_startup_64+0xa4/0xb0 [ 64.000589] [ 64.000589] to a SOFTIRQ-irq-unsafe lock: [ 64.006213] (&ctx->fault_pending_wqh){+.+.} [ 64.006219] [ 64.006219] ... which became SOFTIRQ-irq-unsafe at: [ 64.017068] ... [ 64.017077] lock_acquire+0x1ed/0x520 [ 64.022902] _raw_spin_lock+0x2d/0x40 [ 64.026786] userfaultfd_release+0x63e/0x8d0 [ 64.031374] __fput+0x385/0xa30 [ 64.034735] ____fput+0x15/0x20 [ 64.038080] task_work_run+0x1e8/0x2a0 [ 64.042031] get_signal+0x1558/0x1980 [ 64.045894] do_signal+0x9c/0x21c0 [ 64.049518] exit_to_usermode_loop+0x2e5/0x380 [ 64.054167] do_syscall_64+0x6be/0x820 [ 64.058121] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.063523] [ 64.063523] other info that might help us debug this: [ 64.063523] [ 64.071658] Chain exists of: [ 64.071658] &(&ctx->ctx_lock)->rlock --> &ctx->fd_wqh --> &ctx->fault_pending_wqh [ 64.071658] [ 64.083990] Possible interrupt unsafe locking scenario: [ 64.083990] [ 64.090889] CPU0 CPU1 [ 64.095659] ---- ---- [ 64.100404] lock(&ctx->fault_pending_wqh); [ 64.104788] local_irq_disable(); [ 64.110854] lock(&(&ctx->ctx_lock)->rlock); [ 64.117864] lock(&ctx->fd_wqh); [ 64.123815] [ 64.126578] lock(&(&ctx->ctx_lock)->rlock); [ 64.131222] [ 64.131222] *** DEADLOCK *** [ 64.131222] [ 64.137471] 1 lock held by syz-executor155/6207: [ 64.142224] #0: 0000000033a98fbc (&(&ctx->ctx_lock)->rlock){..-.}, at: aio_poll+0x738/0x1420 [ 64.150874] [ 64.150874] the dependencies between SOFTIRQ-irq-safe lock and the holding lock: [ 64.159864] -> (&(&ctx->ctx_lock)->rlock){..-.} { [ 64.164681] IN-SOFTIRQ-W at: [ 64.167941] lock_acquire+0x1ed/0x520 [ 64.173399] _raw_spin_lock_irq+0x61/0x80 [ 64.179352] free_ioctx_users+0xbc/0x710 [ 64.185089] percpu_ref_switch_to_atomic_rcu+0x563/0x730 [ 64.192203] rcu_process_callbacks+0x100a/0x1ac0 [ 64.198672] __do_softirq+0x308/0xb7e [ 64.204218] irq_exit+0x17f/0x1c0 [ 64.209357] smp_apic_timer_interrupt+0x1cb/0x760 [ 64.215843] apic_timer_interrupt+0xf/0x20 [ 64.221823] native_safe_halt+0x6/0x10 [ 64.227338] default_idle+0xbf/0x490 [ 64.232680] arch_cpu_idle+0x10/0x20 [ 64.238124] default_idle_call+0x6d/0x90 [ 64.243818] do_idle+0x49b/0x5c0 [ 64.248846] cpu_startup_entry+0x18/0x20 [ 64.254745] rest_init+0x243/0x372 [ 64.259917] arch_call_rest_init+0xe/0x1b [ 64.265803] start_kernel+0x9f0/0xa2b [ 64.271339] x86_64_start_reservations+0x2e/0x30 [ 64.277724] x86_64_start_kernel+0x76/0x79 [ 64.283598] secondary_startup_64+0xa4/0xb0 [ 64.289539] INITIAL USE at: [ 64.292712] lock_acquire+0x1ed/0x520 [ 64.298053] _raw_spin_lock_irq+0x61/0x80 [ 64.303756] free_ioctx_users+0xbc/0x710 [ 64.309353] percpu_ref_switch_to_atomic_rcu+0x563/0x730 [ 64.316339] rcu_process_callbacks+0x100a/0x1ac0 [ 64.322631] __do_softirq+0x308/0xb7e [ 64.327967] irq_exit+0x17f/0x1c0 [ 64.332958] smp_apic_timer_interrupt+0x1cb/0x760 [ 64.339345] apic_timer_interrupt+0xf/0x20 [ 64.345135] native_safe_halt+0x6/0x10 [ 64.350601] default_idle+0xbf/0x490 [ 64.355957] arch_cpu_idle+0x10/0x20 [ 64.361270] default_idle_call+0x6d/0x90 [ 64.366877] do_idle+0x49b/0x5c0 [ 64.371813] cpu_startup_entry+0x18/0x20 [ 64.377560] rest_init+0x243/0x372 [ 64.382648] arch_call_rest_init+0xe/0x1b [ 64.388371] start_kernel+0x9f0/0xa2b [ 64.393738] x86_64_start_reservations+0x2e/0x30 [ 64.400050] x86_64_start_kernel+0x76/0x79 [ 64.405856] secondary_startup_64+0xa4/0xb0 [ 64.411842] } [ 64.413636] ... key at: [] __key.51037+0x0/0x40 [ 64.420384] ... acquired at: [ 64.423468] lock_acquire+0x1ed/0x520 [ 64.427422] _raw_spin_lock+0x2d/0x40 [ 64.431372] aio_poll+0x760/0x1420 [ 64.435154] io_submit_one+0xa49/0xf80 [ 64.439236] __x64_sys_io_submit+0x1b7/0x580 [ 64.443823] do_syscall_64+0x1b9/0x820 [ 64.447929] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.453272] [ 64.454874] [ 64.454874] the dependencies between the lock to be acquired [ 64.454877] and SOFTIRQ-irq-unsafe lock: [ 64.466400] -> (&ctx->fault_pending_wqh){+.+.} { [ 64.471225] HARDIRQ-ON-W at: [ 64.474588] lock_acquire+0x1ed/0x520 [ 64.480189] _raw_spin_lock+0x2d/0x40 [ 64.485799] userfaultfd_release+0x63e/0x8d0 [ 64.492040] __fput+0x385/0xa30 [ 64.497204] ____fput+0x15/0x20 [ 64.502335] task_work_run+0x1e8/0x2a0 [ 64.508026] get_signal+0x1558/0x1980 [ 64.513875] do_signal+0x9c/0x21c0 [ 64.519228] exit_to_usermode_loop+0x2e5/0x380 [ 64.525632] do_syscall_64+0x6be/0x820 [ 64.531322] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.538305] SOFTIRQ-ON-W at: [ 64.541655] lock_acquire+0x1ed/0x520 [ 64.547261] _raw_spin_lock+0x2d/0x40 [ 64.552883] userfaultfd_release+0x63e/0x8d0 [ 64.559099] __fput+0x385/0xa30 [ 64.564178] ____fput+0x15/0x20 [ 64.569257] task_work_run+0x1e8/0x2a0 [ 64.574945] get_signal+0x1558/0x1980 [ 64.580547] do_signal+0x9c/0x21c0 [ 64.585890] exit_to_usermode_loop+0x2e5/0x380 [ 64.592401] do_syscall_64+0x6be/0x820 [ 64.598103] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.605107] INITIAL USE at: [ 64.608370] lock_acquire+0x1ed/0x520 [ 64.613885] _raw_spin_lock+0x2d/0x40 [ 64.619423] userfaultfd_ctx_read+0x4f3/0x2180 [ 64.625737] userfaultfd_read+0x1e2/0x2c0 [ 64.631769] __vfs_read+0x117/0x9b0 [ 64.637124] vfs_read+0x17f/0x3c0 [ 64.642300] ksys_read+0x101/0x260 [ 64.647566] __x64_sys_read+0x73/0xb0 [ 64.653104] do_syscall_64+0x1b9/0x820 [ 64.658743] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.665647] } [ 64.667527] ... key at: [] __key.44641+0x0/0x40 [ 64.674342] ... acquired at: [ 64.677523] _raw_spin_lock+0x2d/0x40 [ 64.681477] userfaultfd_ctx_read+0x4f3/0x2180 [ 64.686378] userfaultfd_read+0x1e2/0x2c0 [ 64.690686] __vfs_read+0x117/0x9b0 [ 64.694468] vfs_read+0x17f/0x3c0 [ 64.698072] ksys_read+0x101/0x260 [ 64.701771] __x64_sys_read+0x73/0xb0 [ 64.705728] do_syscall_64+0x1b9/0x820 [ 64.709774] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.715108] [ 64.716716] -> (&ctx->fd_wqh){....} { [ 64.720496] INITIAL USE at: [ 64.723678] lock_acquire+0x1ed/0x520 [ 64.729030] _raw_spin_lock_irq+0x61/0x80 [ 64.734724] userfaultfd_ctx_read+0x2e4/0x2180 [ 64.740852] userfaultfd_read+0x1e2/0x2c0 [ 64.746544] __vfs_read+0x117/0x9b0 [ 64.751724] vfs_read+0x17f/0x3c0 [ 64.756723] ksys_read+0x101/0x260 [ 64.761804] __x64_sys_read+0x73/0xb0 [ 64.767155] do_syscall_64+0x1b9/0x820 [ 64.772625] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.779356] } [ 64.781143] ... key at: [] __key.44644+0x0/0x40 [ 64.787867] ... acquired at: [ 64.790956] lock_acquire+0x1ed/0x520 [ 64.794917] _raw_spin_lock+0x2d/0x40 [ 64.798871] aio_poll+0x760/0x1420 [ 64.802565] io_submit_one+0xa49/0xf80 [ 64.806606] __x64_sys_io_submit+0x1b7/0x580 [ 64.811167] do_syscall_64+0x1b9/0x820 [ 64.815205] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 64.820542] [ 64.822221] [ 64.822221] stack backtrace: [ 64.826715] CPU: 0 PID: 6207 Comm: syz-executor155 Not tainted 4.20.0-rc4+ #352 [ 64.834140] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 64.843472] Call Trace: [ 64.846099] dump_stack+0x244/0x39d [ 64.849718] ? dump_stack_print_info.cold.1+0x20/0x20 [ 64.854910] ? print_shortest_lock_dependencies.cold.55+0x18e/0x211 [ 64.861305] ? vprintk_func+0x85/0x181 [ 64.865176] check_usage.cold.58+0x6d5/0xad1 [ 64.869567] ? check_usage_forwards+0x3d0/0x3d0 [ 64.874218] ? __lock_acquire+0x62f/0x4c20 [ 64.878435] ? __schedule+0x8d7/0x21d0 [ 64.882300] ? lockdep_on+0x50/0x50 [ 64.885910] ? mark_held_locks+0x130/0x130 [ 64.890229] ? __lock_acquire+0x62f/0x4c20 [ 64.894460] ? trace_event_raw_event_lock_acquire+0x440/0x440 [ 64.900324] __lock_acquire+0x238a/0x4c20 [ 64.904453] ? __lock_acquire+0x238a/0x4c20 [ 64.908757] ? mark_held_locks+0x130/0x130 [ 64.912970] ? zap_class+0x640/0x640 [ 64.916667] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 64.921752] ? find_held_lock+0x36/0x1c0 [ 64.925796] ? add_wait_queue+0x1b9/0x2b0 [ 64.929931] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 64.935013] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 64.940094] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 64.944659] ? trace_hardirqs_on+0xbd/0x310 [ 64.949008] ? kasan_check_read+0x11/0x20 [ 64.953145] ? trace_hardirqs_off_caller+0x310/0x310 [ 64.958230] ? rcu_softirq_qs+0x20/0x20 [ 64.962185] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 64.967269] ? add_wait_queue+0x1b9/0x2b0 [ 64.971397] ? __wake_up_locked_key_bookmark+0x20/0x20 [ 64.976655] lock_acquire+0x1ed/0x520 [ 64.980434] ? aio_poll+0x760/0x1420 [ 64.984131] ? lock_release+0xa00/0xa00 [ 64.988088] ? kasan_check_read+0x11/0x20 [ 64.992213] ? do_raw_spin_lock+0x14f/0x350 [ 64.996513] ? __ia32_sys_eventfd+0x40/0x40 [ 65.000818] ? rwlock_bug.part.2+0x90/0x90 [ 65.005036] ? trace_hardirqs_on+0x310/0x310 [ 65.009425] ? __save_stack_trace+0x8d/0xf0 [ 65.013729] _raw_spin_lock+0x2d/0x40 [ 65.017510] ? aio_poll+0x760/0x1420 [ 65.021207] aio_poll+0x760/0x1420 [ 65.024732] ? free_ioctx_users+0x710/0x710 [ 65.029037] ? kmem_cache_alloc+0x12e/0x730 [ 65.033334] ? aio_setup_rw+0x170/0x170 [ 65.037290] ? zap_class+0x640/0x640 [ 65.040981] ? mark_held_locks+0x130/0x130 [ 65.045196] ? zap_class+0x640/0x640 [ 65.048888] ? find_held_lock+0x36/0x1c0 [ 65.052927] ? find_held_lock+0x36/0x1c0 [ 65.056977] ? __might_fault+0x12b/0x1e0 [ 65.061035] ? lock_downgrade+0x900/0x900 [ 65.065175] ? lock_release+0xa00/0xa00 [ 65.069134] ? perf_trace_sched_process_exec+0x860/0x860 [ 65.074570] ? kasan_check_read+0x11/0x20 [ 65.078697] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 65.083960] io_submit_one+0xa49/0xf80 [ 65.087835] ? io_submit_one+0xa49/0xf80 [ 65.091875] ? aio_poll+0x1420/0x1420 [ 65.095660] ? __might_fault+0x12b/0x1e0 [ 65.099701] ? lock_downgrade+0x900/0x900 [ 65.103836] ? perf_trace_sched_process_exec+0x860/0x860 [ 65.109266] ? lock_release+0xa00/0xa00 [ 65.113218] ? perf_trace_sched_process_exec+0x860/0x860 [ 65.118651] __x64_sys_io_submit+0x1b7/0x580 [ 65.123039] ? __ia32_sys_io_destroy+0x580/0x580 [ 65.127797] ? trace_hardirqs_on+0xbd/0x310 [ 65.132110] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 65.137457] ? trace_hardirqs_off_caller+0x310/0x310 [ 65.142546] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 65.148061] ? ksys_ioctl+0x81/0xd0 [ 65.151671] do_syscall_64+0x1b9/0x820 [ 65.155538] ? __ia32_sys_io_destroy+0x580/0x580 [ 65.160272] ? do_syscall_64+0x1b9/0x820 [ 65.164324] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 65.169670] ? syscall_return_slowpath+0x5e0/0x5e0 [ 65.174588] ? trace_hardirqs_on_caller+0x310/0x310 [ 65.179596] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 65.184613] ? post_copy_siginfo_from_user.isra.25.part.26+0x250/0x250 [ 65.191257] ? __switch_to_asm+0x40/0x70 [ 65.195298] ? __switch_to_asm+0x34/0x70 [ 65.199341] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 65.204171] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 65.209346] RIP: 0033:0x4464b9 [ 65.212531] 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 [ 65.231486] RSP: 002b:00007f23dd540da8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d1 [ 65.239181] RAX: ffffffffffffffda RBX: 00000000006dbc58 RCX: 00000000004464b9 [ 65.246431] RDX: 0000000020000b00 RSI: 0000000000000001 RDI: 00007f23dd542000 [ 65.253685] RBP: 00000000006dbc50 R08: 0000000000000000 R09: 0000000000000000 [ 65.260939] R10: 0000000000000000 R11: 0000000000000293 R12: 00000000006dbc5c [ 65.268188] R13: 30646d2f7665642f R14: 00007f23dd5419c0 R15: 00000000006dbd4c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program