[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 81.836061][ T27] audit: type=1800 audit(1583515555.480:25): pid=9569 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 81.856219][ T27] audit: type=1800 audit(1583515555.480:26): pid=9569 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 81.894601][ T27] audit: type=1800 audit(1583515555.490:27): pid=9569 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. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.88' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 92.562651][ T9725] [ 92.565046][ T9725] ====================================================== [ 92.572078][ T9725] WARNING: possible circular locking dependency detected [ 92.579473][ T9725] 5.6.0-rc3-next-20200225-syzkaller #0 Not tainted [ 92.585968][ T9725] ------------------------------------------------------ [ 92.593137][ T9725] syz-executor106/9725 is trying to acquire lock: [ 92.599651][ T9725] ffff88809747d2a0 (&tty->termios_rwsem){++++}, at: n_tty_receive_buf_common+0x8a/0x2b70 [ 92.609454][ T9725] [ 92.609454][ T9725] but task is already holding lock: [ 92.616798][ T9725] ffffffff8a141ca0 (sel_lock){+.+.}, at: paste_selection+0x15a/0x4d0 [ 92.624844][ T9725] [ 92.624844][ T9725] which lock already depends on the new lock. [ 92.624844][ T9725] [ 92.635226][ T9725] [ 92.635226][ T9725] the existing dependency chain (in reverse order) is: [ 92.644263][ T9725] [ 92.644263][ T9725] -> #2 (sel_lock){+.+.}: [ 92.650805][ T9725] __mutex_lock+0x156/0x13c0 [ 92.656107][ T9725] mutex_lock_nested+0x16/0x20 [ 92.661374][ T9725] set_selection_kernel+0x39d/0x13d0 [ 92.667268][ T9725] set_selection_user+0x95/0xd9 [ 92.672624][ T9725] tioclinux+0x11c/0x480 [ 92.677370][ T9725] vt_ioctl+0x1a53/0x26a0 [ 92.682201][ T9725] tty_ioctl+0xa37/0x14f0 [ 92.687219][ T9725] ksys_ioctl+0x123/0x180 [ 92.692048][ T9725] __x64_sys_ioctl+0x73/0xb0 [ 92.697151][ T9725] do_syscall_64+0xfa/0x790 [ 92.702155][ T9725] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 92.708634][ T9725] [ 92.708634][ T9725] -> #1 (console_lock){+.+.}: [ 92.715481][ T9725] console_lock+0x47/0x80 [ 92.720326][ T9725] con_flush_chars+0x3d/0xa0 [ 92.725434][ T9725] n_tty_write+0xc85/0x1080 [ 92.730538][ T9725] tty_write+0x496/0x7f0 [ 92.735294][ T9725] __vfs_write+0x8a/0x110 [ 92.740298][ T9725] vfs_write+0x268/0x5d0 [ 92.746687][ T9725] ksys_write+0x14f/0x290 [ 92.751629][ T9725] __x64_sys_write+0x73/0xb0 [ 92.756755][ T9725] do_syscall_64+0xfa/0x790 [ 92.761761][ T9725] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 92.768669][ T9725] [ 92.768669][ T9725] -> #0 (&tty->termios_rwsem){++++}: [ 92.776371][ T9725] __lock_acquire+0x29cd/0x6320 [ 92.781720][ T9725] lock_acquire+0x190/0x410 [ 92.786723][ T9725] down_read+0x95/0x440 [ 92.791404][ T9725] n_tty_receive_buf_common+0x8a/0x2b70 [ 92.797453][ T9725] n_tty_receive_buf2+0x34/0x40 [ 92.802804][ T9725] tty_ldisc_receive_buf+0xad/0x1c0 [ 92.808514][ T9725] paste_selection+0x1ff/0x4d0 [ 92.813775][ T9725] tioclinux+0x133/0x480 [ 92.818513][ T9725] vt_ioctl+0x1a53/0x26a0 [ 92.823341][ T9725] tty_ioctl+0xa37/0x14f0 [ 92.828167][ T9725] ksys_ioctl+0x123/0x180 [ 92.832992][ T9725] __x64_sys_ioctl+0x73/0xb0 [ 92.838080][ T9725] do_syscall_64+0xfa/0x790 [ 92.843129][ T9725] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 92.849523][ T9725] [ 92.849523][ T9725] other info that might help us debug this: [ 92.849523][ T9725] [ 92.859737][ T9725] Chain exists of: [ 92.859737][ T9725] &tty->termios_rwsem --> console_lock --> sel_lock [ 92.859737][ T9725] [ 92.872308][ T9725] Possible unsafe locking scenario: [ 92.872308][ T9725] [ 92.879758][ T9725] CPU0 CPU1 [ 92.885455][ T9725] ---- ---- [ 92.890812][ T9725] lock(sel_lock); [ 92.894594][ T9725] lock(console_lock); [ 92.901243][ T9725] lock(sel_lock); [ 92.907547][ T9725] lock(&tty->termios_rwsem); [ 92.912295][ T9725] [ 92.912295][ T9725] *** DEADLOCK *** [ 92.912295][ T9725] [ 92.920529][ T9725] 3 locks held by syz-executor106/9725: [ 92.926062][ T9725] #0: ffff88809747d090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 [ 92.935045][ T9725] #1: ffff8880a82f00a8 (&buf->lock){+.+.}, at: tty_buffer_lock_exclusive+0x30/0x40 [ 92.944446][ T9725] #2: ffffffff8a141ca0 (sel_lock){+.+.}, at: paste_selection+0x15a/0x4d0 [ 92.952946][ T9725] [ 92.952946][ T9725] stack backtrace: [ 92.958837][ T9725] CPU: 0 PID: 9725 Comm: syz-executor106 Not tainted 5.6.0-rc3-next-20200225-syzkaller #0 [ 92.968699][ T9725] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 92.978733][ T9725] Call Trace: [ 92.982003][ T9725] dump_stack+0x197/0x210 [ 92.986328][ T9725] print_circular_bug.isra.0.cold+0x163/0x172 [ 92.992393][ T9725] check_noncircular+0x32e/0x3e0 [ 92.997343][ T9725] ? print_circular_bug.isra.0+0x230/0x230 [ 93.003193][ T9725] ? alloc_list_entry+0xc0/0xc0 [ 93.008028][ T9725] ? mark_lock+0xc2/0x1220 [ 93.012566][ T9725] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 93.018962][ T9725] ? find_first_zero_bit+0x9a/0xc0 [ 93.024064][ T9725] __lock_acquire+0x29cd/0x6320 [ 93.028920][ T9725] ? save_trace+0x49/0x830 [ 93.033327][ T9725] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 93.039555][ T9725] ? mark_held_locks+0xf0/0xf0 [ 93.044404][ T9725] lock_acquire+0x190/0x410 [ 93.048916][ T9725] ? n_tty_receive_buf_common+0x8a/0x2b70 [ 93.054639][ T9725] down_read+0x95/0x440 [ 93.058771][ T9725] ? n_tty_receive_buf_common+0x8a/0x2b70 [ 93.064482][ T9725] ? down_read_killable+0x490/0x490 [ 93.069666][ T9725] n_tty_receive_buf_common+0x8a/0x2b70 [ 93.075193][ T9725] ? paste_selection+0x15a/0x4d0 [ 93.080109][ T9725] ? mark_lock+0xc2/0x1220 [ 93.084507][ T9725] ? mutex_trylock+0x2d0/0x2d0 [ 93.089250][ T9725] ? mark_held_locks+0xa4/0xf0 [ 93.094010][ T9725] ? lockdep_hardirqs_on+0x421/0x5e0 [ 93.099363][ T9725] n_tty_receive_buf2+0x34/0x40 [ 93.104280][ T9725] tty_ldisc_receive_buf+0xad/0x1c0 [ 93.109554][ T9725] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 93.115519][ T9725] paste_selection+0x1ff/0x4d0 [ 93.120325][ T9725] ? sel_pos+0x90/0x90 [ 93.124411][ T9725] ? lock_downgrade+0x920/0x920 [ 93.129274][ T9725] ? wake_up_q+0x140/0x140 [ 93.133718][ T9725] tioclinux+0x133/0x480 [ 93.137952][ T9725] vt_ioctl+0x1a53/0x26a0 [ 93.142264][ T9725] ? complete_change_console+0x3a0/0x3a0 [ 93.147879][ T9725] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 93.153667][ T9725] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 93.159554][ T9725] ? tty_jobctrl_ioctl+0x50/0xd40 [ 93.164570][ T9725] ? complete_change_console+0x3a0/0x3a0 [ 93.170206][ T9725] tty_ioctl+0xa37/0x14f0 [ 93.174525][ T9725] ? tty_vhangup+0x30/0x30 [ 93.178938][ T9725] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 93.185153][ T9725] ? do_vfs_ioctl+0x568/0x13b0 [ 93.189899][ T9725] ? ioctl_file_clone+0x180/0x180 [ 93.194903][ T9725] ? file_open_root+0x430/0x430 [ 93.199990][ T9725] ? tomoyo_file_ioctl+0x23/0x30 [ 93.204946][ T9725] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 93.211248][ T9725] ? security_file_ioctl+0x8d/0xc0 [ 93.216371][ T9725] ? tty_vhangup+0x30/0x30 [ 93.220867][ T9725] ksys_ioctl+0x123/0x180 [ 93.225198][ T9725] __x64_sys_ioctl+0x73/0xb0 [ 93.229862][ T9725] do_syscall_64+0xfa/0x790 [ 93.234371][ T9725] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 93.240258][ T9725] RIP: 0033:0x440269 [ 93.244234][ T9725] 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 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 93.263890][ T9725]