[ OK ] Started Getty on tty4. [ OK ] Started Getty on tty3. [ OK ] Started Getty on tty2. [ 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. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.1' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.672782] FAULT_INJECTION: forcing a failure. [ 32.672782] name failslab, interval 1, probability 0, space 0, times 1 [ 32.684839] CPU: 0 PID: 8103 Comm: syz-executor648 Not tainted 4.19.211-syzkaller #0 [ 32.692701] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.702036] Call Trace: [ 32.704609] dump_stack+0x1fc/0x2ef [ 32.708217] should_fail.cold+0xa/0xf [ 32.712001] ? setup_fault_attr+0x200/0x200 [ 32.716303] ? __lock_acquire+0x6de/0x3ff0 [ 32.720520] ? mark_held_locks+0xf0/0xf0 [ 32.724562] __should_failslab+0x115/0x180 [ 32.728779] should_failslab+0x5/0x10 [ 32.732558] __kmalloc+0x6d/0x3c0 [ 32.735993] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.740294] tty_buffer_alloc+0x23f/0x2a0 [ 32.744430] __tty_buffer_request_room+0x156/0x2a0 [ 32.749341] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.754861] ? do_raw_spin_lock+0xcb/0x220 [ 32.759077] pty_write+0x126/0x1f0 [ 32.762600] tty_send_xchar+0x28d/0x3b0 [ 32.766554] ? tty_write_message+0x140/0x140 [ 32.770944] ? _kstrtoull+0x297/0x540 [ 32.774724] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.779025] n_tty_ioctl+0x56/0x360 [ 32.782634] tty_ioctl+0x65d/0x1630 [ 32.786244] ? n_tty_poll+0x8f0/0x8f0 [ 32.790026] ? tty_fasync+0x300/0x300 [ 32.793812] ? get_pid_task+0xf4/0x190 [ 32.797680] ? proc_fail_nth_write+0x95/0x1d0 [ 32.802157] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.807070] ? debug_check_no_obj_freed+0x201/0x490 [ 32.812065] ? __vfs_write+0xff/0x770 [ 32.815845] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.820754] ? common_file_perm+0x4e5/0x850 [ 32.825056] ? tty_fasync+0x300/0x300 [ 32.828837] do_vfs_ioctl+0xcdb/0x12e0 [ 32.832706] ? vfs_write+0x3d7/0x540 [ 32.836405] ? ioctl_preallocate+0x200/0x200 [ 32.840797] ? lock_downgrade+0x720/0x720 [ 32.844947] ? check_preemption_disabled+0x41/0x280 [ 32.849951] ? vfs_write+0x393/0x540 [ 32.853647] ? ksys_write+0x1c8/0x2a0 [ 32.857426] ksys_ioctl+0x9b/0xc0 [ 32.860865] __x64_sys_ioctl+0x6f/0xb0 [ 32.864734] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 32.869297] do_syscall_64+0xf9/0x620 [ 32.873081] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.878251] RIP: 0033:0x7f144f739679 [ 32.881945] 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.900826] RSP: 002b:00007ffcc990f508 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 32.908519] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f144f739679 [ 32.915774] RDX: 0000000000000003 RSI: 000000000000540a RDI: 0000000000000003 [ 32.923026] RBP: 00007ffcc990f510 R08: 0000000000000001 R09: 00007f144f6f0031 [ 32.930274] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 32.937526] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.944790] [ 32.944794] ====================================================== [ 32.944797] WARNING: possible circular locking dependency detected [ 32.944799] 4.19.211-syzkaller #0 Not tainted [ 32.944802] ------------------------------------------------------ [ 32.944804] syz-executor648/8103 is trying to acquire lock: [ 32.944806] 00000000f6efea91 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 32.944813] [ 32.944816] but task is already holding lock: [ 32.944817] 0000000049a56c67 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.944824] [ 32.944827] which lock already depends on the new lock. [ 32.944828] [ 32.944829] [ 32.944836] the existing dependency chain (in reverse order) is: [ 32.944837] [ 32.944838] -> #2 (&(&port->lock)->rlock){-.-.}: [ 32.944845] tty_port_tty_get+0x1d/0x80 [ 32.944847] tty_port_default_wakeup+0x11/0x40 [ 32.944850] serial8250_tx_chars+0x490/0xaf0 [ 32.944852] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 32.944854] serial8250_default_handle_irq+0xae/0x220 [ 32.944857] serial8250_interrupt+0x101/0x240 [ 32.944859] __handle_irq_event_percpu+0x27e/0x8e0 [ 32.944861] handle_irq_event+0x102/0x290 [ 32.944863] handle_edge_irq+0x260/0xcf0 [ 32.944865] handle_irq+0x35/0x50 [ 32.944867] do_IRQ+0x93/0x1c0 [ 32.944869] ret_from_intr+0x0/0x1e [ 32.944871] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 32.944873] uart_write+0x3bb/0x6f0 [ 32.944875] do_output_char+0x5de/0x850 [ 32.944877] n_tty_write+0x46e/0xff0 [ 32.944879] tty_write+0x496/0x810 [ 32.944881] redirected_tty_write+0xaa/0xb0 [ 32.944883] do_iter_write+0x461/0x5d0 [ 32.944885] vfs_writev+0x153/0x2e0 [ 32.944887] do_writev+0x136/0x330 [ 32.944889] do_syscall_64+0xf9/0x620 [ 32.944891] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.944892] [ 32.944894] -> #1 (&port_lock_key){-.-.}: [ 32.944901] serial8250_console_write+0x90e/0xb70 [ 32.944903] console_unlock+0xbb6/0x1110 [ 32.944905] vprintk_emit+0x2d1/0x740 [ 32.944907] vprintk_func+0x79/0x180 [ 32.944909] printk+0xba/0xed [ 32.944911] register_console+0x87f/0xc90 [ 32.944913] univ8250_console_init+0x3a/0x46 [ 32.944915] console_init+0x4cb/0x718 [ 32.944917] start_kernel+0x686/0x911 [ 32.944919] secondary_startup_64+0xa4/0xb0 [ 32.944920] [ 32.944921] -> #0 (console_owner){....}: [ 32.944928] console_unlock+0x411/0x1110 [ 32.944930] vprintk_emit+0x2d1/0x740 [ 32.944932] vprintk_func+0x79/0x180 [ 32.944934] printk+0xba/0xed [ 32.944936] should_fail+0x66b/0x7b0 [ 32.944938] __should_failslab+0x115/0x180 [ 32.944940] should_failslab+0x5/0x10 [ 32.944942] __kmalloc+0x6d/0x3c0 [ 32.944944] tty_buffer_alloc+0x23f/0x2a0 [ 32.944946] __tty_buffer_request_room+0x156/0x2a0 [ 32.944949] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.944951] pty_write+0x126/0x1f0 [ 32.944953] tty_send_xchar+0x28d/0x3b0 [ 32.944955] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.944957] n_tty_ioctl+0x56/0x360 [ 32.944959] tty_ioctl+0x65d/0x1630 [ 32.944961] do_vfs_ioctl+0xcdb/0x12e0 [ 32.944963] ksys_ioctl+0x9b/0xc0 [ 32.944965] __x64_sys_ioctl+0x6f/0xb0 [ 32.944967] do_syscall_64+0xf9/0x620 [ 32.944969] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.944970] [ 32.944973] other info that might help us debug this: [ 32.944974] [ 32.944975] Chain exists of: [ 32.944976] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 32.944986] [ 32.944988] Possible unsafe locking scenario: [ 32.944989] [ 32.944991] CPU0 CPU1 [ 32.944993] ---- ---- [ 32.944994] lock(&(&port->lock)->rlock); [ 32.944999] lock(&port_lock_key); [ 32.945004] lock(&(&port->lock)->rlock); [ 32.945008] lock(console_owner); [ 32.945012] [ 32.945013] *** DEADLOCK *** [ 32.945014] [ 32.945017] 5 locks held by syz-executor648/8103: [ 32.945018] #0: 00000000723d7733 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 32.945026] #1: 0000000090e60872 (&tty->atomic_write_lock){+.+.}, at: tty_send_xchar+0x1d9/0x3b0 [ 32.945035] #2: 0000000016e188a8 (&tty->termios_rwsem){++++}, at: tty_send_xchar+0x226/0x3b0 [ 32.945044] #3: 0000000049a56c67 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.945052] #4: 000000004275becd (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 32.945060] [ 32.945062] stack backtrace: [ 32.945065] CPU: 0 PID: 8103 Comm: syz-executor648 Not tainted 4.19.211-syzkaller #0 [ 32.945069] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.945071] Call Trace: [ 32.945072] dump_stack+0x1fc/0x2ef [ 32.945075] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 32.945077] __lock_acquire+0x30c9/0x3ff0 [ 32.945079] ? mark_held_locks+0xf0/0xf0 [ 32.945081] ? snprintf+0xf0/0xf0 [ 32.945083] ? console_unlock+0x3ec/0x1110 [ 32.945085] lock_acquire+0x170/0x3c0 [ 32.945087] ? console_unlock+0x3a9/0x1110 [ 32.945089] console_unlock+0x411/0x1110 [ 32.945091] ? console_unlock+0x3a9/0x1110 [ 32.945093] vprintk_emit+0x2d1/0x740 [ 32.945095] vprintk_func+0x79/0x180 [ 32.945097] printk+0xba/0xed [ 32.945099] ? log_store.cold+0x16/0x16 [ 32.945101] ? __lock_acquire+0x22f9/0x3ff0 [ 32.945103] ? ___ratelimit+0x319/0x590 [ 32.945105] should_fail+0x66b/0x7b0 [ 32.945107] ? setup_fault_attr+0x200/0x200 [ 32.945109] ? __lock_acquire+0x6de/0x3ff0 [ 32.945111] ? mark_held_locks+0xf0/0xf0 [ 32.945114] __should_failslab+0x115/0x180 [ 32.945116] should_failslab+0x5/0x10 [ 32.945117] __kmalloc+0x6d/0x3c0 [ 32.945120] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.945122] tty_buffer_alloc+0x23f/0x2a0 [ 32.945124] __tty_buffer_request_room+0x156/0x2a0 [ 32.945127] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.945129] ? do_raw_spin_lock+0xcb/0x220 [ 32.945131] pty_write+0x126/0x1f0 [ 32.945133] tty_send_xchar+0x28d/0x3b0 [ 32.945135] ? tty_write_message+0x140/0x140 [ 32.945137] ? _kstrtoull+0x297/0x540 [ 32.945139] n_tty_ioctl_helper+0x18d/0x3a0 [ 32.945141] n_tty_ioctl+0x56/0x360 [ 32.945143] tty_ioctl+0x65d/0x1630 [ 32.945145] ? n_tty_poll+0x8f0/0x8f0 [ 32.945147] ? tty_fasync+0x300/0x300 [ 32.945149] ? get_pid_task+0xf4/0x190 [ 32.945151] ? proc_fail_nth_write+0x95/0x1d0 [ 32.945153] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.945156] ? debug_check_no_obj_freed+0x201/0x490 [ 32.945158] ? __vfs_write+0xff/0x770 [ 32.945160] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 32.945162] ? common_file_perm+0x4e5/0x850 [ 32.945164] ? tty_fasync+0x300/0x300 [ 32.945166] do_vfs_ioctl+0xcdb/0x12e0 [ 32.945168] ? vfs_write+0x3d7/0x540 [ 32.945170] ? ioctl_preallocate+0x200/0x200 [ 32.945172] ? lock_downgrade+0x720/0x720 [ 32.945175] ? check_preemption_disabled+0x41/0x280 [ 32.945176] ? vfs_write+0x393/0x540 [ 32.945178] ? ksys_write+0x1c8/0x2a0 [ 32.945180] ksys_ioctl+0x9b/0xc0 [ 32.945182] __x64_sys_ioctl+0x6f/0xb0 [ 32.945185] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 32.945186] do_syscall_64+0xf9/0x620 [ 32.945189] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.945191] RIP: 0033:0x7f144f739679 [ 32.945198] 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.945200] RSP: 002b:00007ffcc990f508 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 32.945205] RAX: ffffffffffffff