[ 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.74' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.898358] FAULT_INJECTION: forcing a failure. [ 32.898358] name failslab, interval 1, probability 0, space 0, times 1 [ 32.910429] CPU: 0 PID: 8101 Comm: syz-executor226 Not tainted 4.19.211-syzkaller #0 [ 32.918286] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.927705] Call Trace: [ 32.930272] dump_stack+0x1fc/0x2ef [ 32.933882] should_fail.cold+0xa/0xf [ 32.937662] ? setup_fault_attr+0x200/0x200 [ 32.941959] ? mark_held_locks+0xf0/0xf0 [ 32.945997] ? mark_held_locks+0xf0/0xf0 [ 32.950038] __should_failslab+0x115/0x180 [ 32.954338] should_failslab+0x5/0x10 [ 32.958119] __kmalloc+0x6d/0x3c0 [ 32.961547] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.965843] tty_buffer_alloc+0x23f/0x2a0 [ 32.969973] __tty_buffer_request_room+0x156/0x2a0 [ 32.974880] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.980395] ? do_raw_spin_lock+0xcb/0x220 [ 32.984608] pty_write+0x126/0x1f0 [ 32.988127] ? trace_hardirqs_off+0x64/0x200 [ 32.992514] tty_put_char+0x122/0x150 [ 32.996290] ? dev_match_devt+0x90/0x90 [ 33.000241] ? tty_buffer_space_avail+0x7e/0xb0 [ 33.004885] ? pty_write_room+0xbe/0xe0 [ 33.008836] ? ptmx_open+0x350/0x350 [ 33.012525] __process_echoes+0x577/0x9f0 [ 33.016652] ? mark_held_locks+0xa6/0xf0 [ 33.020694] process_echoes+0xf9/0x1c0 [ 33.024558] n_tty_receive_char_special+0x1149/0x29a0 [ 33.029721] ? n_tty_receive_buf_common+0x84/0x2a90 [ 33.034715] n_tty_receive_buf_common+0x1f5a/0x2a90 [ 33.039708] ? n_tty_receive_buf2+0x40/0x40 [ 33.044008] tty_ioctl+0x1026/0x1630 [ 33.047697] ? tty_fasync+0x300/0x300 [ 33.051475] ? get_pid_task+0xf4/0x190 [ 33.055339] ? proc_fail_nth_write+0x95/0x1d0 [ 33.059809] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 33.064716] ? debug_check_no_obj_freed+0x201/0x490 [ 33.069707] ? __vfs_write+0xff/0x770 [ 33.073485] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 33.078406] ? common_file_perm+0x4e5/0x850 [ 33.082705] ? tty_fasync+0x300/0x300 [ 33.086482] do_vfs_ioctl+0xcdb/0x12e0 [ 33.090346] ? vfs_write+0x3d7/0x540 [ 33.094038] ? ioctl_preallocate+0x200/0x200 [ 33.098425] ? lock_downgrade+0x720/0x720 [ 33.102553] ? check_preemption_disabled+0x41/0x280 [ 33.107546] ? vfs_write+0x393/0x540 [ 33.111239] ? ksys_write+0x1c8/0x2a0 [ 33.115020] ksys_ioctl+0x9b/0xc0 [ 33.118457] __x64_sys_ioctl+0x6f/0xb0 [ 33.122323] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 33.126881] do_syscall_64+0xf9/0x620 [ 33.130659] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.135823] RIP: 0033:0x7f03ebe0f7c9 [ 33.139515] 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 [ 33.158392] RSP: 002b:00007fff9b240d38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 33.166075] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f03ebe0f7c9 [ 33.173325] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 33.180568] RBP: 00007fff9b240d50 R08: 0000000000000001 R09: 0000000000000001 [ 33.187812] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 33.195068] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 33.202329] [ 33.202332] ====================================================== [ 33.202335] WARNING: possible circular locking dependency detected [ 33.202338] 4.19.211-syzkaller #0 Not tainted [ 33.202340] ------------------------------------------------------ [ 33.202343] syz-executor226/8101 is trying to acquire lock: [ 33.202345] 00000000e890ed60 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 33.202352] [ 33.202354] but task is already holding lock: [ 33.202356] 0000000014d7649b (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 33.202363] [ 33.202366] which lock already depends on the new lock. [ 33.202367] [ 33.202368] [ 33.202371] the existing dependency chain (in reverse order) is: [ 33.202372] [ 33.202373] -> #2 (&(&port->lock)->rlock){-.-.}: [ 33.202380] tty_port_tty_get+0x1d/0x80 [ 33.202382] tty_port_default_wakeup+0x11/0x40 [ 33.202385] serial8250_tx_chars+0x490/0xaf0 [ 33.202387] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 33.202390] serial8250_default_handle_irq+0xae/0x220 [ 33.202392] serial8250_interrupt+0x101/0x240 [ 33.202394] __handle_irq_event_percpu+0x27e/0x8e0 [ 33.202396] handle_irq_event+0x102/0x290 [ 33.202398] handle_edge_irq+0x260/0xcf0 [ 33.202400] handle_irq+0x35/0x50 [ 33.202402] do_IRQ+0x93/0x1c0 [ 33.202404] ret_from_intr+0x0/0x1e [ 33.202406] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 33.202408] uart_write+0x3bb/0x6f0 [ 33.202410] do_output_char+0x5de/0x850 [ 33.202412] n_tty_write+0x46e/0xff0 [ 33.202414] tty_write+0x496/0x810 [ 33.202416] redirected_tty_write+0xaa/0xb0 [ 33.202418] do_iter_write+0x461/0x5d0 [ 33.202420] vfs_writev+0x153/0x2e0 [ 33.202422] do_writev+0x136/0x330 [ 33.202424] do_syscall_64+0xf9/0x620 [ 33.202426] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.202428] [ 33.202429] -> #1 (&port_lock_key){-.-.}: [ 33.202436] serial8250_console_write+0x90e/0xb70 [ 33.202438] console_unlock+0xbb6/0x1110 [ 33.202440] vprintk_emit+0x2d1/0x740 [ 33.202442] vprintk_func+0x79/0x180 [ 33.202444] printk+0xba/0xed [ 33.202446] register_console+0x87f/0xc90 [ 33.202448] univ8250_console_init+0x3a/0x46 [ 33.202450] console_init+0x4cb/0x718 [ 33.202452] start_kernel+0x686/0x911 [ 33.202454] secondary_startup_64+0xa4/0xb0 [ 33.202455] [ 33.202457] -> #0 (console_owner){....}: [ 33.202464] console_unlock+0x411/0x1110 [ 33.202466] vprintk_emit+0x2d1/0x740 [ 33.202468] vprintk_func+0x79/0x180 [ 33.202469] printk+0xba/0xed [ 33.202471] should_fail+0x66b/0x7b0 [ 33.202473] __should_failslab+0x115/0x180 [ 33.202475] should_failslab+0x5/0x10 [ 33.202477] __kmalloc+0x6d/0x3c0 [ 33.202479] tty_buffer_alloc+0x23f/0x2a0 [ 33.202482] __tty_buffer_request_room+0x156/0x2a0 [ 33.202484] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 33.202486] pty_write+0x126/0x1f0 [ 33.202488] tty_put_char+0x122/0x150 [ 33.202490] __process_echoes+0x577/0x9f0 [ 33.202493] process_echoes+0xf9/0x1c0 [ 33.202495] n_tty_receive_char_special+0x1149/0x29a0 [ 33.202497] n_tty_receive_buf_common+0x1f5a/0x2a90 [ 33.202499] tty_ioctl+0x1026/0x1630 [ 33.202501] do_vfs_ioctl+0xcdb/0x12e0 [ 33.202503] ksys_ioctl+0x9b/0xc0 [ 33.202505] __x64_sys_ioctl+0x6f/0xb0 [ 33.202507] do_syscall_64+0xf9/0x620 [ 33.202510] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.202511] [ 33.202513] other info that might help us debug this: [ 33.202514] [ 33.202516] Chain exists of: [ 33.202517] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 33.202526] [ 33.202528] Possible unsafe locking scenario: [ 33.202529] [ 33.202531] CPU0 CPU1 [ 33.202533] ---- ---- [ 33.202535] lock(&(&port->lock)->rlock); [ 33.202539] lock(&port_lock_key); [ 33.202544] lock(&(&port->lock)->rlock); [ 33.202548] lock(console_owner); [ 33.202552] [ 33.202554] *** DEADLOCK *** [ 33.202555] [ 33.202557] 6 locks held by syz-executor226/8101: [ 33.202558] #0: 000000008a1d7122 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 33.202567] #1: 0000000080c6459f (&port->buf.lock/1){+.+.}, at: tty_ioctl+0xfbc/0x1630 [ 33.202576] #2: 00000000966a6967 (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0x84/0x2a90 [ 33.202586] #3: 000000000eceaebb (&ldata->output_lock){+.+.}, at: process_echoes+0xaf/0x1c0 [ 33.202595] #4: 0000000014d7649b (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 33.202603] #5: 00000000bd11cf1a (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 33.202611] [ 33.202613] stack backtrace: [ 33.202616] CPU: 0 PID: 8101 Comm: syz-executor226 Not tainted 4.19.211-syzkaller #0 [ 33.202620] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.202622] Call Trace: [ 33.202624] dump_stack+0x1fc/0x2ef [ 33.202626] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 33.202628] __lock_acquire+0x30c9/0x3ff0 [ 33.202630] ? mark_held_locks+0xf0/0xf0 [ 33.202632] ? snprintf+0xf0/0xf0 [ 33.202634] ? console_unlock+0x3ec/0x1110 [ 33.202636] lock_acquire+0x170/0x3c0 [ 33.202638] ? console_unlock+0x3a9/0x1110 [ 33.202641] console_unlock+0x411/0x1110 [ 33.202643] ? console_unlock+0x3a9/0x1110 [ 33.202645] vprintk_emit+0x2d1/0x740 [ 33.202647] vprintk_func+0x79/0x180 [ 33.202649] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.202651] printk+0xba/0xed [ 33.202653] ? log_store.cold+0x16/0x16 [ 33.202655] ? __lock_acquire+0x22f9/0x3ff0 [ 33.202657] ? ___ratelimit+0x319/0x590 [ 33.202659] should_fail+0x66b/0x7b0 [ 33.202661] ? setup_fault_attr+0x200/0x200 [ 33.202663] ? mark_held_locks+0xf0/0xf0 [ 33.202665] ? mark_held_locks+0xf0/0xf0 [ 33.202667] __should_failslab+0x115/0x180 [ 33.202669] should_failslab+0x5/0x10 [ 33.202671] __kmalloc+0x6d/0x3c0 [ 33.202673] ? tty_buffer_alloc+0x23f/0x2a0 [ 33.202676] tty_buffer_alloc+0x23f/0x2a0 [ 33.202678] __tty_buffer_request_room+0x156/0x2a0 [ 33.202681] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 33.202683] ? do_raw_spin_lock+0xcb/0x220 [ 33.202685] pty_write+0x126/0x1f0 [ 33.202687] ? trace_hardirqs_off+0x64/0x200 [ 33.202689] tty_put_char+0x122/0x150 [ 33.202691] ? dev_match_devt+0x90/0x90 [ 33.202693] ? tty_buffer_space_avail+0x7e/0xb0 [ 33.202695] ? pty_write_room+0xbe/0xe0 [ 33.202697] ? ptmx_open+0x350/0x350 [ 33.202699] __process_echoes+0x577/0x9f0 [ 33.202701] ? mark_held_locks+0xa6/0xf0 [ 33.202703] process_echoes+0xf9/0x1c0 [ 33.202706] n_tty_receive_char_special+0x1149/0x29a0 [ 33.202708] ? n_tty_receive_buf_common+0x84/0x2a90 [ 33.202710] n_tty_receive_buf_common+0x1f5a/0x2a90 [ 33.202713] ? n_tty_receive_buf2+0x40/0x40 [ 33.202717] tty_ioctl+0x1026/0x1630 [ 33.202719] ? tty_fasync+0x300/0x300 [ 33.202721] ? get_pid_task+0xf4/0x190 [ 33.202724] ? proc_fail_nth_write+0x95/0x1d0 [ 33.202726] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 33.202728] ? debug_check_no_obj_freed+0x201/0x490 [ 33.202730] ? __vfs_write+0xff/0x770 [ 33.202733] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 33.202735] ? common_file_perm+0x4e5/0x850 [ 33.202737] ? tty_fasync+0x300/0x300 [ 33.202739] do_vfs_ioctl+0xcdb/0x12e0 [ 33.202741] ? vfs_write+0x3d7/0x540 [ 33.202743] ? ioctl_preallocate+0x200/0x200 [ 33.202745] ? lock_downgrade+0x720/0x720 [ 33.202747] ? check_preemption_disabled+0x41/0x280 [ 33.202749] ? vfs_write+0x393/0x540 [ 33.202751] ? ksys_write+0x1c8/0x2a0 [ 33.202753] ksys_ioctl+0x9b/0xc0 [ 33.202755] __x64_sys_ioctl+0x6f/0xb0 [ 33.202757] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 33.202759] do_syscall_64+0xf9/0x620 [ 33.202762] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.202764] RIP: 0033:0x7f03ebe0f7c9 [ 33.202771] 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 [ 33.202773] RSP: 002b:00007fff9b240d38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 33.202779] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f03ebe0f7c9 [ 33.202782] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 00000