[ 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.230' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 38.156590] FAULT_INJECTION: forcing a failure. [ 38.156590] name failslab, interval 1, probability 0, space 0, times 1 [ 38.168610] CPU: 1 PID: 8110 Comm: syz-executor751 Not tainted 4.19.211-syzkaller #0 [ 38.176481] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 38.185820] Call Trace: [ 38.188398] dump_stack+0x1fc/0x2ef [ 38.192019] should_fail.cold+0xa/0xf [ 38.195837] ? setup_fault_attr+0x200/0x200 [ 38.200156] ? mark_held_locks+0xf0/0xf0 [ 38.204214] __should_failslab+0x115/0x180 [ 38.208438] should_failslab+0x5/0x10 [ 38.212232] __kmalloc+0x6d/0x3c0 [ 38.215682] ? tty_buffer_alloc+0x23f/0x2a0 [ 38.219994] ? __mutex_lock+0x368/0x1190 [ 38.224043] tty_buffer_alloc+0x23f/0x2a0 [ 38.228177] __tty_buffer_request_room+0x156/0x2a0 [ 38.233115] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 38.238656] ? do_raw_spin_lock+0xcb/0x220 [ 38.242883] pty_write+0x126/0x1f0 [ 38.246404] ? ptmx_open+0x350/0x350 [ 38.250130] n_tty_write+0x3c0/0xff0 [ 38.253948] ? n_tty_open+0x160/0x160 [ 38.257734] ? do_wait_intr_irq+0x270/0x270 [ 38.262035] ? __might_fault+0x192/0x1d0 [ 38.266081] tty_write+0x496/0x810 [ 38.269606] ? n_tty_open+0x160/0x160 [ 38.273579] __vfs_write+0xf7/0x770 [ 38.277204] ? tty_compat_ioctl+0x270/0x270 [ 38.281527] ? common_file_perm+0x4e5/0x850 [ 38.285846] ? kernel_read+0x110/0x110 [ 38.289737] ? trace_hardirqs_off+0x64/0x200 [ 38.294133] ? apparmor_getprocattr+0x11e0/0x11e0 [ 38.298958] ? vfs_write+0x3d7/0x540 [ 38.302655] ? security_file_permission+0x1c0/0x220 [ 38.307650] vfs_write+0x1f3/0x540 [ 38.311170] ksys_write+0x12b/0x2a0 [ 38.314796] ? __ia32_sys_read+0xb0/0xb0 [ 38.318838] ? trace_hardirqs_off_caller+0x6e/0x210 [ 38.323928] ? do_syscall_64+0x21/0x620 [ 38.327885] do_syscall_64+0xf9/0x620 [ 38.331687] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.336987] RIP: 0033:0x7f834492c789 [ 38.340688] 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 [ 38.359584] RSP: 002b:00007ffd210477e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 38.367283] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f834492c789 [ 38.374689] RDX: 00000000fffffedf RSI: 0000000020000000 RDI: 0000000000000004 [ 38.381951] RBP: 00007ffd21047800 R08: 0000000000000001 R09: 0000000000000001 [ 38.389210] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 38.396472] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 38.403825] [ 38.403828] ====================================================== [ 38.403831] WARNING: possible circular locking dependency detected [ 38.403833] 4.19.211-syzkaller #0 Not tainted [ 38.403836] ------------------------------------------------------ [ 38.403838] syz-executor751/8110 is trying to acquire lock: [ 38.403841] 0000000005c3a588 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 38.403848] [ 38.403850] but task is already holding lock: [ 38.403852] 00000000d379db7a (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 38.403859] [ 38.403862] which lock already depends on the new lock. [ 38.403863] [ 38.403864] [ 38.403867] the existing dependency chain (in reverse order) is: [ 38.403868] [ 38.403869] -> #2 (&(&port->lock)->rlock){-.-.}: [ 38.403876] tty_port_tty_get+0x1d/0x80 [ 38.403878] tty_port_default_wakeup+0x11/0x40 [ 38.403881] serial8250_tx_chars+0x490/0xaf0 [ 38.403883] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 38.403886] serial8250_default_handle_irq+0xae/0x220 [ 38.403888] serial8250_interrupt+0x101/0x240 [ 38.403891] __handle_irq_event_percpu+0x27e/0x8e0 [ 38.403893] handle_irq_event+0x102/0x290 [ 38.403895] handle_edge_irq+0x260/0xcf0 [ 38.403897] handle_irq+0x35/0x50 [ 38.403898] do_IRQ+0x93/0x1c0 [ 38.403900] ret_from_intr+0x0/0x1e [ 38.403903] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 38.403905] uart_write+0x3bb/0x6f0 [ 38.403907] do_output_char+0x5de/0x850 [ 38.403909] n_tty_write+0x46e/0xff0 [ 38.403910] tty_write+0x496/0x810 [ 38.403913] redirected_tty_write+0xaa/0xb0 [ 38.403915] do_iter_write+0x461/0x5d0 [ 38.403917] vfs_writev+0x153/0x2e0 [ 38.403918] do_writev+0x136/0x330 [ 38.403920] do_syscall_64+0xf9/0x620 [ 38.403923] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.403924] [ 38.403925] -> #1 (&port_lock_key){-.-.}: [ 38.403932] serial8250_console_write+0x90e/0xb70 [ 38.403934] console_unlock+0xbb6/0x1110 [ 38.403936] vprintk_emit+0x2d1/0x740 [ 38.403938] vprintk_func+0x79/0x180 [ 38.403940] printk+0xba/0xed [ 38.403942] register_console+0x87f/0xc90 [ 38.403944] univ8250_console_init+0x3a/0x46 [ 38.403946] console_init+0x4cb/0x718 [ 38.403948] start_kernel+0x686/0x911 [ 38.403951] secondary_startup_64+0xa4/0xb0 [ 38.403952] [ 38.403953] -> #0 (console_owner){....}: [ 38.403960] console_unlock+0x411/0x1110 [ 38.403962] vprintk_emit+0x2d1/0x740 [ 38.403964] vprintk_func+0x79/0x180 [ 38.403966] printk+0xba/0xed [ 38.403967] should_fail+0x66b/0x7b0 [ 38.403970] __should_failslab+0x115/0x180 [ 38.403972] should_failslab+0x5/0x10 [ 38.403973] __kmalloc+0x6d/0x3c0 [ 38.403976] tty_buffer_alloc+0x23f/0x2a0 [ 38.403978] __tty_buffer_request_room+0x156/0x2a0 [ 38.403981] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 38.403983] pty_write+0x126/0x1f0 [ 38.403984] n_tty_write+0x3c0/0xff0 [ 38.403986] tty_write+0x496/0x810 [ 38.403988] __vfs_write+0xf7/0x770 [ 38.403990] vfs_write+0x1f3/0x540 [ 38.403992] ksys_write+0x12b/0x2a0 [ 38.403994] do_syscall_64+0xf9/0x620 [ 38.403997] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.403998] [ 38.404000] other info that might help us debug this: [ 38.404001] [ 38.404003] Chain exists of: [ 38.404004] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 38.404013] [ 38.404015] Possible unsafe locking scenario: [ 38.404016] [ 38.404018] CPU0 CPU1 [ 38.404020] ---- ---- [ 38.404021] lock(&(&port->lock)->rlock); [ 38.404026] lock(&port_lock_key); [ 38.404031] lock(&(&port->lock)->rlock); [ 38.404035] lock(console_owner); [ 38.404039] [ 38.404041] *** DEADLOCK *** [ 38.404042] [ 38.404044] 6 locks held by syz-executor751/8110: [ 38.404045] #0: 00000000627f4d5a (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 38.404054] #1: 00000000413c8859 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 38.404062] #2: 00000000f524d434 (&o_tty->termios_rwsem/1){++++}, at: n_tty_write+0x1b5/0xff0 [ 38.404072] #3: 000000000a9692a0 (&ldata->output_lock){+.+.}, at: n_tty_write+0x4e3/0xff0 [ 38.404080] #4: 00000000d379db7a (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 38.404089] #5: 000000008523bf2a (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 38.404097] [ 38.404098] stack backtrace: [ 38.404102] CPU: 1 PID: 8110 Comm: syz-executor751 Not tainted 4.19.211-syzkaller #0 [ 38.404106] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 38.404107] Call Trace: [ 38.404109] dump_stack+0x1fc/0x2ef [ 38.404112] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 38.404114] __lock_acquire+0x30c9/0x3ff0 [ 38.404116] ? mark_held_locks+0xf0/0xf0 [ 38.404118] ? snprintf+0xf0/0xf0 [ 38.404120] ? console_unlock+0x3ec/0x1110 [ 38.404122] lock_acquire+0x170/0x3c0 [ 38.404124] ? console_unlock+0x3a9/0x1110 [ 38.404126] console_unlock+0x411/0x1110 [ 38.404128] ? console_unlock+0x3a9/0x1110 [ 38.404130] vprintk_emit+0x2d1/0x740 [ 38.404132] vprintk_func+0x79/0x180 [ 38.404134] printk+0xba/0xed [ 38.404136] ? log_store.cold+0x16/0x16 [ 38.404138] ? __lock_acquire+0x22f9/0x3ff0 [ 38.404140] ? ___ratelimit+0x319/0x590 [ 38.404142] should_fail+0x66b/0x7b0 [ 38.404144] ? setup_fault_attr+0x200/0x200 [ 38.404146] ? mark_held_locks+0xf0/0xf0 [ 38.404148] __should_failslab+0x115/0x180 [ 38.404150] should_failslab+0x5/0x10 [ 38.404152] __kmalloc+0x6d/0x3c0 [ 38.404154] ? tty_buffer_alloc+0x23f/0x2a0 [ 38.404156] ? __mutex_lock+0x368/0x1190 [ 38.404158] tty_buffer_alloc+0x23f/0x2a0 [ 38.404160] __tty_buffer_request_room+0x156/0x2a0 [ 38.404163] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 38.404165] ? do_raw_spin_lock+0xcb/0x220 [ 38.404167] pty_write+0x126/0x1f0 [ 38.404169] ? ptmx_open+0x350/0x350 [ 38.404171] n_tty_write+0x3c0/0xff0 [ 38.404173] ? n_tty_open+0x160/0x160 [ 38.404175] ? do_wait_intr_irq+0x270/0x270 [ 38.404177] ? __might_fault+0x192/0x1d0 [ 38.404179] tty_write+0x496/0x810 [ 38.404181] ? n_tty_open+0x160/0x160 [ 38.404183] __vfs_write+0xf7/0x770 [ 38.404185] ? tty_compat_ioctl+0x270/0x270 [ 38.404187] ? common_file_perm+0x4e5/0x850 [ 38.404189] ? kernel_read+0x110/0x110 [ 38.404191] ? trace_hardirqs_off+0x64/0x200 [ 38.404194] ? apparmor_getprocattr+0x11e0/0x11e0 [ 38.404196] ? vfs_write+0x3d7/0x540 [ 38.404198] ? security_file_permission+0x1c0/0x220 [ 38.404200] vfs_write+0x1f3/0x540 [ 38.404202] ksys_write+0x12b/0x2a0 [ 38.404204] ? __ia32_sys_read+0xb0/0xb0 [ 38.404206] ? trace_hardirqs_off_caller+0x6e/0x210 [ 38.404208] ? do_syscall_64+0x21/0x620 [ 38.404210] do_syscall_64+0xf9/0x620 [ 38.404213] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.404214] RIP: 0033:0x7f834492c789 [ 38.404222] 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 [ 38.404224] RSP: 002b:00007ffd210477e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 38.404229] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f834492c789 [ 38.404232] RDX: 00000000fffffedf RSI: 0000000020000000 RDI: 0000000000000004 [ 38.404235] RBP: 00007ffd21047800 R08: 0000000000000001 R09: 0000000000000001 [ 38.404238] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 38.404241] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000