[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 40.006664] audit: type=1800 audit(1546408958.623:25): pid=7910 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 40.040847] audit: type=1800 audit(1546408958.623:26): pid=7910 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 40.067896] audit: type=1800 audit(1546408958.623:27): pid=7910 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 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. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.25' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 51.739863] [ 51.741541] ====================================================== [ 51.747829] WARNING: possible circular locking dependency detected [ 51.754128] 4.20.0+ #4 Not tainted [ 51.757652] ------------------------------------------------------ [ 51.763946] syz-executor590/8060 is trying to acquire lock: [ 51.769627] 00000000f30e733e (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 51.776986] [ 51.776986] but task is already holding lock: [ 51.782942] 0000000090b8fb13 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 51.791673] [ 51.791673] which lock already depends on the new lock. [ 51.791673] [ 51.800032] [ 51.800032] the existing dependency chain (in reverse order) is: [ 51.807635] [ 51.807635] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 51.813949] __mutex_lock+0x12f/0x1670 [ 51.818334] mutex_lock_interruptible_nested+0x16/0x20 [ 51.824111] proc_pid_attr_write+0x1fa/0x530 [ 51.829016] __vfs_write+0x116/0xb40 [ 51.833227] __kernel_write+0x110/0x3b0 [ 51.837698] write_pipe_buf+0x180/0x240 [ 51.842168] __splice_from_pipe+0x39a/0x7e0 [ 51.847108] splice_from_pipe+0x1ea/0x310 [ 51.851764] default_file_splice_write+0x3c/0x90 [ 51.857017] do_splice+0x64b/0x1410 [ 51.861209] __x64_sys_splice+0x2c6/0x330 [ 51.865864] do_syscall_64+0x1a3/0x800 [ 51.870252] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 51.875932] [ 51.875932] -> #0 (&pipe->mutex/1){+.+.}: [ 51.881582] lock_acquire+0x1db/0x570 [ 51.885888] __mutex_lock+0x12f/0x1670 [ 51.890341] mutex_lock_nested+0x16/0x20 [ 51.894908] fifo_open+0x159/0xb00 [ 51.898950] do_dentry_open+0x48a/0x1210 [ 51.903511] vfs_open+0xa0/0xd0 [ 51.907290] path_openat+0x144f/0x5650 [ 51.911674] do_filp_open+0x26f/0x370 [ 51.915972] do_open_execat+0x20e/0x930 [ 51.920441] __do_execve_file.isra.0+0x181e/0x2510 [ 51.925869] __x64_sys_execve+0x8f/0xc0 [ 51.930343] do_syscall_64+0x1a3/0x800 [ 51.934777] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 51.940467] [ 51.940467] other info that might help us debug this: [ 51.940467] [ 51.948580] Possible unsafe locking scenario: [ 51.948580] [ 51.954610] CPU0 CPU1 [ 51.959253] ---- ---- [ 51.963893] lock(&sig->cred_guard_mutex); [ 51.968190] lock(&pipe->mutex/1); [ 51.974308] lock(&sig->cred_guard_mutex); [ 51.981121] lock(&pipe->mutex/1); [ 51.984722] [ 51.984722] *** DEADLOCK *** [ 51.984722] [ 51.990752] 1 lock held by syz-executor590/8060: [ 51.995578] #0: 0000000090b8fb13 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 52.004755] [ 52.004755] stack backtrace: [ 52.009228] CPU: 0 PID: 8060 Comm: syz-executor590 Not tainted 4.20.0+ #4 [ 52.016131] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.025463] Call Trace: [ 52.028039] dump_stack+0x1db/0x2d0 [ 52.031656] ? dump_stack_print_info.cold+0x20/0x20 [ 52.036651] ? print_stack_trace+0x77/0xb0 [ 52.040864] ? vprintk_func+0x86/0x189 [ 52.044735] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 52.050079] __lock_acquire+0x3014/0x4a30 [ 52.054250] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.059164] ? is_bpf_text_address+0xac/0x170 [ 52.063653] ? mark_held_locks+0x100/0x100 [ 52.067867] ? mark_held_locks+0xb1/0x100 [ 52.071994] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 52.077074] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 52.082152] ? lockdep_hardirqs_on+0x415/0x5d0 [ 52.086725] ? trace_hardirqs_off_caller+0x300/0x300 [ 52.091802] ? do_raw_spin_trylock+0x270/0x270 [ 52.096362] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.101268] ? print_usage_bug+0xd0/0xd0 [ 52.105306] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 52.110387] ? __lock_is_held+0xb6/0x140 [ 52.114426] lock_acquire+0x1db/0x570 [ 52.118248] ? fifo_open+0x159/0xb00 [ 52.121953] ? ___might_sleep+0x1e7/0x310 [ 52.126076] ? lock_release+0xc40/0xc40 [ 52.130026] ? fifo_open+0x159/0xb00 [ 52.133722] ? fifo_open+0x159/0xb00 [ 52.137444] __mutex_lock+0x12f/0x1670 [ 52.141312] ? fifo_open+0x159/0xb00 [ 52.145003] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.150518] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.156032] ? fifo_open+0x159/0xb00 [ 52.159721] ? lockdep_init_map+0x10c/0x5b0 [ 52.164020] ? mutex_trylock+0x2d0/0x2d0 [ 52.168056] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.172966] ? __mutex_init+0x1f6/0x2a0 [ 52.176921] ? psi_task_change.cold+0x1ec/0x1ec [ 52.181570] ? fifo_open+0x2b5/0xb00 [ 52.185259] ? find_held_lock+0x35/0x120 [ 52.189298] ? fifo_open+0x2b5/0xb00 [ 52.192987] ? lock_acquire+0x1db/0x570 [ 52.196945] ? kasan_check_read+0x11/0x20 [ 52.201080] ? do_raw_spin_unlock+0xa0/0x330 [ 52.205550] ? do_raw_spin_trylock+0x270/0x270 [ 52.210121] mutex_lock_nested+0x16/0x20 [ 52.214158] ? _raw_spin_unlock+0x2d/0x50 [ 52.218284] ? mutex_lock_nested+0x16/0x20 [ 52.222598] fifo_open+0x159/0xb00 [ 52.226133] do_dentry_open+0x48a/0x1210 [ 52.230185] ? pipe_release+0x280/0x280 [ 52.234137] ? chown_common+0x740/0x740 [ 52.238092] ? security_inode_permission+0xd5/0x110 [ 52.243094] ? inode_permission+0xb4/0x570 [ 52.247309] vfs_open+0xa0/0xd0 [ 52.250565] path_openat+0x144f/0x5650 [ 52.254428] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.259335] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.264850] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.270391] ? path_lookupat.isra.0+0xba0/0xba0 [ 52.275040] ? psi_task_change.cold+0x1ec/0x1ec [ 52.279792] ? __lock_acquire+0x572/0x4a30 [ 52.284008] ? __x64_sys_execve+0x8f/0xc0 [ 52.288153] ? new_task_smack+0x26a/0x330 [ 52.292286] do_filp_open+0x26f/0x370 [ 52.296262] ? may_open_dev+0x100/0x100 [ 52.300218] ? smack_cred_alloc_blank+0x80/0x80 [ 52.304870] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.309781] ? add_lock_to_list.isra.0+0x450/0x450 [ 52.314834] ? refcount_add_not_zero_checked+0x330/0x330 [ 52.320305] ? prepare_creds+0xa4/0x4e0 [ 52.324278] ? prepare_creds+0xa4/0x4e0 [ 52.328230] ? __do_execve_file.isra.0+0x908/0x2510 [ 52.333225] do_open_execat+0x20e/0x930 [ 52.337179] ? unregister_binfmt+0x2b0/0x2b0 [ 52.341570] ? kasan_check_read+0x11/0x20 [ 52.345698] ? do_raw_spin_trylock+0x270/0x270 [ 52.350330] ? key_put+0x36/0x90 [ 52.353693] __do_execve_file.isra.0+0x181e/0x2510 [ 52.358610] ? prepare_bprm_creds+0x120/0x120 [ 52.363139] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 52.368662] ? strncpy_from_user+0x317/0x440 [ 52.373084] ? digsig_verify.cold+0x32/0x32 [ 52.377397] ? kmem_cache_alloc+0x341/0x710 [ 52.381715] ? do_syscall_64+0x8c/0x800 [ 52.385678] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.391197] ? getname_flags+0x277/0x5b0 [ 52.395334] ? trace_hardirqs_off_caller+0x300/0x300 [ 52.400536] __x64_sys_execve+0x8f/0xc0 [ 52.404547] do_syscall_64+0x1a3/0x800 [ 52.408420] ? syscall_return_slowpath+0x5f0/0x5f0 [ 52.413328] ? prepare_exit_to_usermode+0x232/0x3b0 [ 52.418320] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 52.423144] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.428309] RIP: 0033:0x440119 [ 52.431544] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 52.450440] RSP: 002b:00007ffdc07ec4c8 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 52.458127] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 [ 52.465374] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000340 [ 52.472624] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 52.479878] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 [ 52.487131] R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000