[ 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.10.43' (ECDSA) to the list of known hosts. syzkaller login: [ 32.589773] FAULT_INJECTION: forcing a failure. [ 32.589773] name failslab, interval 1, probability 0, space 0, times 1 [ 32.601741] CPU: 0 PID: 8101 Comm: syz-executor329 Not tainted 4.19.211-syzkaller #0 [ 32.609598] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.618924] Call Trace: [ 32.621493] dump_stack+0x1fc/0x2ef [ 32.625099] should_fail.cold+0xa/0xf [ 32.628876] ? setup_fault_attr+0x200/0x200 [ 32.633178] ? mark_held_locks+0xf0/0xf0 [ 32.637217] __should_failslab+0x115/0x180 [ 32.641428] should_failslab+0x5/0x10 [ 32.645204] __kmalloc+0x6d/0x3c0 [ 32.648633] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.652928] ? __mutex_lock+0x368/0x1190 [ 32.656963] tty_buffer_alloc+0x23f/0x2a0 [ 32.661085] __tty_buffer_request_room+0x156/0x2a0 [ 32.665994] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.671508] ? do_raw_spin_lock+0xcb/0x220 [ 32.675722] pty_write+0x126/0x1f0 [ 32.679246] n_tty_write+0xa03/0xff0 [ 32.682938] ? __ldsem_down_read_nested+0xd2/0x780 [ 32.687849] ? n_tty_open+0x160/0x160 [ 32.691624] ? do_wait_intr_irq+0x270/0x270 [ 32.695922] ? __might_fault+0x192/0x1d0 [ 32.699962] tty_write+0x496/0x810 [ 32.703476] ? n_tty_open+0x160/0x160 [ 32.707255] __vfs_write+0xf7/0x770 [ 32.710856] ? tty_compat_ioctl+0x270/0x270 [ 32.715156] ? common_file_perm+0x4e5/0x850 [ 32.719452] ? kernel_read+0x110/0x110 [ 32.723315] ? trace_hardirqs_off+0x64/0x200 [ 32.727701] ? apparmor_getprocattr+0x11e0/0x11e0 [ 32.732519] ? vfs_write+0x3d7/0x540 [ 32.736212] ? security_file_permission+0x1c0/0x220 [ 32.741203] vfs_write+0x1f3/0x540 [ 32.744723] ksys_write+0x12b/0x2a0 [ 32.748326] ? __ia32_sys_read+0xb0/0xb0 [ 32.752363] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.757356] ? do_syscall_64+0x21/0x620 [ 32.761307] do_syscall_64+0xf9/0x620 [ 32.765087] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.770252] RIP: 0033:0x7f705217a6f9 [ 32.773942] 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.792825] RSP: 002b:00007ffe5dc71278 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 32.800507] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f705217a6f9 [ 32.807755] RDX: 0000000000000020 RSI: 0000000020000000 RDI: 0000000000000003 [ 32.815000] RBP: 00007ffe5dc71280 R08: 0000000000000001 R09: 00007f7052130032 [ 32.822245] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 32.829491] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.836749] [ 32.836752] ====================================================== [ 32.836755] WARNING: possible circular locking dependency detected [ 32.836757] 4.19.211-syzkaller #0 Not tainted [ 32.836760] ------------------------------------------------------ [ 32.836762] syz-executor329/8101 is trying to acquire lock: [ 32.836764] 00000000eee956b0 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 32.836772] [ 32.836774] but task is already holding lock: [ 32.836775] 000000008ed7facb (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.836783] [ 32.836785] which lock already depends on the new lock. [ 32.836786] [ 32.836788] [ 32.836790] the existing dependency chain (in reverse order) is: [ 32.836791] [ 32.836793] -> #2 (&(&port->lock)->rlock){-.-.}: [ 32.836800] tty_port_tty_get+0x1d/0x80 [ 32.836802] tty_port_default_wakeup+0x11/0x40 [ 32.836804] serial8250_tx_chars+0x490/0xaf0 [ 32.836807] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 32.836809] serial8250_default_handle_irq+0xae/0x220 [ 32.836811] serial8250_interrupt+0x101/0x240 [ 32.836817] __handle_irq_event_percpu+0x27e/0x8e0 [ 32.836819] handle_irq_event+0x102/0x290 [ 32.836821] handle_edge_irq+0x260/0xcf0 [ 32.836823] handle_irq+0x35/0x50 [ 32.836825] do_IRQ+0x93/0x1c0 [ 32.836827] ret_from_intr+0x0/0x1e [ 32.836829] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 32.836831] uart_write+0x3bb/0x6f0 [ 32.836833] do_output_char+0x5de/0x850 [ 32.836835] n_tty_write+0x46e/0xff0 [ 32.836837] tty_write+0x496/0x810 [ 32.836839] redirected_tty_write+0xaa/0xb0 [ 32.836841] do_iter_write+0x461/0x5d0 [ 32.836843] vfs_writev+0x153/0x2e0 [ 32.836845] do_writev+0x136/0x330 [ 32.836847] do_syscall_64+0xf9/0x620 [ 32.836849] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.836850] [ 32.836852] -> #1 (&port_lock_key){-.-.}: [ 32.836859] serial8250_console_write+0x90e/0xb70 [ 32.836861] console_unlock+0xbb6/0x1110 [ 32.836863] vprintk_emit+0x2d1/0x740 [ 32.836865] vprintk_func+0x79/0x180 [ 32.836867] printk+0xba/0xed [ 32.836869] register_console+0x87f/0xc90 [ 32.836871] univ8250_console_init+0x3a/0x46 [ 32.836873] console_init+0x4cb/0x718 [ 32.836875] start_kernel+0x686/0x911 [ 32.836877] secondary_startup_64+0xa4/0xb0 [ 32.836878] [ 32.836879] -> #0 (console_owner){....}: [ 32.836886] console_unlock+0x411/0x1110 [ 32.836888] vprintk_emit+0x2d1/0x740 [ 32.836890] vprintk_func+0x79/0x180 [ 32.836892] printk+0xba/0xed [ 32.836894] should_fail+0x66b/0x7b0 [ 32.836896] __should_failslab+0x115/0x180 [ 32.836898] should_failslab+0x5/0x10 [ 32.836900] __kmalloc+0x6d/0x3c0 [ 32.836902] tty_buffer_alloc+0x23f/0x2a0 [ 32.836904] __tty_buffer_request_room+0x156/0x2a0 [ 32.836907] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.836909] pty_write+0x126/0x1f0 [ 32.836911] n_tty_write+0xa03/0xff0 [ 32.836913] tty_write+0x496/0x810 [ 32.836915] __vfs_write+0xf7/0x770 [ 32.836917] vfs_write+0x1f3/0x540 [ 32.836918] ksys_write+0x12b/0x2a0 [ 32.836920] do_syscall_64+0xf9/0x620 [ 32.836923] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.836924] [ 32.836926] other info that might help us debug this: [ 32.836927] [ 32.836929] Chain exists of: [ 32.836930] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 32.836939] [ 32.836941] Possible unsafe locking scenario: [ 32.836942] [ 32.836944] CPU0 CPU1 [ 32.836946] ---- ---- [ 32.836948] lock(&(&port->lock)->rlock); [ 32.836953] lock(&port_lock_key); [ 32.836957] lock(&(&port->lock)->rlock); [ 32.836961] lock(console_owner); [ 32.836965] [ 32.836967] *** DEADLOCK *** [ 32.836968] [ 32.836970] 6 locks held by syz-executor329/8101: [ 32.836971] #0: 000000000b4dbf9e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 32.836980] #1: 00000000c74d044a (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 32.836988] #2: 00000000434d5e3c (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 32.836997] #3: 0000000051792dea (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 32.837005] #4: 000000008ed7facb (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.837013] #5: 00000000a6491ce1 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 32.837022] [ 32.837023] stack backtrace: [ 32.837027] CPU: 0 PID: 8101 Comm: syz-executor329 Not tainted 4.19.211-syzkaller #0 [ 32.837030] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.837032] Call Trace: [ 32.837034] dump_stack+0x1fc/0x2ef [ 32.837037] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 32.837039] __lock_acquire+0x30c9/0x3ff0 [ 32.837041] ? mark_held_locks+0xf0/0xf0 [ 32.837043] ? snprintf+0xf0/0xf0 [ 32.837045] ? console_unlock+0x3ec/0x1110 [ 32.837047] lock_acquire+0x170/0x3c0 [ 32.837049] ? console_unlock+0x3a9/0x1110 [ 32.837051] console_unlock+0x411/0x1110 [ 32.837053] ? console_unlock+0x3a9/0x1110 [ 32.837055] vprintk_emit+0x2d1/0x740 [ 32.837057] vprintk_func+0x79/0x180 [ 32.837059] printk+0xba/0xed [ 32.837061] ? log_store.cold+0x16/0x16 [ 32.837063] ? __lock_acquire+0x22f9/0x3ff0 [ 32.837065] ? ___ratelimit+0x319/0x590 [ 32.837067] should_fail+0x66b/0x7b0 [ 32.837069] ? setup_fault_attr+0x200/0x200 [ 32.837071] ? mark_held_locks+0xf0/0xf0 [ 32.837073] __should_failslab+0x115/0x180 [ 32.837075] should_failslab+0x5/0x10 [ 32.837077] __kmalloc+0x6d/0x3c0 [ 32.837079] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.837081] ? __mutex_lock+0x368/0x1190 [ 32.837083] tty_buffer_alloc+0x23f/0x2a0 [ 32.837086] __tty_buffer_request_room+0x156/0x2a0 [ 32.837088] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.837090] ? do_raw_spin_lock+0xcb/0x220 [ 32.837092] pty_write+0x126/0x1f0 [ 32.837094] n_tty_write+0xa03/0xff0 [ 32.837096] ? __ldsem_down_read_nested+0xd2/0x780 [ 32.837098] ? n_tty_open+0x160/0x160 [ 32.837101] ? do_wait_intr_irq+0x270/0x270 [ 32.837103] ? __might_fault+0x192/0x1d0 [ 32.837104] tty_write+0x496/0x810 [ 32.837106] ? n_tty_open+0x160/0x160 [ 32.837108] __vfs_write+0xf7/0x770 [ 32.837110] ? tty_compat_ioctl+0x270/0x270 [ 32.837113] ? common_file_perm+0x4e5/0x850 [ 32.837115] ? kernel_read+0x110/0x110 [ 32.837117] ? trace_hardirqs_off+0x64/0x200 [ 32.837119] ? apparmor_getprocattr+0x11e0/0x11e0 [ 32.837121] ? vfs_write+0x3d7/0x540 [ 32.837123] ? security_file_permission+0x1c0/0x220 [ 32.837125] vfs_write+0x1f3/0x540 [ 32.837127] ksys_write+0x12b/0x2a0 [ 32.837129] ? __ia32_sys_read+0xb0/0xb0 [ 32.837132] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.837134] ? do_syscall_64+0x21/0x620 [ 32.837136] do_syscall_64+0xf9/0x620 [ 32.837138] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.837140] RIP: 0033:0x7f705217a6f9 [ 32.837147] 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.837149] RSP: 002b:00007ffe5dc71278 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 executing program [ 32.837154] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f705217a6f9 [ 32.837158] RDX: 0000000000000020 RSI: 0000000020000000 RDI: 0000000000000003 [ 32.837161] RBP: 00007ffe5dc71280 R08: 0000000000000001 R09: 00007f7052130032 [ 32.837164] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 32.837167] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000