[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.204' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 37.612229] FAULT_INJECTION: forcing a failure. [ 37.612229] name failslab, interval 1, probability 0, space 0, times 1 [ 37.624214] CPU: 0 PID: 8100 Comm: syz-executor148 Not tainted 4.19.211-syzkaller #0 [ 37.632071] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 37.641399] Call Trace: [ 37.643973] dump_stack+0x1fc/0x2ef [ 37.647580] should_fail.cold+0xa/0xf [ 37.651364] ? setup_fault_attr+0x200/0x200 [ 37.655665] ? mark_held_locks+0xf0/0xf0 [ 37.659706] __should_failslab+0x115/0x180 [ 37.663924] should_failslab+0x5/0x10 [ 37.667702] __kmalloc+0x6d/0x3c0 [ 37.671156] ? tty_buffer_alloc+0x23f/0x2a0 [ 37.675460] ? __mutex_lock+0x368/0x1190 [ 37.679505] tty_buffer_alloc+0x23f/0x2a0 [ 37.683634] __tty_buffer_request_room+0x156/0x2a0 [ 37.688542] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.694058] ? do_raw_spin_lock+0xcb/0x220 [ 37.698271] pty_write+0x126/0x1f0 [ 37.701789] n_tty_write+0xa03/0xff0 [ 37.705486] ? n_tty_open+0x160/0x160 [ 37.709264] ? do_wait_intr_irq+0x270/0x270 [ 37.713563] ? __might_fault+0x192/0x1d0 [ 37.717602] tty_write+0x496/0x810 [ 37.721118] ? n_tty_open+0x160/0x160 [ 37.724999] __vfs_write+0xf7/0x770 [ 37.728603] ? tty_compat_ioctl+0x270/0x270 [ 37.732901] ? common_file_perm+0x4e5/0x850 [ 37.737219] ? kernel_read+0x110/0x110 [ 37.741089] ? trace_hardirqs_off+0x64/0x200 [ 37.745485] ? apparmor_getprocattr+0x11e0/0x11e0 [ 37.750316] ? vfs_write+0x3d7/0x540 [ 37.754017] ? security_file_permission+0x1c0/0x220 [ 37.759012] vfs_write+0x1f3/0x540 [ 37.762531] ksys_write+0x12b/0x2a0 [ 37.766135] ? __ia32_sys_read+0xb0/0xb0 [ 37.770175] ? trace_hardirqs_off_caller+0x6e/0x210 [ 37.775170] ? do_syscall_64+0x21/0x620 [ 37.779121] do_syscall_64+0xf9/0x620 [ 37.782902] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.788066] RIP: 0033:0x7f8267b9d679 [ 37.791755] 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 [ 37.810634] RSP: 002b:00007ffeb25aac58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 37.818316] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8267b9d679 [ 37.825560] RDX: 000000000000ff2e RSI: 00000000200000c0 RDI: 0000000000000003 [ 37.832805] RBP: 00007ffeb25aac60 R08: 0000000000000001 R09: 00007f8267b60033 [ 37.840052] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 37.847301] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 37.854565] [ 37.854568] ====================================================== [ 37.854571] WARNING: possible circular locking dependency detected [ 37.854573] 4.19.211-syzkaller #0 Not tainted [ 37.854576] ------------------------------------------------------ [ 37.854578] syz-executor148/8100 is trying to acquire lock: [ 37.854580] 00000000703126f3 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 37.854588] [ 37.854590] but task is already holding lock: [ 37.854592] 00000000221873ac (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 37.854599] [ 37.854602] which lock already depends on the new lock. [ 37.854603] [ 37.854604] [ 37.854607] the existing dependency chain (in reverse order) is: [ 37.854608] [ 37.854609] -> #2 (&(&port->lock)->rlock){-.-.}: [ 37.854616] tty_port_tty_get+0x1d/0x80 [ 37.854618] tty_port_default_wakeup+0x11/0x40 [ 37.854621] serial8250_tx_chars+0x490/0xaf0 [ 37.854623] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 37.854625] serial8250_default_handle_irq+0xae/0x220 [ 37.854628] serial8250_interrupt+0x101/0x240 [ 37.854630] __handle_irq_event_percpu+0x27e/0x8e0 [ 37.854632] handle_irq_event+0x102/0x290 [ 37.854634] handle_edge_irq+0x260/0xcf0 [ 37.854636] handle_irq+0x35/0x50 [ 37.854638] do_IRQ+0x93/0x1c0 [ 37.854640] ret_from_intr+0x0/0x1e [ 37.854642] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 37.854644] uart_write+0x3bb/0x6f0 [ 37.854646] do_output_char+0x5de/0x850 [ 37.854648] n_tty_write+0x46e/0xff0 [ 37.854650] tty_write+0x496/0x810 [ 37.854652] redirected_tty_write+0xaa/0xb0 [ 37.854654] do_iter_write+0x461/0x5d0 [ 37.854656] vfs_writev+0x153/0x2e0 [ 37.854658] do_writev+0x136/0x330 [ 37.854660] do_syscall_64+0xf9/0x620 [ 37.854662] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.854663] [ 37.854665] -> #1 (&port_lock_key){-.-.}: [ 37.854672] serial8250_console_write+0x90e/0xb70 [ 37.854674] console_unlock+0xbb6/0x1110 [ 37.854676] vprintk_emit+0x2d1/0x740 [ 37.854678] vprintk_func+0x79/0x180 [ 37.854680] printk+0xba/0xed [ 37.854682] register_console+0x87f/0xc90 [ 37.854684] univ8250_console_init+0x3a/0x46 [ 37.854686] console_init+0x4cb/0x718 [ 37.854688] start_kernel+0x686/0x911 [ 37.854690] secondary_startup_64+0xa4/0xb0 [ 37.854691] [ 37.854692] -> #0 (console_owner){....}: [ 37.854699] console_unlock+0x411/0x1110 [ 37.854701] vprintk_emit+0x2d1/0x740 [ 37.854703] vprintk_func+0x79/0x180 [ 37.854705] printk+0xba/0xed [ 37.854707] should_fail+0x66b/0x7b0 [ 37.854709] __should_failslab+0x115/0x180 [ 37.854711] should_failslab+0x5/0x10 [ 37.854713] __kmalloc+0x6d/0x3c0 [ 37.854715] tty_buffer_alloc+0x23f/0x2a0 [ 37.854717] __tty_buffer_request_room+0x156/0x2a0 [ 37.854720] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.854722] pty_write+0x126/0x1f0 [ 37.854724] n_tty_write+0xa03/0xff0 [ 37.854726] tty_write+0x496/0x810 [ 37.854728] __vfs_write+0xf7/0x770 [ 37.854730] vfs_write+0x1f3/0x540 [ 37.854732] ksys_write+0x12b/0x2a0 [ 37.854734] do_syscall_64+0xf9/0x620 [ 37.854736] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.854737] [ 37.854739] other info that might help us debug this: [ 37.854741] [ 37.854742] Chain exists of: [ 37.854743] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 37.854752] [ 37.854754] Possible unsafe locking scenario: [ 37.854755] [ 37.854758] CPU0 CPU1 [ 37.854760] ---- ---- [ 37.854761] lock(&(&port->lock)->rlock); [ 37.854766] lock(&port_lock_key); [ 37.854771] lock(&(&port->lock)->rlock); [ 37.854775] lock(console_owner); [ 37.854779] [ 37.854780] *** DEADLOCK *** [ 37.854781] [ 37.854784] 6 locks held by syz-executor148/8100: [ 37.854785] #0: 00000000ab60981e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 37.854796] #1: 00000000950dc12b (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 37.854804] #2: 00000000369eaca5 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 37.854813] #3: 00000000d1acc159 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 37.854821] #4: 00000000221873ac (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 37.854830] #5: 00000000cbb5e292 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 37.854838] [ 37.854839] stack backtrace: [ 37.854843] CPU: 0 PID: 8100 Comm: syz-executor148 Not tainted 4.19.211-syzkaller #0 [ 37.854847] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 37.854848] Call Trace: [ 37.854850] dump_stack+0x1fc/0x2ef [ 37.854853] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 37.854855] __lock_acquire+0x30c9/0x3ff0 [ 37.854857] ? mark_held_locks+0xf0/0xf0 [ 37.854859] ? snprintf+0xf0/0xf0 [ 37.854861] ? console_unlock+0x3ec/0x1110 [ 37.854863] lock_acquire+0x170/0x3c0 [ 37.854865] ? console_unlock+0x3a9/0x1110 [ 37.854867] console_unlock+0x411/0x1110 [ 37.854869] ? console_unlock+0x3a9/0x1110 [ 37.854871] vprintk_emit+0x2d1/0x740 [ 37.854873] vprintk_func+0x79/0x180 [ 37.854875] printk+0xba/0xed [ 37.854877] ? log_store.cold+0x16/0x16 [ 37.854879] ? __lock_acquire+0x22f9/0x3ff0 [ 37.854881] ? ___ratelimit+0x319/0x590 [ 37.854883] should_fail+0x66b/0x7b0 [ 37.854885] ? setup_fault_attr+0x200/0x200 [ 37.854888] ? mark_held_locks+0xf0/0xf0 [ 37.854891] __should_failslab+0x115/0x180 [ 37.854894] should_failslab+0x5/0x10 [ 37.854897] __kmalloc+0x6d/0x3c0 [ 37.854901] ? tty_buffer_alloc+0x23f/0x2a0 [ 37.854904] ? __mutex_lock+0x368/0x1190 [ 37.854907] tty_buffer_alloc+0x23f/0x2a0 [ 37.854911] __tty_buffer_request_room+0x156/0x2a0 [ 37.854915] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.854919] ? do_raw_spin_lock+0xcb/0x220 [ 37.854922] pty_write+0x126/0x1f0 [ 37.854924] n_tty_write+0xa03/0xff0 [ 37.854927] ? n_tty_open+0x160/0x160 [ 37.854930] ? do_wait_intr_irq+0x270/0x270 [ 37.854934] ? __might_fault+0x192/0x1d0 [ 37.854937] tty_write+0x496/0x810 [ 37.854940] ? n_tty_open+0x160/0x160 [ 37.854943] __vfs_write+0xf7/0x770 [ 37.854946] ? tty_compat_ioctl+0x270/0x270 [ 37.854954] ? common_file_perm+0x4e5/0x850 [ 37.854958] ? kernel_read+0x110/0x110 [ 37.854961] ? trace_hardirqs_off+0x64/0x200 [ 37.854964] ? apparmor_getprocattr+0x11e0/0x11e0 [ 37.854967] ? vfs_write+0x3d7/0x540 [ 37.854970] ? security_file_permission+0x1c0/0x220 [ 37.854972] vfs_write+0x1f3/0x540 [ 37.854974] ksys_write+0x12b/0x2a0 [ 37.854976] ? __ia32_sys_read+0xb0/0xb0 [ 37.854978] ? trace_hardirqs_off_caller+0x6e/0x210 [ 37.854980] ? do_syscall_64+0x21/0x620 [ 37.854982] do_syscall_64+0xf9/0x620 [ 37.854984] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.854986] RIP: 0033:0x7f8267b9d679 [ 37.854993] 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 [ 37.854996] RSP: 002b:00007ffeb25aac58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 37.855001] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8267b9d679 [ 37.855004] RDX: 000000000000ff2e RSI: 00000000200000c0 RDI: 0000000000000003 [ 37.855007] RBP: 00007ffeb25aac60 R08: 0000000000000001 R09: 00007f8267b60033 [ 37.855010] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 37.855013] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000