[ 38.770926] audit: type=1800 audit(1546414219.555:25): pid=7876 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 38.804279] audit: type=1800 audit(1546414219.565:26): pid=7876 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 38.830321] audit: type=1800 audit(1546414219.565:27): pid=7876 uid=0 auid=4294967295 ses=4294967295 subj==unconfined 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. [....] startpar: service(s) returned failure: ssh ...[?25l[?1c7[FAIL8[?25h[?0c failed! Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.214' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.390623] [ 50.392306] ====================================================== [ 50.398602] WARNING: possible circular locking dependency detected [ 50.404911] 4.20.0+ #4 Not tainted [ 50.408432] ------------------------------------------------------ [ 50.414727] syz-executor361/8049 is trying to acquire lock: [ 50.420416] 000000001200308a (&pipe->mutex/1){+.+.}, at: fifo_open+0x159/0xb00 [ 50.427771] [ 50.427771] but task is already holding lock: [ 50.433741] 00000000268686b0 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 50.442476] [ 50.442476] which lock already depends on the new lock. [ 50.442476] [ 50.450781] [ 50.450781] the existing dependency chain (in reverse order) is: [ 50.458415] [ 50.458415] -> #1 (&sig->cred_guard_mutex){+.+.}: [ 50.464726] __mutex_lock+0x12f/0x1670 [ 50.469124] mutex_lock_interruptible_nested+0x16/0x20 [ 50.474905] proc_pid_attr_write+0x1fa/0x530 [ 50.479812] __vfs_write+0x116/0xb40 [ 50.484026] __kernel_write+0x110/0x3b0 [ 50.488503] write_pipe_buf+0x180/0x240 [ 50.492977] __splice_from_pipe+0x39a/0x7e0 [ 50.497799] splice_from_pipe+0x1ea/0x310 [ 50.502448] default_file_splice_write+0x3c/0x90 [ 50.508043] do_splice+0x64b/0x1410 [ 50.512176] __x64_sys_splice+0x2c6/0x330 [ 50.516821] do_syscall_64+0x1a3/0x800 [ 50.521223] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.526904] [ 50.526904] -> #0 (&pipe->mutex/1){+.+.}: [ 50.532513] lock_acquire+0x1db/0x570 [ 50.536815] __mutex_lock+0x12f/0x1670 [ 50.541222] mutex_lock_nested+0x16/0x20 [ 50.545782] fifo_open+0x159/0xb00 [ 50.549824] do_dentry_open+0x48a/0x1210 [ 50.554384] vfs_open+0xa0/0xd0 [ 50.558162] path_openat+0x144f/0x5650 [ 50.562563] do_filp_open+0x26f/0x370 [ 50.566862] do_open_execat+0x20e/0x930 [ 50.571339] __do_execve_file.isra.0+0x181e/0x2510 [ 50.576777] __x64_sys_execve+0x8f/0xc0 [ 50.581251] do_syscall_64+0x1a3/0x800 [ 50.585637] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.591321] [ 50.591321] other info that might help us debug this: [ 50.591321] [ 50.599437] Possible unsafe locking scenario: [ 50.599437] [ 50.605471] CPU0 CPU1 [ 50.610245] ---- ---- [ 50.614888] lock(&sig->cred_guard_mutex); [ 50.619184] lock(&pipe->mutex/1); [ 50.625308] lock(&sig->cred_guard_mutex); [ 50.632127] lock(&pipe->mutex/1); [ 50.635733] [ 50.635733] *** DEADLOCK *** [ 50.635733] [ 50.641765] 1 lock held by syz-executor361/8049: [ 50.646492] #0: 00000000268686b0 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 [ 50.655666] [ 50.655666] stack backtrace: [ 50.660144] CPU: 1 PID: 8049 Comm: syz-executor361 Not tainted 4.20.0+ #4 [ 50.667043] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.676414] Call Trace: [ 50.678994] dump_stack+0x1db/0x2d0 [ 50.682608] ? dump_stack_print_info.cold+0x20/0x20 [ 50.687602] ? print_stack_trace+0x77/0xb0 [ 50.691986] ? vprintk_func+0x86/0x189 [ 50.695857] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 50.701201] __lock_acquire+0x3014/0x4a30 [ 50.705326] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.710235] ? is_bpf_text_address+0xac/0x170 [ 50.714715] ? mark_held_locks+0x100/0x100 [ 50.718932] ? mark_held_locks+0xb1/0x100 [ 50.723058] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 50.728143] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 50.733226] ? lockdep_hardirqs_on+0x415/0x5d0 [ 50.737795] ? trace_hardirqs_off_caller+0x300/0x300 [ 50.742891] ? do_raw_spin_trylock+0x270/0x270 [ 50.747449] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.752371] ? print_usage_bug+0xd0/0xd0 [ 50.756408] ? _raw_spin_unlock_irqrestore+0xa4/0xe0 [ 50.761488] ? __lock_is_held+0xb6/0x140 [ 50.765525] lock_acquire+0x1db/0x570 [ 50.769304] ? fifo_open+0x159/0xb00 [ 50.773010] ? ___might_sleep+0x1e7/0x310 [ 50.777137] ? lock_release+0xc40/0xc40 [ 50.781094] ? fifo_open+0x159/0xb00 [ 50.784787] ? fifo_open+0x159/0xb00 [ 50.788481] __mutex_lock+0x12f/0x1670 [ 50.792344] ? fifo_open+0x159/0xb00 [ 50.796038] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 50.801554] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 50.807131] ? fifo_open+0x159/0xb00 [ 50.810850] ? lockdep_init_map+0x10c/0x5b0 [ 50.815152] ? mutex_trylock+0x2d0/0x2d0 [ 50.819194] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.824106] ? __mutex_init+0x1f6/0x2a0 [ 50.828060] ? psi_task_change.cold+0x1ec/0x1ec [ 50.832714] ? fifo_open+0x2b5/0xb00 [ 50.836408] ? find_held_lock+0x35/0x120 [ 50.840448] ? fifo_open+0x2b5/0xb00 [ 50.844138] ? lock_acquire+0x1db/0x570 [ 50.848098] ? kasan_check_read+0x11/0x20 [ 50.852225] ? do_raw_spin_unlock+0xa0/0x330 [ 50.856613] ? do_raw_spin_trylock+0x270/0x270 [ 50.861175] mutex_lock_nested+0x16/0x20 [ 50.865212] ? _raw_spin_unlock+0x2d/0x50 [ 50.869337] ? mutex_lock_nested+0x16/0x20 [ 50.873549] fifo_open+0x159/0xb00 [ 50.877071] do_dentry_open+0x48a/0x1210 [ 50.881113] ? pipe_release+0x280/0x280 [ 50.885076] ? chown_common+0x740/0x740 [ 50.889033] ? security_inode_permission+0xd5/0x110 [ 50.894032] ? inode_permission+0xb4/0x570 [ 50.898250] vfs_open+0xa0/0xd0 [ 50.901508] path_openat+0x144f/0x5650 [ 50.905453] ? is_bpf_text_address+0xd3/0x170 [ 50.909938] ? kernel_text_address+0x73/0xf0 [ 50.914330] ? path_lookupat.isra.0+0xba0/0xba0 [ 50.918978] ? save_stack+0xa9/0xd0 [ 50.922582] ? __lock_acquire+0x572/0x4a30 [ 50.926808] ? __x64_sys_execve+0x8f/0xc0 [ 50.930935] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.935918] do_filp_open+0x26f/0x370 [ 50.939716] ? refcount_add_not_zero_checked+0x330/0x330 [ 50.945146] ? may_open_dev+0x100/0x100 [ 50.949102] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 50.954615] ? refcount_inc_checked+0x2b/0x70 [ 50.959083] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.964016] ? add_lock_to_list.isra.0+0x450/0x450 [ 50.968926] ? apparmor_cred_transfer+0x5b0/0x5b0 [ 50.973744] ? prepare_creds+0xa4/0x4e0 [ 50.977697] ? prepare_creds+0xa4/0x4e0 [ 50.981657] ? __do_execve_file.isra.0+0x908/0x2510 [ 50.986680] do_open_execat+0x20e/0x930 [ 50.990635] ? unregister_binfmt+0x2b0/0x2b0 [ 50.995021] ? kasan_check_read+0x11/0x20 [ 50.999146] ? do_raw_spin_trylock+0x270/0x270 [ 51.003719] ? key_put+0x36/0x90 [ 51.007068] __do_execve_file.isra.0+0x181e/0x2510 [ 51.011982] ? prepare_bprm_creds+0x120/0x120 [ 51.016472] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 51.021990] ? strncpy_from_user+0x317/0x440 [ 51.026376] ? digsig_verify.cold+0x32/0x32 [ 51.030675] ? kmem_cache_alloc+0x341/0x710 [ 51.034976] ? do_syscall_64+0x8c/0x800 [ 51.038936] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 51.044473] ? getname_flags+0x277/0x5b0 [ 51.048518] ? trace_hardirqs_off_caller+0x300/0x300 [ 51.053608] __x64_sys_execve+0x8f/0xc0 [ 51.057567] do_syscall_64+0x1a3/0x800 [ 51.061437] ? syscall_return_slowpath+0x5f0/0x5f0 [ 51.066348] ? prepare_exit_to_usermode+0x232/0x3b0 [ 51.071346] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 51.076169] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 51.081335] RIP: 0033:0x440119 [ 51.084512] 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 [ 51.103393] RSP: 002b:00007ffe81210cf8 EFLAGS: 00000217 ORIG_RAX: 000000000000003b [ 51.111354] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440119 [ 51.118603] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000340 [ 51.125850] RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 [ 51.133097] R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004019a0 [ 51.140352] R13: 0000000000401a30 R14: 0000000000000000 R15: 0000000000000000