[ 36.537135] audit: type=1800 audit(1547466398.302:27): pid=7573 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 36.564551] audit: type=1800 audit(1547466398.312:28): pid=7573 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. [ 37.210523] audit: type=1800 audit(1547466399.042:29): pid=7573 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 [ 37.230271] audit: type=1800 audit(1547466399.042:30): pid=7573 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.70' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 46.611189] [ 46.612865] ====================================================== [ 46.619159] WARNING: possible circular locking dependency detected [ 46.625455] 5.0.0-rc2 #24 Not tainted [ 46.629238] ------------------------------------------------------ [ 46.635532] syz-executor414/7727 is trying to acquire lock: [ 46.641218] 000000000b05498b (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 46.648568] [ 46.648568] but task is already holding lock: [ 46.654518] 000000009d9637f0 (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 46.663866] [ 46.663866] which lock already depends on the new lock. [ 46.663866] [ 46.672156] [ 46.672156] the existing dependency chain (in reverse order) is: [ 46.679783] [ 46.679783] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 46.686121] __mutex_lock+0x12f/0x1670 [ 46.690516] mutex_lock_interruptible_nested+0x16/0x20 [ 46.696309] proc_pid_attr_write+0x1fa/0x530 [ 46.701221] __vfs_write+0x116/0xb40 [ 46.705438] __kernel_write+0x110/0x3b0 [ 46.709931] write_pipe_buf+0x180/0x240 [ 46.714413] __splice_from_pipe+0x39a/0x7e0 [ 46.719240] splice_from_pipe+0x1ea/0x310 [ 46.723888] default_file_splice_write+0x3c/0x90 [ 46.729156] do_splice+0x64b/0x1410 [ 46.733282] __x64_sys_splice+0x2c6/0x330 [ 46.737937] do_syscall_64+0x1a3/0x800 [ 46.742328] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.748019] [ 46.748019] -> #0 (&pipe->mutex/1){+.+.}: [ 46.753632] lock_acquire+0x1db/0x570 [ 46.757944] __mutex_lock+0x12f/0x1670 [ 46.762336] mutex_lock_nested+0x16/0x20 [ 46.766902] fifo_open+0x159/0xb00 [ 46.770945] do_dentry_open+0x48a/0x1210 [ 46.775508] vfs_open+0xa0/0xd0 [ 46.779288] path_openat+0x144f/0x5650 [ 46.783679] do_filp_open+0x26f/0x370 [ 46.787988] do_open_execat+0x20e/0x930 [ 46.792475] __do_execve_file.isra.0+0x1966/0x2700 [ 46.797932] __x64_sys_execve+0x8f/0xc0 [ 46.802409] do_syscall_64+0x1a3/0x800 [ 46.806802] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.812490] [ 46.812490] other info that might help us debug this: [ 46.812490] [ 46.820621] Possible unsafe locking scenario: [ 46.820621] [ 46.826653] CPU0 CPU1 [ 46.831311] ---- ---- [ 46.835966] lock(&sig->cred_guard_mutex); [ 46.840276] lock(&pipe->mutex/1); [ 46.846398] lock(&sig->cred_guard_mutex); [ 46.853301] lock(&pipe->mutex/1); [ 46.856906] [ 46.856906] *** DEADLOCK *** [ 46.856906] [ 46.862940] 1 lock held by syz-executor414/7727: [ 46.867668] #0: 000000009d9637f0 (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file.isra.0+0x45d/0x2700 [ 46.877454] [ 46.877454] stack backtrace: [ 46.881932] CPU: 1 PID: 7727 Comm: syz-executor414 Not tainted 5.0.0-rc2 #24 [ 46.889097] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.898428] Call Trace: [ 46.901003] dump_stack+0x1db/0x2d0 [ 46.904624] ? dump_stack_print_info.cold+0x20/0x20 [ 46.909622] ? print_stack_trace+0x77/0xb0 [ 46.913835] ? vprintk_func+0x86/0x189 [ 46.917703] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 46.923059] __lock_acquire+0x3014/0x4a30 [ 46.927189] ? is_bpf_text_address+0xac/0x170 [ 46.931664] ? mark_held_locks+0x100/0x100 [ 46.935879] ? mark_held_locks+0xb1/0x100 [ 46.940011] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 46.945110] ? lockdep_hardirqs_on+0x415/0x5d0 [ 46.949783] ? trace_hardirqs_off_caller+0x300/0x300 [ 46.954866] ? do_raw_spin_trylock+0x270/0x270 [ 46.959427] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.964337] ? print_usage_bug+0xd0/0xd0 [ 46.968376] ? __lock_is_held+0xb6/0x140 [ 46.972414] lock_acquire+0x1db/0x570 [ 46.976195] ? fifo_open+0x159/0xb00 [ 46.979892] ? ___might_sleep+0x1e7/0x310 [ 46.984020] ? lock_release+0xc40/0xc40 [ 46.987980] ? fifo_open+0x159/0xb00 [ 46.991677] ? fifo_open+0x159/0xb00 [ 46.995370] __mutex_lock+0x12f/0x1670 [ 46.999237] ? fifo_open+0x159/0xb00 [ 47.002931] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.008449] ? fifo_open+0x159/0xb00 [ 47.012144] ? check_preemption_disabled+0x48/0x290 [ 47.017141] ? lockdep_init_map+0x10c/0x5b0 [ 47.021442] ? mutex_trylock+0x2d0/0x2d0 [ 47.025487] ? add_lock_to_list.isra.0+0x450/0x450 [ 47.030398] ? __mutex_init+0x1f6/0x2a0 [ 47.034355] ? psi_task_change.cold+0x1ec/0x1ec [ 47.039002] ? fifo_open+0x2b5/0xb00 [ 47.043097] ? find_held_lock+0x35/0x120 [ 47.047139] ? fifo_open+0x2b5/0xb00 [ 47.050832] ? lock_acquire+0x1db/0x570 [ 47.054786] ? kasan_check_read+0x11/0x20 [ 47.058916] ? do_raw_spin_unlock+0xa0/0x330 [ 47.063307] ? do_raw_spin_trylock+0x270/0x270 [ 47.067874] mutex_lock_nested+0x16/0x20 [ 47.071923] ? _raw_spin_unlock+0x2d/0x50 [ 47.076054] ? mutex_lock_nested+0x16/0x20 [ 47.080276] fifo_open+0x159/0xb00 [ 47.083805] do_dentry_open+0x48a/0x1210 [ 47.087851] ? pipe_release+0x280/0x280 [ 47.091806] ? chown_common+0x740/0x740 [ 47.095765] ? security_inode_permission+0xd5/0x110 [ 47.100765] ? inode_permission+0xb4/0x570 [ 47.104992] vfs_open+0xa0/0xd0 [ 47.108272] path_openat+0x144f/0x5650 [ 47.112144] ? is_bpf_text_address+0xd3/0x170 [ 47.116636] ? path_lookupat.isra.0+0xba0/0xba0 [ 47.121287] ? __lock_acquire+0x572/0x4a30 [ 47.125503] ? kmem_cache_alloc+0x12d/0x710 [ 47.129806] ? __do_execve_file.isra.0+0x47a/0x2700 [ 47.134816] ? __x64_sys_execve+0x8f/0xc0 [ 47.138949] ? do_syscall_64+0x1a3/0x800 [ 47.143022] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.148369] ? add_lock_to_list.isra.0+0x450/0x450 [ 47.153280] do_filp_open+0x26f/0x370 [ 47.157060] ? may_open_dev+0x100/0x100 [ 47.161018] ? refcount_add_not_zero_checked+0x330/0x330 [ 47.166450] ? prepare_creds+0xa4/0x4e0 [ 47.170424] ? add_lock_to_list.isra.0+0x450/0x450 [ 47.175336] ? add_lock_to_list.isra.0+0x450/0x450 [ 47.180249] ? __do_execve_file.isra.0+0x901/0x2700 [ 47.185246] do_open_execat+0x20e/0x930 [ 47.189202] ? unregister_binfmt+0x2b0/0x2b0 [ 47.193589] ? kasan_check_read+0x11/0x20 [ 47.197716] ? do_raw_spin_trylock+0x270/0x270 [ 47.202281] ? __phys_addr_symbol+0x30/0x70 [ 47.207002] __do_execve_file.isra.0+0x1966/0x2700 [ 47.211920] ? copy_strings_kernel+0x110/0x110 [ 47.216486] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 47.222004] ? strncpy_from_user+0x3aa/0x4e0 [ 47.226395] ? digsig_verify.cold+0x32/0x32 [ 47.230694] ? kmem_cache_alloc+0x341/0x710 [ 47.234996] ? do_syscall_64+0x8c/0x800 [ 47.238956] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.244481] ? getname_flags+0x277/0x5b0 [ 47.248538] ? trace_hardirqs_off_caller+0x300/0x300 [ 47.253623] __x64_sys_execve+0x8f/0xc0 [ 47.257587] do_syscall_64+0x1a3/0x800 [ 47.261458] ? syscall_return_slowpath+0x5f0/0x5f0 [ 47.266370] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 47.271382] ? __switch_to_asm+0x34/0x70 [ 47.275446] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.280285] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.285455] RIP: 0033:0x445719 [ 47.288636] 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 [ 47.307521] RSP: 002b:00007f4babe5ada8 EFLAGS: 00000246 ORIG_RAX: 0000000000