[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 36.063034] audit: type=1800 audit(1546379930.586:29): pid=7554 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 [ 36.082487] audit: type=1800 audit(1546379930.596:30): pid=7554 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 [ 36.135398] startpar (7554) used greatest stack depth: 19848 bytes left [....] startpar: service(s) returned failure: ssh ...[?25l[?1c7[FAIL8[?25h[?0c failed! Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.65' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 47.668571] [ 47.670323] ====================================================== [ 47.676749] WARNING: possible circular locking dependency detected [ 47.683165] 4.20.0+ #3 Not tainted [ 47.686682] ------------------------------------------------------ [ 47.692990] syz-executor608/7730 is trying to acquire lock: [ 47.698676] 0000000040c4cee8 (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 47.706029] [ 47.706029] but task is already holding lock: [ 47.711988] 000000005adb5ddf (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 47.720733] [ 47.720733] which lock already depends on the new lock. [ 47.720733] [ 47.729037] [ 47.729037] the existing dependency chain (in reverse order) is: [ 47.736639] [ 47.736639] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 47.743040] __mutex_lock+0x12f/0x1670 [ 47.747432] mutex_lock_interruptible_nested+0x16/0x20 [ 47.753214] proc_pid_attr_write+0x1fa/0x530 [ 47.758302] __vfs_write+0x116/0xb40 [ 47.762518] __kernel_write+0x110/0x3b0 [ 47.766996] write_pipe_buf+0x180/0x240 [ 47.771474] __splice_from_pipe+0x39a/0x7e0 [ 47.776296] splice_from_pipe+0x1ea/0x310 [ 47.780947] default_file_splice_write+0x3c/0x90 [ 47.786208] do_splice+0x64b/0x1410 [ 47.790333] __x64_sys_splice+0x2c6/0x330 [ 47.794981] do_syscall_64+0x1a3/0x800 [ 47.799459] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.805145] [ 47.805145] -> #0 (&pipe->mutex/1){+.+.}: [ 47.810761] lock_acquire+0x1db/0x570 [ 47.815066] __mutex_lock+0x12f/0x1670 [ 47.819455] mutex_lock_nested+0x16/0x20 [ 47.824028] fifo_open+0x159/0xb00 [ 47.828077] do_dentry_open+0x48a/0x1210 [ 47.832651] vfs_open+0xa0/0xd0 [ 47.836440] path_openat+0x144f/0x5650 [ 47.840828] do_filp_open+0x26f/0x370 [ 47.845129] do_open_execat+0x20e/0x930 [ 47.849603] __do_execve_file.isra.0+0x181e/0x2510 [ 47.855037] __x64_sys_execve+0x8f/0xc0 [ 47.859727] do_syscall_64+0x1a3/0x800 [ 47.864117] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.869801] [ 47.869801] other info that might help us debug this: [ 47.869801] [ 47.877935] Possible unsafe locking scenario: [ 47.877935] [ 47.884059] CPU0 CPU1 [ 47.888704] ---- ---- [ 47.893358] lock(&sig->cred_guard_mutex); [ 47.897660] lock(&pipe->mutex/1); [ 47.903783] lock(&sig->cred_guard_mutex); [ 47.910620] lock(&pipe->mutex/1); [ 47.914246] [ 47.914246] *** DEADLOCK *** [ 47.914246] [ 47.920283] 1 lock held by syz-executor608/7730: [ 47.925013] #0: 000000005adb5ddf (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 47.934185] [ 47.934185] stack backtrace: [ 47.938663] CPU: 0 PID: 7730 Comm: syz-executor608 Not tainted 4.20.0+ #3 [ 47.945566] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.954897] Call Trace: [ 47.957493] dump_stack+0x1db/0x2d0 [ 47.961105] ? dump_stack_print_info.cold+0x20/0x20 [ 47.966104] ? print_stack_trace+0x77/0xb0 [ 47.970323] ? vprintk_func+0x86/0x189 [ 47.974290] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 47.979634] __lock_acquire+0x3014/0x4a30 [ 47.983763] ? add_lock_to_list.isra.0+0x450/0x450 [ 47.988680] ? is_bpf_text_address+0xac/0x170 [ 47.993162] ? mark_held_locks+0x100/0x100 [ 47.997381] ? mark_held_locks+0xb1/0x100 [ 48.001513] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 48.006610] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 48.011698] ? lockdep_hardirqs_on+0x415/0x5d0 [ 48.016264] ? trace_hardirqs_off_caller+0x300/0x300 [ 48.021358] ? do_raw_spin_trylock+0x270/0x270 [ 48.025923] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.030834] ? print_usage_bug+0xd0/0xd0 [ 48.034879] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 48.039967] ? __lock_is_held+0xb6/0x140 [ 48.044024] lock_acquire+0x1db/0x570 [ 48.048177] ? fifo_open+0x159/0xb00 [ 48.051873] ? ___might_sleep+0x1e7/0x310 [ 48.056003] ? lock_release+0xc40/0xc40 [ 48.059958] ? fifo_open+0x159/0xb00 [ 48.063652] ? fifo_open+0x159/0xb00 [ 48.067351] __mutex_lock+0x12f/0x1670 [ 48.071220] ? fifo_open+0x159/0xb00 [ 48.074947] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.080468] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.085983] ? fifo_open+0x159/0xb00 [ 48.089782] ? lockdep_init_map+0x10c/0x5b0 [ 48.094088] ? mutex_trylock+0x2d0/0x2d0 [ 48.098128] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.103044] ? __mutex_init+0x1f6/0x2a0 [ 48.107005] ? psi_task_change.cold+0x1ec/0x1ec [ 48.111672] ? fifo_open+0x2b5/0xb00 [ 48.115376] ? find_held_lock+0x35/0x120 [ 48.119417] ? fifo_open+0x2b5/0xb00 [ 48.123109] ? lock_acquire+0x1db/0x570 [ 48.127066] ? kasan_check_read+0x11/0x20 [ 48.131195] ? do_raw_spin_unlock+0xa0/0x330 [ 48.135584] ? do_raw_spin_trylock+0x270/0x270 [ 48.140156] mutex_lock_nested+0x16/0x20 [ 48.144219] ? _raw_spin_unlock+0x2d/0x50 [ 48.148437] ? mutex_lock_nested+0x16/0x20 [ 48.152654] fifo_open+0x159/0xb00 [ 48.156178] do_dentry_open+0x48a/0x1210 [ 48.160224] ? pipe_release+0x280/0x280 [ 48.164183] ? chown_common+0x740/0x740 [ 48.168144] ? security_inode_permission+0xd5/0x110 [ 48.173140] ? inode_permission+0xb4/0x570 [ 48.177368] vfs_open+0xa0/0xd0 [ 48.180628] path_openat+0x144f/0x5650 [ 48.184499] ? is_bpf_text_address+0xd3/0x170 [ 48.188976] ? kernel_text_address+0x73/0xf0 [ 48.193368] ? path_lookupat.isra.0+0xba0/0xba0 [ 48.198018] ? save_stack+0xa9/0xd0 [ 48.201639] ? __lock_acquire+0x572/0x4a30 [ 48.205861] ? __x64_sys_execve+0x8f/0xc0 [ 48.209990] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.214906] do_filp_open+0x26f/0x370 [ 48.218693] ? refcount_add_not_zero_checked+0x330/0x330 [ 48.224142] ? may_open_dev+0x100/0x100 [ 48.228103] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 48.233712] ? refcount_inc_checked+0x2b/0x70 [ 48.238207] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.243119] ? add_lock_to_list.isra.0+0x450/0x450 [ 48.248159] ? apparmor_cred_transfer+0x5b0/0x5b0 [ 48.252984] ? prepare_creds+0xa4/0x4e0 [ 48.256939] ? prepare_creds+0xa4/0x4e0 [ 48.260896] ? __do_execve_file.isra.0+0x908/0x2510 [ 48.265912] do_open_execat+0x20e/0x930 [ 48.269868] ? unregister_binfmt+0x2b0/0x2b0 [ 48.274271] ? kasan_check_read+0x11/0x20 [ 48.278489] ? do_raw_spin_trylock+0x270/0x270 [ 48.283052] ? key_put+0x36/0x90 [ 48.286403] __do_execve_file.isra.0+0x181e/0x2510 [ 48.291314] ? prepare_bprm_creds+0x120/0x120 [ 48.295792] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.301307] ? strncpy_from_user+0x317/0x440 [ 48.305698] ? digsig_verify.cold+0x32/0x32 [ 48.309998] ? kmem_cache_alloc+0x341/0x710 [ 48.314315] ? do_syscall_64+0x8c/0x800 [ 48.318272] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.323790] ? getname_flags+0x277/0x5b0 [ 48.327833] ? trace_hardirqs_off_caller+0x300/0x300 [ 48.333014] __x64_sys_execve+0x8f/0xc0 [ 48.337059] do_syscall_64+0x1a3/0x800 [ 48.340930] ? syscall_return_slowpath+0x5f0/0x5f0 [ 48.345840] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 48.350838] ? __switch_to_asm+0x34/0x70 [ 48.354882] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.359711] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.364880] RIP: 0033:0x445729 [ 48.368058] 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 [ 48.387039] RSP: 002b:00007f8dba47dda8 EFLAGS: 00000246 ORIG_RAX: 000000000000003b [ 48.394736] RAX: ffffffffffffffda RBX: 00000000006dac58 RCX: 0000000000445729 [ 48.402074] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000340 [ 48.409431] RBP: 00000000006dac50 R08: 0000000000000000 R09: 0000000000000000 [ 48.416685] R10: 0000000000000000 R11: 0000000000000246 R12