[ 34.672207] audit: type=1800 audit(1546396725.038:27): pid=7534 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 34.696606] audit: type=1800 audit(1546396725.048:28): pid=7534 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. [ 35.430193] audit: type=1800 audit(1546396725.858:29): pid=7534 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 [ 35.455146] audit: type=1800 audit(1546396725.858:30): pid=7534 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.121' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 46.421462] [ 46.423133] ====================================================== [ 46.429430] WARNING: possible circular locking dependency detected [ 46.435732] 4.20.0+ #4 Not tainted [ 46.439247] ------------------------------------------------------ [ 46.445543] syz-executor184/7686 is trying to acquire lock: [ 46.451228] 000000003a1bf9b0 (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 46.458578] [ 46.458578] but task is already holding lock: [ 46.464550] 00000000d8c788de (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 46.473300] [ 46.473300] which lock already depends on the new lock. [ 46.473300] [ 46.481592] [ 46.481592] the existing dependency chain (in reverse order) is: [ 46.489197] [ 46.489197] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 46.495509] __mutex_lock+0x12f/0x1670 [ 46.499898] mutex_lock_interruptible_nested+0x16/0x20 [ 46.505675] proc_pid_attr_write+0x1fa/0x530 [ 46.510591] __vfs_write+0x116/0xb40 [ 46.514806] __kernel_write+0x110/0x3b0 [ 46.519282] write_pipe_buf+0x180/0x240 [ 46.523756] __splice_from_pipe+0x39a/0x7e0 [ 46.528578] splice_from_pipe+0x1ea/0x310 [ 46.533223] default_file_splice_write+0x3c/0x90 [ 46.538480] do_splice+0x64b/0x1410 [ 46.542605] __x64_sys_splice+0x2c6/0x330 [ 46.547253] do_syscall_64+0x1a3/0x800 [ 46.551655] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.557348] [ 46.557348] -> #0 (&pipe->mutex/1){+.+.}: [ 46.562955] lock_acquire+0x1db/0x570 [ 46.567256] __mutex_lock+0x12f/0x1670 [ 46.571643] mutex_lock_nested+0x16/0x20 [ 46.576215] fifo_open+0x159/0xb00 [ 46.580257] do_dentry_open+0x48a/0x1210 [ 46.584820] vfs_open+0xa0/0xd0 [ 46.588603] path_openat+0x144f/0x5650 [ 46.592988] do_filp_open+0x26f/0x370 [ 46.597295] do_open_execat+0x20e/0x930 [ 46.601786] __do_execve_file.isra.0+0x181e/0x2510 [ 46.607218] __x64_sys_execve+0x8f/0xc0 [ 46.611697] do_syscall_64+0x1a3/0x800 [ 46.616090] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.621776] [ 46.621776] other info that might help us debug this: [ 46.621776] [ 46.629891] Possible unsafe locking scenario: [ 46.629891] [ 46.635927] CPU0 CPU1 [ 46.640568] ---- ---- [ 46.645212] lock(&sig->cred_guard_mutex); [ 46.649511] lock(&pipe->mutex/1); [ 46.655632] lock(&sig->cred_guard_mutex); [ 46.662446] lock(&pipe->mutex/1); [ 46.666054] [ 46.666054] *** DEADLOCK *** [ 46.666054] [ 46.672096] 1 lock held by syz-executor184/7686: [ 46.676825] #0: 00000000d8c788de (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 46.686002] [ 46.686002] stack backtrace: [ 46.690477] CPU: 1 PID: 7686 Comm: syz-executor184 Not tainted 4.20.0+ #4 [ 46.697379] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.706711] Call Trace: [ 46.709283] dump_stack+0x1db/0x2d0 [ 46.712894] ? dump_stack_print_info.cold+0x20/0x20 [ 46.717892] ? print_stack_trace+0x77/0xb0 [ 46.722110] ? vprintk_func+0x86/0x189 [ 46.725980] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 46.731323] __lock_acquire+0x3014/0x4a30 [ 46.735449] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.740356] ? is_bpf_text_address+0xac/0x170 [ 46.744846] ? mark_held_locks+0x100/0x100 [ 46.749060] ? mark_held_locks+0xb1/0x100 [ 46.753204] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 46.758288] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 46.763369] ? lockdep_hardirqs_on+0x415/0x5d0 [ 46.767935] ? trace_hardirqs_off_caller+0x300/0x300 [ 46.773034] ? do_raw_spin_trylock+0x270/0x270 [ 46.777594] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.782501] ? print_usage_bug+0xd0/0xd0 [ 46.786568] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 46.791650] ? __lock_is_held+0xb6/0x140 [ 46.795705] lock_acquire+0x1db/0x570 [ 46.799487] ? fifo_open+0x159/0xb00 [ 46.803195] ? ___might_sleep+0x1e7/0x310 [ 46.807321] ? lock_release+0xc40/0xc40 [ 46.811273] ? fifo_open+0x159/0xb00 [ 46.814968] ? fifo_open+0x159/0xb00 [ 46.818667] __mutex_lock+0x12f/0x1670 [ 46.822536] ? fifo_open+0x159/0xb00 [ 46.826233] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 46.831752] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 46.837268] ? fifo_open+0x159/0xb00 [ 46.840963] ? lockdep_init_map+0x10c/0x5b0 [ 46.845269] ? mutex_trylock+0x2d0/0x2d0 [ 46.849310] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.854229] ? __mutex_init+0x1f6/0x2a0 [ 46.858201] ? psi_task_change.cold+0x1ec/0x1ec [ 46.862854] ? fifo_open+0x2b5/0xb00 [ 46.866546] ? find_held_lock+0x35/0x120 [ 46.870585] ? fifo_open+0x2b5/0xb00 [ 46.874276] ? lock_acquire+0x1db/0x570 [ 46.878232] ? kasan_check_read+0x11/0x20 [ 46.882358] ? do_raw_spin_unlock+0xa0/0x330 [ 46.886748] ? do_raw_spin_trylock+0x270/0x270 [ 46.891315] mutex_lock_nested+0x16/0x20 [ 46.895357] ? _raw_spin_unlock+0x2d/0x50 [ 46.899488] ? mutex_lock_nested+0x16/0x20 [ 46.903704] fifo_open+0x159/0xb00 [ 46.907229] do_dentry_open+0x48a/0x1210 [ 46.911276] ? pipe_release+0x280/0x280 [ 46.915232] ? chown_common+0x740/0x740 [ 46.919186] ? security_inode_permission+0xd5/0x110 [ 46.924186] ? inode_permission+0xb4/0x570 [ 46.928404] vfs_open+0xa0/0xd0 [ 46.931671] path_openat+0x144f/0x5650 [ 46.935543] ? is_bpf_text_address+0xd3/0x170 [ 46.940021] ? kernel_text_address+0x73/0xf0 [ 46.944417] ? path_lookupat.isra.0+0xba0/0xba0 [ 46.949068] ? save_stack+0xa9/0xd0 [ 46.952678] ? __lock_acquire+0x572/0x4a30 [ 46.956893] ? __x64_sys_execve+0x8f/0xc0 [ 46.961021] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.965938] do_filp_open+0x26f/0x370 [ 46.969719] ? refcount_add_not_zero_checked+0x330/0x330 [ 46.975151] ? may_open_dev+0x100/0x100 [ 46.979111] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 46.984637] ? refcount_inc_checked+0x2b/0x70 [ 46.989120] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.994026] ? add_lock_to_list.isra.0+0x450/0x450 [ 46.998935] ? apparmor_cred_transfer+0x5b0/0x5b0 [ 47.003758] ? prepare_creds+0xa4/0x4e0 [ 47.007714] ? prepare_creds+0xa4/0x4e0 [ 47.011671] ? __do_execve_file.isra.0+0x908/0x2510 [ 47.016668] do_open_execat+0x20e/0x930 [ 47.020622] ? unregister_binfmt+0x2b0/0x2b0 [ 47.025018] ? kasan_check_read+0x11/0x20 [ 47.029160] ? do_raw_spin_trylock+0x270/0x270 [ 47.033723] ? key_put+0x36/0x90 [ 47.037072] __do_execve_file.isra.0+0x181e/0x2510 [ 47.041981] ? prepare_bprm_creds+0x120/0x120 [ 47.046461] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 47.051994] ? strncpy_from_user+0x317/0x440 [ 47.056385] ? digsig_verify.cold+0x32/0x32 [ 47.060687] ? kmem_cache_alloc+0x341/0x710 [ 47.064992] ? do_syscall_64+0x8c/0x800 [ 47.068951] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.074470] ? getname_flags+0x277/0x5b0 [ 47.078599] ? trace_hardirqs_off_caller+0x300/0x300 [ 47.083682] __x64_sys_execve+0x8f/0xc0 [ 47.087658] do_syscall_64+0x1a3/0x800 [ 47.091527] ? syscall_return_slowpath+0x5f0/0x5f0 [ 47.096436] ? prepare_exit_to_usermode+0x232/0x3b0 [ 47.101448] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.106279] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.111444] RIP: 0033:0x440119 [ 47.114622] 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 [ 47.133509] RSP: 002b:00007ffe3a6fb678 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 47.141200] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 [ 47.148449] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000340 [ 47.155699] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 47.162949] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 [ 47.170289] R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000