[ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.164' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.648404] FAULT_INJECTION: forcing a failure. [ 32.648404] name failslab, interval 1, probability 0, space 0, times 1 [ 32.660418] CPU: 1 PID: 8103 Comm: syz-executor343 Not tainted 4.19.211-syzkaller #0 [ 32.668273] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.677611] Call Trace: [ 32.680181] dump_stack+0x1fc/0x2ef [ 32.683789] should_fail.cold+0xa/0xf [ 32.687572] ? setup_fault_attr+0x200/0x200 [ 32.691873] ? __lock_acquire+0x6de/0x3ff0 [ 32.696115] ? mark_held_locks+0xf0/0xf0 [ 32.700158] __should_failslab+0x115/0x180 [ 32.704386] should_failslab+0x5/0x10 [ 32.708168] __kmalloc+0x6d/0x3c0 [ 32.711601] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.715901] tty_buffer_alloc+0x23f/0x2a0 [ 32.720027] __tty_buffer_request_room+0x156/0x2a0 [ 32.724937] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.730456] ? do_raw_spin_lock+0xcb/0x220 [ 32.734671] pty_write+0x126/0x1f0 [ 32.738195] tty_send_xchar+0x28d/0x3b0 [ 32.742149] ? tty_write_message+0x140/0x140 [ 32.746541] ? _kstrtoull+0x297/0x540 [ 32.750322] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.754627] n_tty_ioctl+0x56/0x360 [ 32.758232] tty_ioctl+0x65d/0x1630 [ 32.761836] ? n_tty_poll+0x8f0/0x8f0 [ 32.765618] ? tty_fasync+0x300/0x300 [ 32.769398] ? get_pid_task+0xf4/0x190 [ 32.773288] ? proc_fail_nth_write+0x95/0x1d0 [ 32.777761] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.782670] ? debug_check_no_obj_freed+0x201/0x490 [ 32.787665] ? __vfs_write+0xff/0x770 [ 32.791440] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.796348] ? common_file_perm+0x4e5/0x850 [ 32.800652] ? tty_fasync+0x300/0x300 [ 32.804433] do_vfs_ioctl+0xcdb/0x12e0 [ 32.808296] ? vfs_write+0x3d7/0x540 [ 32.811987] ? ioctl_preallocate+0x200/0x200 [ 32.816373] ? lock_downgrade+0x720/0x720 [ 32.820500] ? check_preemption_disabled+0x41/0x280 [ 32.825504] ? vfs_write+0x393/0x540 [ 32.829200] ? ksys_write+0x1c8/0x2a0 [ 32.832977] ksys_ioctl+0x9b/0xc0 [ 32.836408] __x64_sys_ioctl+0x6f/0xb0 [ 32.840275] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 32.844834] do_syscall_64+0xf9/0x620 [ 32.848619] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.853785] RIP: 0033:0x7f8d4e853699 [ 32.857495] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 32.876394] RSP: 002b:00007ffdee30c898 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 32.884079] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8d4e853699 [ 32.891325] RDX: 0000000000000003 RSI: 000000000000540a RDI: 0000000000000003 [ 32.898571] RBP: 00007ffdee30c8a0 R08: 0000000000000001 R09: 00007f8d4e810031 [ 32.905813] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 32.913058] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.920311] [ 32.920314] ====================================================== [ 32.920317] WARNING: possible circular locking dependency detected [ 32.920319] 4.19.211-syzkaller #0 Not tainted [ 32.920322] ------------------------------------------------------ [ 32.920324] syz-executor343/8103 is trying to acquire lock: [ 32.920326] 000000002ebc8472 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 32.920334] [ 32.920336] but task is already holding lock: [ 32.920337] 00000000564f884c (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.920345] [ 32.920347] which lock already depends on the new lock. [ 32.920348] [ 32.920349] [ 32.920352] the existing dependency chain (in reverse order) is: [ 32.920353] [ 32.920354] -> #2 (&(&port->lock)->rlock){-.-.}: [ 32.920362] tty_port_tty_get+0x1d/0x80 [ 32.920364] tty_port_default_wakeup+0x11/0x40 [ 32.920366] serial8250_tx_chars+0x490/0xaf0 [ 32.920368] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 32.920371] serial8250_default_handle_irq+0xae/0x220 [ 32.920373] serial8250_interrupt+0x101/0x240 [ 32.920376] __handle_irq_event_percpu+0x27e/0x8e0 [ 32.920378] handle_irq_event+0x102/0x290 [ 32.920380] handle_edge_irq+0x260/0xcf0 [ 32.920382] handle_irq+0x35/0x50 [ 32.920383] do_IRQ+0x93/0x1c0 [ 32.920385] ret_from_intr+0x0/0x1e [ 32.920388] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 32.920390] uart_write+0x3bb/0x6f0 [ 32.920392] do_output_char+0x5de/0x850 [ 32.920394] n_tty_write+0x46e/0xff0 [ 32.920395] tty_write+0x496/0x810 [ 32.920398] redirected_tty_write+0xaa/0xb0 [ 32.920400] do_iter_write+0x461/0x5d0 [ 32.920402] vfs_writev+0x153/0x2e0 [ 32.920403] do_writev+0x136/0x330 [ 32.920405] do_syscall_64+0xf9/0x620 [ 32.920408] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.920409] [ 32.920410] -> #1 (&port_lock_key){-.-.}: [ 32.920417] serial8250_console_write+0x90e/0xb70 [ 32.920419] console_unlock+0xbb6/0x1110 [ 32.920421] vprintk_emit+0x2d1/0x740 [ 32.920423] vprintk_func+0x79/0x180 [ 32.920425] printk+0xba/0xed [ 32.920427] register_console+0x87f/0xc90 [ 32.920429] univ8250_console_init+0x3a/0x46 [ 32.920431] console_init+0x4cb/0x718 [ 32.920433] start_kernel+0x686/0x911 [ 32.920435] secondary_startup_64+0xa4/0xb0 [ 32.920437] [ 32.920438] -> #0 (console_owner){....}: [ 32.920445] console_unlock+0x411/0x1110 [ 32.920447] vprintk_emit+0x2d1/0x740 [ 32.920449] vprintk_func+0x79/0x180 [ 32.920451] printk+0xba/0xed [ 32.920453] should_fail+0x66b/0x7b0 [ 32.920455] __should_failslab+0x115/0x180 [ 32.920457] should_failslab+0x5/0x10 [ 32.920459] __kmalloc+0x6d/0x3c0 [ 32.920461] tty_buffer_alloc+0x23f/0x2a0 [ 32.920463] __tty_buffer_request_room+0x156/0x2a0 [ 32.920466] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.920468] pty_write+0x126/0x1f0 [ 32.920470] tty_send_xchar+0x28d/0x3b0 [ 32.920472] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.920474] n_tty_ioctl+0x56/0x360 [ 32.920476] tty_ioctl+0x65d/0x1630 [ 32.920478] do_vfs_ioctl+0xcdb/0x12e0 [ 32.920480] ksys_ioctl+0x9b/0xc0 [ 32.920482] __x64_sys_ioctl+0x6f/0xb0 [ 32.920484] do_syscall_64+0xf9/0x620 [ 32.920486] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.920487] [ 32.920490] other info that might help us debug this: [ 32.920491] [ 32.920493] Chain exists of: [ 32.920495] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 32.920509] [ 32.920512] Possible unsafe locking scenario: [ 32.920513] [ 32.920515] CPU0 CPU1 [ 32.920517] ---- ---- [ 32.920518] lock(&(&port->lock)->rlock); [ 32.920523] lock(&port_lock_key); [ 32.920528] lock(&(&port->lock)->rlock); [ 32.920532] lock(console_owner); [ 32.920536] [ 32.920537] *** DEADLOCK *** [ 32.920538] [ 32.920540] 5 locks held by syz-executor343/8103: [ 32.920542] #0: 00000000e33a600e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 32.920550] #1: 00000000f393afb7 (&tty->atomic_write_lock){+.+.}, at: tty_send_xchar+0x1d9/0x3b0 [ 32.920559] #2: 00000000e6a092bf (&tty->termios_rwsem){++++}, at: tty_send_xchar+0x226/0x3b0 [ 32.920567] #3: 00000000564f884c (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.920576] #4: 000000005f6ea55a (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 32.920584] [ 32.920586] stack backtrace: [ 32.920589] CPU: 1 PID: 8103 Comm: syz-executor343 Not tainted 4.19.211-syzkaller #0 [ 32.920593] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.920594] Call Trace: [ 32.920596] dump_stack+0x1fc/0x2ef [ 32.920599] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 32.920601] __lock_acquire+0x30c9/0x3ff0 [ 32.920603] ? mark_held_locks+0xf0/0xf0 [ 32.920605] ? snprintf+0xf0/0xf0 [ 32.920607] ? console_unlock+0x3ec/0x1110 [ 32.920609] lock_acquire+0x170/0x3c0 [ 32.920611] ? console_unlock+0x3a9/0x1110 [ 32.920613] console_unlock+0x411/0x1110 [ 32.920615] ? console_unlock+0x3a9/0x1110 [ 32.920618] vprintk_emit+0x2d1/0x740 [ 32.920620] vprintk_func+0x79/0x180 [ 32.920621] printk+0xba/0xed [ 32.920623] ? log_store.cold+0x16/0x16 [ 32.920625] ? __lock_acquire+0x22f9/0x3ff0 [ 32.920627] ? ___ratelimit+0x319/0x590 [ 32.920629] should_fail+0x66b/0x7b0 [ 32.920632] ? setup_fault_attr+0x200/0x200 [ 32.920634] ? __lock_acquire+0x6de/0x3ff0 [ 32.920636] ? mark_held_locks+0xf0/0xf0 [ 32.920638] __should_failslab+0x115/0x180 [ 32.920640] should_failslab+0x5/0x10 [ 32.920642] __kmalloc+0x6d/0x3c0 [ 32.920644] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.920646] tty_buffer_alloc+0x23f/0x2a0 [ 32.920648] __tty_buffer_request_room+0x156/0x2a0 [ 32.920651] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.920653] ? do_raw_spin_lock+0xcb/0x220 [ 32.920655] pty_write+0x126/0x1f0 [ 32.920657] tty_send_xchar+0x28d/0x3b0 [ 32.920659] ? tty_write_message+0x140/0x140 [ 32.920661] ? _kstrtoull+0x297/0x540 [ 32.920663] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.920665] n_tty_ioctl+0x56/0x360 [ 32.920667] tty_ioctl+0x65d/0x1630 [ 32.920669] ? n_tty_poll+0x8f0/0x8f0 [ 32.920671] ? tty_fasync+0x300/0x300 [ 32.920673] ? get_pid_task+0xf4/0x190 [ 32.920675] ? proc_fail_nth_write+0x95/0x1d0 [ 32.920677] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.920680] ? debug_check_no_obj_freed+0x201/0x490 [ 32.920682] ? __vfs_write+0xff/0x770 [ 32.920684] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.920686] ? common_file_perm+0x4e5/0x850 [ 32.920688] ? tty_fasync+0x300/0x300 [ 32.920690] do_vfs_ioctl+0xcdb/0x12e0 [ 32.920692] ? vfs_write+0x3d7/0x540 [ 32.920694] ? ioctl_preallocate+0x200/0x200 [ 32.920696] ? lock_downgrade+0x720/0x720 [ 32.920699] ? check_preemption_disabled+0x41/0x280 [ 32.920701] ? vfs_write+0x393/0x540 [ 32.920703] ? ksys_write+0x1c8/0x2a0 [ 32.920705] ksys_ioctl+0x9b/0xc0 [ 32.920707] __x64_sys_ioctl+0x6f/0xb0 [ 32.920709] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 32.920711] do_syscall_64+0xf9/0x620 [ 32.920713] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.920715] RIP: 0033:0x7f8d4e853699 [ 32.920722] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 32.920725] RSP: 002b:00007ffdee30c898 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 32.920730] RAX: ffffffffffffffda RBX: 0000