[ 32.767966] audit: type=1800 audit(1546907835.489:27): pid=7306 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 32.791394] audit: type=1800 audit(1546907835.499:28): pid=7306 uid=0 auid=4294967295 ses=4294967295 subj==unconfined 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. [ 33.540588] audit: type=1800 audit(1546907836.319:29): pid=7306 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 [ 33.564898] audit: type=1800 audit(1546907836.329:30): pid=7306 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.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 44.393065] [ 44.394706] ====================================================== [ 44.400996] WARNING: possible circular locking dependency detected [ 44.407286] 5.0.0-rc1+ #14 Not tainted [ 44.411145] ------------------------------------------------------ [ 44.417436] syz-executor767/7460 is trying to acquire lock: [ 44.423118] 00000000b418dfde (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 44.430551] [ 44.430551] but task is already holding lock: [ 44.436491] 00000000891a0a98 (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 44.445830] [ 44.445830] which lock already depends on the new lock. [ 44.445830] [ 44.454118] [ 44.454118] the existing dependency chain (in reverse order) is: [ 44.461708] [ 44.461708] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 44.468008] __mutex_lock+0x12f/0x1670 [ 44.472392] mutex_lock_interruptible_nested+0x16/0x20 [ 44.478168] proc_pid_attr_write+0x1fa/0x530 [ 44.483073] __vfs_write+0x116/0xb40 [ 44.487299] __kernel_write+0x110/0x3b0 [ 44.491768] write_pipe_buf+0x180/0x240 [ 44.496251] __splice_from_pipe+0x39a/0x7e0 [ 44.501066] splice_from_pipe+0x1ea/0x310 [ 44.505708] default_file_splice_write+0x3c/0x90 [ 44.510969] do_splice+0x64b/0x1410 [ 44.515093] __ia32_sys_splice+0x2c4/0x330 [ 44.519829] do_fast_syscall_32+0x333/0xf98 [ 44.524644] entry_SYSENTER_compat+0x70/0x7f [ 44.529540] [ 44.529540] -> #0 (&pipe->mutex/1){+.+.}: [ 44.535151] lock_acquire+0x1db/0x570 [ 44.539458] __mutex_lock+0x12f/0x1670 [ 44.543853] mutex_lock_nested+0x16/0x20 [ 44.548412] fifo_open+0x159/0xb00 [ 44.552458] do_dentry_open+0x48a/0x1210 [ 44.557037] vfs_open+0xa0/0xd0 [ 44.560816] path_openat+0x144f/0x5650 [ 44.565199] do_filp_open+0x26f/0x370 [ 44.569497] do_open_execat+0x20e/0x930 [ 44.573969] __do_execve_file.isra.0+0x1966/0x2700 [ 44.579402] __ia32_compat_sys_execve+0x94/0xc0 [ 44.584564] do_fast_syscall_32+0x333/0xf98 [ 44.589375] entry_SYSENTER_compat+0x70/0x7f [ 44.594272] [ 44.594272] other info that might help us debug this: [ 44.594272] [ 44.602385] Possible unsafe locking scenario: [ 44.602385] [ 44.608409] CPU0 CPU1 [ 44.613048] ---- ---- [ 44.617682] lock(&sig->cred_guard_mutex); [ 44.621975] lock(&pipe->mutex/1); [ 44.628090] lock(&sig->cred_guard_mutex); [ 44.634897] lock(&pipe->mutex/1); [ 44.638492] [ 44.638492] *** DEADLOCK *** [ 44.638492] [ 44.644536] 1 lock held by syz-executor767/7460: [ 44.649258] #0: 00000000891a0a98 (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 44.659133] [ 44.659133] stack backtrace: [ 44.663601] CPU: 1 PID: 7460 Comm: syz-executor767 Not tainted 5.0.0-rc1+ #14 [ 44.670845] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.680165] Call Trace: [ 44.682726] dump_stack+0x1db/0x2d0 [ 44.686328] ? dump_stack_print_info.cold+0x20/0x20 [ 44.691319] ? print_stack_trace+0x77/0xb0 [ 44.695532] ? vprintk_func+0x86/0x189 [ 44.699402] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 44.704738] __lock_acquire+0x3014/0x4a30 [ 44.708857] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.713767] ? is_bpf_text_address+0xac/0x170 [ 44.718336] ? mark_held_locks+0x100/0x100 [ 44.722560] ? mark_held_locks+0xb1/0x100 [ 44.726683] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 44.731758] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 44.736833] ? lockdep_hardirqs_on+0x415/0x5d0 [ 44.741397] ? trace_hardirqs_off_caller+0x300/0x300 [ 44.746479] ? do_raw_spin_trylock+0x270/0x270 [ 44.751147] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.756050] ? print_usage_bug+0xd0/0xd0 [ 44.760106] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 44.765191] ? __lock_is_held+0xb6/0x140 [ 44.769229] lock_acquire+0x1db/0x570 [ 44.773009] ? fifo_open+0x159/0xb00 [ 44.776701] ? ___might_sleep+0x1e7/0x310 [ 44.780821] ? lock_release+0xc40/0xc40 [ 44.784767] ? fifo_open+0x159/0xb00 [ 44.788465] ? fifo_open+0x159/0xb00 [ 44.792164] __mutex_lock+0x12f/0x1670 [ 44.796022] ? fifo_open+0x159/0xb00 [ 44.799720] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 44.805232] ? fifo_open+0x159/0xb00 [ 44.808918] ? check_preemption_disabled+0x48/0x290 [ 44.813926] ? lockdep_init_map+0x10c/0x5b0 [ 44.818231] ? mutex_trylock+0x2d0/0x2d0 [ 44.822268] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.827261] ? __mutex_init+0x1f6/0x2a0 [ 44.831312] ? psi_task_change.cold+0x1ec/0x1ec [ 44.835956] ? fifo_open+0x2b5/0xb00 [ 44.839667] ? find_held_lock+0x35/0x120 [ 44.843727] ? fifo_open+0x2b5/0xb00 [ 44.847416] ? lock_acquire+0x1db/0x570 [ 44.851371] ? kasan_check_read+0x11/0x20 [ 44.855496] ? do_raw_spin_unlock+0xa0/0x330 [ 44.859876] ? do_raw_spin_trylock+0x270/0x270 [ 44.864434] mutex_lock_nested+0x16/0x20 [ 44.868474] ? _raw_spin_unlock+0x2d/0x50 [ 44.872594] ? mutex_lock_nested+0x16/0x20 [ 44.876799] fifo_open+0x159/0xb00 [ 44.880312] do_dentry_open+0x48a/0x1210 [ 44.884349] ? pipe_release+0x280/0x280 [ 44.888301] ? chown_common+0x740/0x740 [ 44.892252] ? security_inode_permission+0xd5/0x110 [ 44.897289] ? inode_permission+0xb4/0x570 [ 44.901500] vfs_open+0xa0/0xd0 [ 44.904754] path_openat+0x144f/0x5650 [ 44.908611] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 44.913687] ? lockdep_hardirqs_on+0x415/0x5d0 [ 44.918243] ? trace_hardirqs_on+0xbd/0x310 [ 44.922586] ? path_lookupat.isra.0+0xba0/0xba0 [ 44.927230] ? depot_save_stack+0x1de/0x460 [ 44.931524] ? __lock_acquire+0x572/0x4a30 [ 44.935730] ? kmem_cache_alloc+0x12d/0x710 [ 44.940033] ? __do_execve_file.isra.0+0x47a/0x2700 [ 44.945030] ? __ia32_compat_sys_execve+0x94/0xc0 [ 44.949849] ? do_fast_syscall_32+0x333/0xf98 [ 44.954327] ? entry_SYSENTER_compat+0x70/0x7f [ 44.958879] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.963778] do_filp_open+0x26f/0x370 [ 44.967553] ? may_open_dev+0x100/0x100 [ 44.971500] ? refcount_add_not_zero_checked+0x330/0x330 [ 44.976922] ? prepare_creds+0xa4/0x4e0 [ 44.980869] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.985767] ? add_lock_to_list.isra.0+0x450/0x450 [ 44.990690] ? __do_execve_file.isra.0+0x901/0x2700 [ 44.995678] do_open_execat+0x20e/0x930 [ 44.999625] ? unregister_binfmt+0x2b0/0x2b0 [ 45.004004] ? kasan_check_read+0x11/0x20 [ 45.008123] ? do_raw_spin_trylock+0x270/0x270 [ 45.012681] ? __phys_addr_symbol+0x30/0x70 [ 45.016990] __do_execve_file.isra.0+0x1966/0x2700 [ 45.021904] ? copy_strings_kernel+0x110/0x110 [ 45.026459] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 45.031969] ? strncpy_from_user+0x3aa/0x4e0 [ 45.036349] ? digsig_verify.cold+0x32/0x32 [ 45.040644] ? kmem_cache_alloc+0x341/0x710 [ 45.044937] ? do_fast_syscall_32+0x13b/0xf98 [ 45.049406] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 45.054913] ? getname_flags+0x277/0x5b0 [ 45.058948] ? trace_hardirqs_off_caller+0x300/0x300 [ 45.064028] __ia32_compat_sys_execve+0x94/0xc0 [ 45.068674] do_fast_syscall_32+0x333/0xf98 [ 45.072988] ? do_int80_syscall_32+0x880/0x880 [ 45.077554] ? trace_hardirqs_off+0x310/0x310 [ 45.082023] ? syscall_return_slowpath+0x3b0/0x5f0 [ 45.086922] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 45.092429] ? prepare_exit_to_usermode+0x232/0x3b0 [ 45.097418] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 45.102241] entry_SYSENTER_compat+0x70/0x7f [ 45.106625] RIP: 0023:0xf7fa4869 [ 45.109972] Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 45.128846] RSP: 002b:00000000f7f7f15c EFLAGS: 00000246 ORIG_RAX: 000000000000000b [ 45.136554] RAX: ffffffffffffffda RBX: 0000000020000380 RCX: 0000000000000000 [ 45.143821] RDX: 00000000000