[ 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.0.199' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.514649] FAULT_INJECTION: forcing a failure. [ 35.514649] name failslab, interval 1, probability 0, space 0, times 1 [ 35.526714] CPU: 1 PID: 8122 Comm: syz-executor323 Not tainted 4.19.211-syzkaller #0 [ 35.534578] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.543912] Call Trace: [ 35.546486] dump_stack+0x1fc/0x2ef [ 35.550099] should_fail.cold+0xa/0xf [ 35.553969] ? setup_fault_attr+0x200/0x200 [ 35.558270] ? mark_held_locks+0xf0/0xf0 [ 35.562334] ? mark_held_locks+0xf0/0xf0 [ 35.566391] __should_failslab+0x115/0x180 [ 35.570608] should_failslab+0x5/0x10 [ 35.574396] __kmalloc+0x6d/0x3c0 [ 35.577837] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.582167] ? commit_echoes+0x4c/0x210 [ 35.586142] tty_buffer_alloc+0x23f/0x2a0 [ 35.590358] __tty_buffer_request_room+0x156/0x2a0 [ 35.595280] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.600818] ? do_raw_spin_lock+0xcb/0x220 [ 35.605044] pty_write+0x126/0x1f0 [ 35.608566] tty_put_char+0x122/0x150 [ 35.612348] ? dev_match_devt+0x90/0x90 [ 35.616300] ? n_tty_receive_buf_common+0xbce/0x2a90 [ 35.621400] ? mutex_trylock+0x1a0/0x1a0 [ 35.625455] do_output_char+0x155/0x850 [ 35.629446] ? ptmx_open+0x350/0x350 [ 35.633144] __process_echoes+0x38e/0x9f0 [ 35.637275] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.642199] ? n_tty_receive_buf2+0x40/0x40 [ 35.646506] tty_ioctl+0x1026/0x1630 [ 35.650228] ? tty_fasync+0x300/0x300 [ 35.654021] ? get_pid_task+0xf4/0x190 [ 35.657889] ? mark_held_locks+0xf0/0xf0 [ 35.661930] ? proc_fail_nth_write+0x95/0x1d0 [ 35.666416] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.671330] ? __fdget_pos+0x26f/0x310 [ 35.675210] ? ksys_write+0x241/0x2a0 [ 35.679002] ? tty_fasync+0x300/0x300 [ 35.682781] do_vfs_ioctl+0xcdb/0x12e0 [ 35.686648] ? lock_downgrade+0x720/0x720 [ 35.690772] ? check_preemption_disabled+0x41/0x280 [ 35.695773] ? ioctl_preallocate+0x200/0x200 [ 35.700159] ? __fget+0x356/0x510 [ 35.703588] ? do_dup2+0x450/0x450 [ 35.707103] ? vfs_write+0x393/0x540 [ 35.710800] ? fput+0x2b/0x190 [ 35.713969] ksys_ioctl+0x9b/0xc0 [ 35.717401] __x64_sys_ioctl+0x6f/0xb0 [ 35.721267] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.726001] do_syscall_64+0xf9/0x620 [ 35.729882] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.735057] RIP: 0033:0x7fd2074c14b9 [ 35.738766] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 [ 35.757646] RSP: 002b:00007fd207452268 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.765329] RAX: ffffffffffffffda RBX: 00007fd20754a4d0 RCX: 00007fd2074c14b9 [ 35.772573] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 35.779820] RBP: 00007fd207517040 R08: 0000000000000001 R09: 0000000000000000 [ 35.787065] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd207452280 [ 35.794311] R13: 00007fd20754a4d8 R14: 00007fd20745227c R15: 0000000000000001 [ 35.801569] [ 35.801572] ====================================================== [ 35.801575] WARNING: possible circular locking dependency detected [ 35.801577] 4.19.211-syzkaller #0 Not tainted [ 35.801580] ------------------------------------------------------ [ 35.801583] syz-executor323/8122 is trying to acquire lock: [ 35.801584] 000000000fbdc284 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 35.801592] [ 35.801594] but task is already holding lock: [ 35.801596] 00000000efe4000e (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.801603] [ 35.801605] which lock already depends on the new lock. [ 35.801607] [ 35.801608] [ 35.801611] the existing dependency chain (in reverse order) is: [ 35.801612] [ 35.801613] -> #2 (&(&port->lock)->rlock){-.-.}: [ 35.801620] tty_port_tty_get+0x1d/0x80 [ 35.801622] tty_port_default_wakeup+0x11/0x40 [ 35.801624] serial8250_tx_chars+0x490/0xaf0 [ 35.801627] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 35.801629] serial8250_default_handle_irq+0xae/0x220 [ 35.801632] serial8250_interrupt+0x101/0x240 [ 35.801634] __handle_irq_event_percpu+0x27e/0x8e0 [ 35.801636] handle_irq_event+0x102/0x290 [ 35.801638] handle_edge_irq+0x260/0xcf0 [ 35.801640] handle_irq+0x35/0x50 [ 35.801642] do_IRQ+0x93/0x1c0 [ 35.801644] ret_from_intr+0x0/0x1e [ 35.801646] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 35.801648] uart_write+0x3bb/0x6f0 [ 35.801650] do_output_char+0x5de/0x850 [ 35.801652] n_tty_write+0x46e/0xff0 [ 35.801654] tty_write+0x496/0x810 [ 35.801656] redirected_tty_write+0xaa/0xb0 [ 35.801658] do_iter_write+0x461/0x5d0 [ 35.801660] vfs_writev+0x153/0x2e0 [ 35.801662] do_writev+0x136/0x330 [ 35.801664] do_syscall_64+0xf9/0x620 [ 35.801666] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.801667] [ 35.801668] -> #1 (&port_lock_key){-.-.}: [ 35.801676] serial8250_console_write+0x90e/0xb70 [ 35.801678] console_unlock+0xbb6/0x1110 [ 35.801680] vprintk_emit+0x2d1/0x740 [ 35.801682] vprintk_func+0x79/0x180 [ 35.801684] printk+0xba/0xed [ 35.801686] register_console+0x87f/0xc90 [ 35.801688] univ8250_console_init+0x3a/0x46 [ 35.801690] console_init+0x4cb/0x718 [ 35.801692] start_kernel+0x686/0x911 [ 35.801694] secondary_startup_64+0xa4/0xb0 [ 35.801695] [ 35.801696] -> #0 (console_owner){....}: [ 35.801703] console_unlock+0x411/0x1110 [ 35.801705] vprintk_emit+0x2d1/0x740 [ 35.801707] vprintk_func+0x79/0x180 [ 35.801709] printk+0xba/0xed [ 35.801711] should_fail+0x66b/0x7b0 [ 35.801713] __should_failslab+0x115/0x180 [ 35.801715] should_failslab+0x5/0x10 [ 35.801717] __kmalloc+0x6d/0x3c0 [ 35.801719] tty_buffer_alloc+0x23f/0x2a0 [ 35.801721] __tty_buffer_request_room+0x156/0x2a0 [ 35.801724] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.801726] pty_write+0x126/0x1f0 [ 35.801728] tty_put_char+0x122/0x150 [ 35.801730] do_output_char+0x155/0x850 [ 35.801732] __process_echoes+0x38e/0x9f0 [ 35.801734] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.801736] tty_ioctl+0x1026/0x1630 [ 35.801738] do_vfs_ioctl+0xcdb/0x12e0 [ 35.801740] ksys_ioctl+0x9b/0xc0 [ 35.801742] __x64_sys_ioctl+0x6f/0xb0 [ 35.801744] do_syscall_64+0xf9/0x620 [ 35.801747] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.801748] [ 35.801750] other info that might help us debug this: [ 35.801751] [ 35.801753] Chain exists of: [ 35.801754] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 35.801763] [ 35.801765] Possible unsafe locking scenario: [ 35.801766] [ 35.801768] CPU0 CPU1 [ 35.801770] ---- ---- [ 35.801771] lock(&(&port->lock)->rlock); [ 35.801776] lock(&port_lock_key); [ 35.801781] lock(&(&port->lock)->rlock); [ 35.801785] lock(console_owner); [ 35.801789] [ 35.801790] *** DEADLOCK *** [ 35.801792] [ 35.801794] 6 locks held by syz-executor323/8122: [ 35.801795] #0: 00000000dc46b00c (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 35.801803] #1: 000000008efeb081 (&port->buf.lock/1){+.+.}, at: tty_ioctl+0xfbc/0x1630 [ 35.801813] #2: 000000008d663bd4 (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0x84/0x2a90 [ 35.801823] #3: 00000000ed33f2ea (&ldata->output_lock){+.+.}, at: n_tty_receive_buf_common+0xbce/0x2a90 [ 35.801832] #4: 00000000efe4000e (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.801840] #5: 000000004788dd01 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 35.801848] [ 35.801850] stack backtrace: [ 35.801853] CPU: 1 PID: 8122 Comm: syz-executor323 Not tainted 4.19.211-syzkaller #0 [ 35.801857] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.801859] Call Trace: [ 35.801861] dump_stack+0x1fc/0x2ef [ 35.801863] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.801865] __lock_acquire+0x30c9/0x3ff0 [ 35.801867] ? mark_held_locks+0xf0/0xf0 [ 35.801869] ? snprintf+0xf0/0xf0 [ 35.801872] ? console_unlock+0x3ec/0x1110 [ 35.801874] lock_acquire+0x170/0x3c0 [ 35.801876] ? console_unlock+0x3a9/0x1110 [ 35.801878] console_unlock+0x411/0x1110 [ 35.801880] ? console_unlock+0x3a9/0x1110 [ 35.801882] vprintk_emit+0x2d1/0x740 [ 35.801884] vprintk_func+0x79/0x180 [ 35.801885] printk+0xba/0xed [ 35.801887] ? log_store.cold+0x16/0x16 [ 35.801890] ? __lock_acquire+0x22f9/0x3ff0 [ 35.801892] ? ___ratelimit+0x319/0x590 [ 35.801894] should_fail+0x66b/0x7b0 [ 35.801896] ? setup_fault_attr+0x200/0x200 [ 35.801898] ? mark_held_locks+0xf0/0xf0 [ 35.801900] ? mark_held_locks+0xf0/0xf0 [ 35.801902] __should_failslab+0x115/0x180 [ 35.801904] should_failslab+0x5/0x10 [ 35.801906] __kmalloc+0x6d/0x3c0 [ 35.801908] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.801910] ? commit_echoes+0x4c/0x210 [ 35.801912] tty_buffer_alloc+0x23f/0x2a0 [ 35.801914] __tty_buffer_request_room+0x156/0x2a0 [ 35.801917] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.801919] ? do_raw_spin_lock+0xcb/0x220 [ 35.801921] pty_write+0x126/0x1f0 [ 35.801923] tty_put_char+0x122/0x150 [ 35.801925] ? dev_match_devt+0x90/0x90 [ 35.801927] ? n_tty_receive_buf_common+0xbce/0x2a90 [ 35.801929] ? mutex_trylock+0x1a0/0x1a0 [ 35.801931] do_output_char+0x155/0x850 [ 35.801933] ? ptmx_open+0x350/0x350 [ 35.801935] __process_echoes+0x38e/0x9f0 [ 35.801937] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.801940] ? n_tty_receive_buf2+0x40/0x40 [ 35.801942] tty_ioctl+0x1026/0x1630 [ 35.801944] ? tty_fasync+0x300/0x300 [ 35.801945] ? get_pid_task+0xf4/0x190 [ 35.801948] ? mark_held_locks+0xf0/0xf0 [ 35.801950] ? proc_fail_nth_write+0x95/0x1d0 [ 35.801952] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.801954] ? __fdget_pos+0x26f/0x310 [ 35.801956] ? ksys_write+0x241/0x2a0 [ 35.801958] ? tty_fasync+0x300/0x300 [ 35.801960] do_vfs_ioctl+0xcdb/0x12e0 [ 35.801962] ? lock_downgrade+0x720/0x720 [ 35.801964] ? check_preemption_disabled+0x41/0x280 [ 35.801966] ? ioctl_preallocate+0x200/0x200 [ 35.801968] ? __fget+0x356/0x510 [ 35.801970] ? do_dup2+0x450/0x450 [ 35.801972] ? vfs_write+0x393/0x540 [ 35.801974] ? fput+0x2b/0x190 [ 35.801976] ksys_ioctl+0x9b/0xc0 [ 35.801978] __x64_sys_ioctl+0x6f/0xb0 [ 35.801980] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.801982] do_syscall_64+0xf9/0x620 [ 35.801984] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.801986] RIP: 0033:0x7fd2074c14b9 [ 35.801993] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 [ 35.801996] RSP: 002b:00007fd207452268 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.802001] RAX: ffffffffffffffda RBX: 00007fd