[ 37.936965] audit: type=1800 audit(1547467302.272:27): pid=7598 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 37.965560] audit: type=1800 audit(1547467302.272:28): pid=7598 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 38.881546] audit: type=1800 audit(1547467303.272:29): pid=7598 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 38.900114] audit: type=1800 audit(1547467303.272:30): pid=7598 uid=0 auid=4294967295 ses=4294967295 subj=_ 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.236' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.019627] [ 50.021280] ====================================================== [ 50.027576] WARNING: possible circular locking dependency detected [ 50.033869] 5.0.0-rc2 #25 Not tainted [ 50.037640] ------------------------------------------------------ [ 50.043955] syz-executor498/7752 is trying to acquire lock: [ 50.049640] 00000000ca085aac (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 50.057014] [ 50.057014] but task is already holding lock: [ 50.062962] 000000008dcdd83f (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 50.072304] [ 50.072304] which lock already depends on the new lock. [ 50.072304] [ 50.080607] [ 50.080607] the existing dependency chain (in reverse order) is: [ 50.088203] [ 50.088203] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 50.094705] __mutex_lock+0x12f/0x1670 [ 50.099094] mutex_lock_interruptible_nested+0x16/0x20 [ 50.104870] proc_pid_attr_write+0x1fa/0x530 [ 50.109788] __vfs_write+0x116/0xb40 [ 50.114008] __kernel_write+0x110/0x3b0 [ 50.118482] write_pipe_buf+0x180/0x240 [ 50.122958] __splice_from_pipe+0x39a/0x7e0 [ 50.127796] splice_from_pipe+0x1ea/0x310 [ 50.132454] default_file_splice_write+0x3c/0x90 [ 50.137706] do_splice+0x64b/0x1410 [ 50.141831] __x64_sys_splice+0x2c6/0x330 [ 50.146480] do_syscall_64+0x1a3/0x800 [ 50.150869] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.156554] [ 50.156554] -> #0 (&pipe->mutex/1){+.+.}: [ 50.162165] lock_acquire+0x1db/0x570 [ 50.166464] __mutex_lock+0x12f/0x1670 [ 50.170866] mutex_lock_nested+0x16/0x20 [ 50.175429] fifo_open+0x159/0xb00 [ 50.179471] do_dentry_open+0x48a/0x1210 [ 50.184029] vfs_open+0xa0/0xd0 [ 50.187807] path_openat+0x144f/0x5650 [ 50.192193] do_filp_open+0x26f/0x370 [ 50.196490] do_open_execat+0x20e/0x930 [ 50.200961] __do_execve_file.isra.0+0x1966/0x2700 [ 50.206389] __x64_sys_execve+0x8f/0xc0 [ 50.210865] do_syscall_64+0x1a3/0x800 [ 50.215253] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.220936] [ 50.220936] other info that might help us debug this: [ 50.220936] [ 50.229048] Possible unsafe locking scenario: [ 50.229048] [ 50.235077] CPU0 CPU1 [ 50.239719] ---- ---- [ 50.244358] lock(&sig->cred_guard_mutex); [ 50.248656] lock(&pipe->mutex/1); [ 50.254784] lock(&sig->cred_guard_mutex); [ 50.261613] lock(&pipe->mutex/1); [ 50.265215] [ 50.265215] *** DEADLOCK *** [ 50.265215] [ 50.271246] 1 lock held by syz-executor498/7752: [ 50.275974] #0: 000000008dcdd83f (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 50.285752] [ 50.285752] stack backtrace: [ 50.290230] CPU: 0 PID: 7752 Comm: syz-executor498 Not tainted 5.0.0-rc2 #25 [ 50.297387] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.306730] Call Trace: [ 50.309304] dump_stack+0x1db/0x2d0 [ 50.312907] ? dump_stack_print_info.cold+0x20/0x20 [ 50.317904] ? print_stack_trace+0x77/0xb0 [ 50.322134] ? vprintk_func+0x86/0x189 [ 50.326001] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 50.331343] __lock_acquire+0x3014/0x4a30 [ 50.335484] ? is_bpf_text_address+0xac/0x170 [ 50.339965] ? mark_held_locks+0x100/0x100 [ 50.344179] ? mark_held_locks+0xb1/0x100 [ 50.348310] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 50.353393] ? lockdep_hardirqs_on+0x415/0x5d0 [ 50.357954] ? trace_hardirqs_off_caller+0x300/0x300 [ 50.363034] ? do_raw_spin_trylock+0x270/0x270 [ 50.367603] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.372523] ? print_usage_bug+0xd0/0xd0 [ 50.376561] ? __lock_is_held+0xb6/0x140 [ 50.380604] lock_acquire+0x1db/0x570 [ 50.384381] ? fifo_open+0x159/0xb00 [ 50.388097] ? ___might_sleep+0x1e7/0x310 [ 50.392225] ? lock_release+0xc40/0xc40 [ 50.396194] ? fifo_open+0x159/0xb00 [ 50.399892] ? fifo_open+0x159/0xb00 [ 50.403582] __mutex_lock+0x12f/0x1670 [ 50.407447] ? fifo_open+0x159/0xb00 [ 50.411148] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 50.416663] ? fifo_open+0x159/0xb00 [ 50.420359] ? check_preemption_disabled+0x48/0x290 [ 50.425368] ? lockdep_init_map+0x10c/0x5b0 [ 50.429671] ? mutex_trylock+0x2d0/0x2d0 [ 50.433710] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.438616] ? __mutex_init+0x1f6/0x2a0 [ 50.442567] ? psi_task_change.cold+0x1ec/0x1ec [ 50.447214] ? fifo_open+0x2b5/0xb00 [ 50.450918] ? find_held_lock+0x35/0x120 [ 50.455690] ? fifo_open+0x2b5/0xb00 [ 50.459390] ? lock_acquire+0x1db/0x570 [ 50.463354] ? kasan_check_read+0x11/0x20 [ 50.467495] ? do_raw_spin_unlock+0xa0/0x330 [ 50.471889] ? do_raw_spin_trylock+0x270/0x270 [ 50.476449] mutex_lock_nested+0x16/0x20 [ 50.480488] ? _raw_spin_unlock+0x2d/0x50 [ 50.484621] ? mutex_lock_nested+0x16/0x20 [ 50.488836] fifo_open+0x159/0xb00 [ 50.492355] do_dentry_open+0x48a/0x1210 [ 50.496395] ? pipe_release+0x280/0x280 [ 50.500349] ? chown_common+0x740/0x740 [ 50.504305] ? security_inode_permission+0xd5/0x110 [ 50.509304] ? inode_permission+0xb4/0x570 [ 50.513528] vfs_open+0xa0/0xd0 [ 50.516786] path_openat+0x144f/0x5650 [ 50.520666] ? __lock_is_held+0xb6/0x140 [ 50.524713] ? path_lookupat.isra.0+0xba0/0xba0 [ 50.529361] ? __mutex_init+0x1f6/0x2a0 [ 50.533312] ? __lock_acquire+0x572/0x4a30 [ 50.537538] ? __do_execve_file.isra.0+0x47a/0x2700 [ 50.542547] ? __x64_sys_execve+0x8f/0xc0 [ 50.546672] ? do_syscall_64+0x1a3/0x800 [ 50.550714] do_filp_open+0x26f/0x370 [ 50.554491] ? may_open_dev+0x100/0x100 [ 50.558459] ? prepare_creds+0xa4/0x4e0 [ 50.562411] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.567318] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.572226] ? __do_execve_file.isra.0+0x901/0x2700 [ 50.577223] do_open_execat+0x20e/0x930 [ 50.581176] ? unregister_binfmt+0x2b0/0x2b0 [ 50.585574] ? kasan_check_read+0x11/0x20 [ 50.589720] ? do_raw_spin_trylock+0x270/0x270 [ 50.594285] ? __phys_addr_symbol+0x30/0x70 [ 50.598586] __do_execve_file.isra.0+0x1966/0x2700 [ 50.603505] ? copy_strings_kernel+0x110/0x110 [ 50.608077] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 50.613593] ? strncpy_from_user+0x3aa/0x4e0 [ 50.617981] ? digsig_verify.cold+0x32/0x32 [ 50.622282] ? kmem_cache_alloc+0x341/0x710 [ 50.626587] ? do_syscall_64+0x8c/0x800 [ 50.630553] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 50.636064] ? getname_flags+0x277/0x5b0 [ 50.640102] ? trace_hardirqs_off_caller+0x300/0x300 [ 50.645185] __x64_sys_execve+0x8f/0xc0 [ 50.649154] do_syscall_64+0x1a3/0x800 [ 50.653021] ? syscall_return_slowpath+0x5f0/0x5f0 [ 50.657931] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 50.662925] ? __switch_to_asm+0x34/0x70 [ 50.666963] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 50.671794] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.676965] RIP: 0033:0x445719 [ 50.680136] Code: e8 6c b6 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 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 50.699027] RSP: 002b:00007f9c8bfe1da8 EFLAGS: 00000246 ORIG_RAX: 000000000000003b [ 50.706714] RAX: ffffffffffffffda RBX: 00000000006dac58 RCX: 0000000000445719 [ 50.713962] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 [ 50.721207] RB