[ 37.265796] audit: type=1800 audit(1550596133.994:30): pid=7575 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.183' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 59.904835] [ 59.906491] ====================================================== [ 59.912788] WARNING: possible circular locking dependency detected [ 59.919095] 5.0.0-rc7+ #78 Not tainted [ 59.922959] ------------------------------------------------------ [ 59.929258] syz-executor928/7730 is trying to acquire lock: [ 59.934942] 000000000aa43d95 (&sig->cred_guard_mutex){+.+.}, at: proc_pid_attr_write+0x1fa/0x530 [ 59.943907] [ 59.943907] but task is already holding lock: [ 59.949872] 0000000089303108 (&pipe->mutex/1){+.+.}, at: pipe_lock+0x6e/0x80 [ 59.957299] [ 59.957299] which lock already depends on the new lock. [ 59.957299] [ 59.965601] [ 59.965601] the existing dependency chain (in reverse order) is: [ 59.973202] [ 59.973202] -> #1 (&pipe->mutex/1){+.+.}: [ 59.978832] __mutex_lock+0xf7/0x1310 [ 59.983154] mutex_lock_nested+0x16/0x20 [ 59.987730] fifo_open+0x159/0xb00 [ 59.991771] do_dentry_open+0x47d/0x1130 [ 59.996355] vfs_open+0xa0/0xd0 [ 60.000159] path_openat+0x10d7/0x4690 [ 60.004550] do_filp_open+0x1a1/0x280 [ 60.008950] do_open_execat+0x13b/0x6d0 [ 60.013428] __do_execve_file.isra.0+0x178d/0x23f0 [ 60.018865] __x64_sys_execve+0x8f/0xc0 [ 60.023344] do_syscall_64+0x103/0x610 [ 60.027735] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 60.033425] [ 60.033425] -> #0 (&sig->cred_guard_mutex){+.+.}: [ 60.039741] lock_acquire+0x16f/0x3f0 [ 60.044047] __mutex_lock+0xf7/0x1310 [ 60.048357] mutex_lock_interruptible_nested+0x16/0x20 [ 60.054144] proc_pid_attr_write+0x1fa/0x530 [ 60.059321] __vfs_write+0x116/0x8e0 [ 60.063541] __kernel_write+0x110/0x3b0 [ 60.068035] write_pipe_buf+0x15d/0x1f0 [ 60.072525] __splice_from_pipe+0x39a/0x7e0 [ 60.077363] splice_from_pipe+0x108/0x170 [ 60.082028] default_file_splice_write+0x3c/0x90 [ 60.087306] do_splice+0x644/0x1330 [ 60.091450] __x64_sys_splice+0x2c6/0x330 [ 60.096113] do_syscall_64+0x103/0x610 [ 60.100520] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 60.106214] [ 60.106214] other info that might help us debug this: [ 60.106214] [ 60.114349] Possible unsafe locking scenario: [ 60.114349] [ 60.120392] CPU0 CPU1 [ 60.125044] ---- ---- [ 60.129697] lock(&pipe->mutex/1); [ 60.133318] lock(&sig->cred_guard_mutex); [ 60.140149] lock(&pipe->mutex/1); [ 60.146285] lock(&sig->cred_guard_mutex); [ 60.150605] [ 60.150605] *** DEADLOCK *** [ 60.150605] [ 60.156675] 2 locks held by syz-executor928/7730: [ 60.161499] #0: 00000000d3a26696 (sb_writers#6){.+.+}, at: do_splice+0xceb/0x1330 [ 60.169219] #1: 0000000089303108 (&pipe->mutex/1){+.+.}, at: pipe_lock+0x6e/0x80 [ 60.176868] [ 60.176868] stack backtrace: [ 60.181363] CPU: 0 PID: 7730 Comm: syz-executor928 Not tainted 5.0.0-rc7+ #78 [ 60.188628] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 60.197977] Call Trace: [ 60.200566] dump_stack+0x172/0x1f0 [ 60.204191] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 60.209550] __lock_acquire+0x2f00/0x4700 [ 60.213695] ? trace_hardirqs_on+0x67/0x230 [ 60.218011] ? kasan_check_read+0x11/0x20 [ 60.222165] ? mark_held_locks+0x100/0x100 [ 60.226396] ? __kmalloc_track_caller+0x158/0x740 [ 60.231239] ? memdup_user+0x26/0xb0 [ 60.234953] ? proc_pid_attr_write+0x196/0x530 [ 60.239531] ? __vfs_write+0x116/0x8e0 [ 60.243416] ? __kernel_write+0x110/0x3b0 [ 60.247561] ? write_pipe_buf+0x15d/0x1f0 [ 60.251705] ? __splice_from_pipe+0x39a/0x7e0 [ 60.256197] ? __lock_is_held+0xb6/0x140 [ 60.260433] ? proc_pid_attr_write+0x1fa/0x530 [ 60.265014] lock_acquire+0x16f/0x3f0 [ 60.268813] ? proc_pid_attr_write+0x1fa/0x530 [ 60.273395] ? proc_pid_attr_write+0x1fa/0x530 [ 60.277975] __mutex_lock+0xf7/0x1310 [ 60.281772] ? proc_pid_attr_write+0x1fa/0x530 [ 60.286356] ? proc_pid_attr_write+0x1fa/0x530 [ 60.290934] ? check_preemption_disabled+0x48/0x290 [ 60.295949] ? mutex_trylock+0x1e0/0x1e0 [ 60.300008] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 60.305456] ? check_stack_object+0x114/0x160 [ 60.309950] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 60.315480] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 60.321013] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 60.326547] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 60.332090] ? _copy_from_user+0xdd/0x150 [ 60.336238] mutex_lock_interruptible_nested+0x16/0x20 [ 60.341511] ? mutex_lock_interruptible_nested+0x16/0x20 [ 60.346961] proc_pid_attr_write+0x1fa/0x530 [ 60.351365] __vfs_write+0x116/0x8e0 [ 60.355074] ? proc_loginuid_write+0x4d0/0x4d0 [ 60.359653] ? kernel_read+0x120/0x120 [ 60.363535] ? lock_pi_update_atomic+0x120/0x120 [ 60.368593] ? __lock_is_held+0xb6/0x140 [ 60.372631] ? lock_acquire+0x16f/0x3f0 [ 60.376585] __kernel_write+0x110/0x3b0 [ 60.380542] write_pipe_buf+0x15d/0x1f0 [ 60.384496] ? do_splice_direct+0x2a0/0x2a0 [ 60.388797] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 60.394337] ? splice_from_pipe_next.part.0+0x255/0x2f0 [ 60.399709] __splice_from_pipe+0x39a/0x7e0 [ 60.404030] ? do_splice_direct+0x2a0/0x2a0 [ 60.408355] ? do_splice_direct+0x2a0/0x2a0 [ 60.412670] splice_from_pipe+0x108/0x170 [ 60.416824] ? splice_shrink_spd+0xd0/0xd0 [ 60.421063] ? __lock_is_held+0xb6/0x140 [ 60.425122] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 60.430574] default_file_splice_write+0x3c/0x90 [ 60.435327] ? generic_splice_sendpage+0x50/0x50 [ 60.440079] do_splice+0x644/0x1330 [ 60.443702] ? iterate_fd+0x360/0x360 [ 60.447504] ? opipe_prep.part.0+0x2d0/0x2d0 [ 60.451912] ? __fget_light+0x1a9/0x230 [ 60.455889] __x64_sys_splice+0x2c6/0x330 [ 60.460046] do_syscall_64+0x103/0x610 [ 60.463936] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 60.469120] RIP: 0033:0x445779 [ 60.472306] 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 [ 60.491213] RSP: 002b:00007f66c0753da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 [ 60.498923] RAX: ffffffffffffffda RBX: 00000000006dac68 RCX: 0000000000445779 [ 60.506189] RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003 [ 60.513456] RBP: 00000000006dac60 R08: 0000020000000003 R09: 0000000000000009 [ 60.520725] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac6c [ 60.527990] R13: 00007ffc286d7cdf R14: 00007f66c07549c0 R15: 20c49ba5e353f7cf