[ 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.156' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.166767] FAULT_INJECTION: forcing a failure. [ 36.166767] name failslab, interval 1, probability 0, space 0, times 1 [ 36.179391] CPU: 0 PID: 8093 Comm: syz-executor371 Not tainted 4.19.211-syzkaller #0 [ 36.187248] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 36.196577] Call Trace: [ 36.199144] dump_stack+0x1fc/0x2ef [ 36.202751] should_fail.cold+0xa/0xf [ 36.206529] ? setup_fault_attr+0x200/0x200 [ 36.210827] ? mark_held_locks+0xf0/0xf0 [ 36.214865] ? lock_acquire+0x170/0x3c0 [ 36.218818] __should_failslab+0x115/0x180 [ 36.223031] should_failslab+0x5/0x10 [ 36.226809] __kmalloc+0x6d/0x3c0 [ 36.230243] ? tty_buffer_alloc+0x23f/0x2a0 [ 36.234541] ? __mutex_lock+0x368/0x1190 [ 36.238581] tty_buffer_alloc+0x23f/0x2a0 [ 36.242708] __tty_buffer_request_room+0x156/0x2a0 [ 36.247621] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 36.253139] ? do_raw_spin_lock+0xcb/0x220 [ 36.257360] pty_write+0x126/0x1f0 [ 36.260897] n_tty_write+0xa03/0xff0 [ 36.264590] ? __ldsem_down_read_nested+0xd2/0x780 [ 36.269497] ? n_tty_open+0x160/0x160 [ 36.273274] ? do_wait_intr_irq+0x270/0x270 [ 36.277571] ? __might_fault+0x192/0x1d0 [ 36.281609] tty_write+0x496/0x810 [ 36.285128] ? n_tty_open+0x160/0x160 [ 36.288923] __vfs_write+0xf7/0x770 [ 36.292545] ? tty_compat_ioctl+0x270/0x270 [ 36.296848] ? common_file_perm+0x4e5/0x850 [ 36.301155] ? kernel_read+0x110/0x110 [ 36.305025] ? trace_hardirqs_off+0x64/0x200 [ 36.309450] ? apparmor_getprocattr+0x11e0/0x11e0 [ 36.314279] ? vfs_write+0x3d7/0x540 [ 36.317984] ? security_file_permission+0x1c0/0x220 [ 36.322985] vfs_write+0x1f3/0x540 [ 36.326516] ksys_write+0x12b/0x2a0 [ 36.330127] ? __ia32_sys_read+0xb0/0xb0 [ 36.334168] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.339166] ? do_syscall_64+0x21/0x620 [ 36.343119] do_syscall_64+0xf9/0x620 [ 36.346899] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.352072] RIP: 0033:0x7fdf2684d679 [ 36.355766] 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 [ 36.374651] RSP: 002b:00007ffd650d5c98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 36.382338] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fdf2684d679 [ 36.389586] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 36.396833] RBP: 00007ffd650d5ca0 R08: 0000000000000001 R09: 00007fdf26810033 [ 36.404087] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 36.411339] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 36.418620] [ 36.418624] ====================================================== [ 36.418627] WARNING: possible circular locking dependency detected [ 36.418629] 4.19.211-syzkaller #0 Not tainted [ 36.418632] ------------------------------------------------------ [ 36.418634] syz-executor371/8093 is trying to acquire lock: [ 36.418636] 00000000ea55aa81 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 36.418643] [ 36.418646] but task is already holding lock: [ 36.418647] 00000000b845c09c (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 36.418655] [ 36.418657] which lock already depends on the new lock. [ 36.418658] [ 36.418659] [ 36.418662] the existing dependency chain (in reverse order) is: [ 36.418663] [ 36.418664] -> #2 (&(&port->lock)->rlock){-.-.}: [ 36.418672] tty_port_tty_get+0x1d/0x80 [ 36.418674] tty_port_default_wakeup+0x11/0x40 [ 36.418676] serial8250_tx_chars+0x490/0xaf0 [ 36.418679] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 36.418681] serial8250_default_handle_irq+0xae/0x220 [ 36.418684] serial8250_interrupt+0x101/0x240 [ 36.418686] __handle_irq_event_percpu+0x27e/0x8e0 [ 36.418688] handle_irq_event+0x102/0x290 [ 36.418690] handle_edge_irq+0x260/0xcf0 [ 36.418692] handle_irq+0x35/0x50 [ 36.418694] do_IRQ+0x93/0x1c0 [ 36.418696] ret_from_intr+0x0/0x1e [ 36.418698] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 36.418700] uart_write+0x3bb/0x6f0 [ 36.418702] do_output_char+0x5de/0x850 [ 36.418704] n_tty_write+0x46e/0xff0 [ 36.418706] tty_write+0x496/0x810 [ 36.418708] redirected_tty_write+0xaa/0xb0 [ 36.418710] do_iter_write+0x461/0x5d0 [ 36.418712] vfs_writev+0x153/0x2e0 [ 36.418714] do_writev+0x136/0x330 [ 36.418716] do_syscall_64+0xf9/0x620 [ 36.418718] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.418719] [ 36.418720] -> #1 (&port_lock_key){-.-.}: [ 36.418728] serial8250_console_write+0x90e/0xb70 [ 36.418730] console_unlock+0xbb6/0x1110 [ 36.418732] vprintk_emit+0x2d1/0x740 [ 36.418734] vprintk_func+0x79/0x180 [ 36.418735] printk+0xba/0xed [ 36.418738] register_console+0x87f/0xc90 [ 36.418740] univ8250_console_init+0x3a/0x46 [ 36.418742] console_init+0x4cb/0x718 [ 36.418744] start_kernel+0x686/0x911 [ 36.418746] secondary_startup_64+0xa4/0xb0 [ 36.418747] [ 36.418748] -> #0 (console_owner){....}: [ 36.418755] console_unlock+0x411/0x1110 [ 36.418757] vprintk_emit+0x2d1/0x740 [ 36.418759] vprintk_func+0x79/0x180 [ 36.418761] printk+0xba/0xed [ 36.418763] should_fail+0x66b/0x7b0 [ 36.418765] __should_failslab+0x115/0x180 [ 36.418767] should_failslab+0x5/0x10 [ 36.418769] __kmalloc+0x6d/0x3c0 [ 36.418771] tty_buffer_alloc+0x23f/0x2a0 [ 36.418773] __tty_buffer_request_room+0x156/0x2a0 [ 36.418776] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 36.418778] pty_write+0x126/0x1f0 [ 36.418780] n_tty_write+0xa03/0xff0 [ 36.418782] tty_write+0x496/0x810 [ 36.418784] __vfs_write+0xf7/0x770 [ 36.418785] vfs_write+0x1f3/0x540 [ 36.418787] ksys_write+0x12b/0x2a0 [ 36.418789] do_syscall_64+0xf9/0x620 [ 36.418792] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.418793] [ 36.418795] other info that might help us debug this: [ 36.418796] [ 36.418798] Chain exists of: [ 36.418799] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 36.418808] [ 36.418810] Possible unsafe locking scenario: [ 36.418811] [ 36.418813] CPU0 CPU1 [ 36.418815] ---- ---- [ 36.418816] lock(&(&port->lock)->rlock); [ 36.418821] lock(&port_lock_key); [ 36.418826] lock(&(&port->lock)->rlock); [ 36.418830] lock(console_owner); [ 36.418834] [ 36.418836] *** DEADLOCK *** [ 36.418837] [ 36.418839] 6 locks held by syz-executor371/8093: [ 36.418840] #0: 000000009db18c74 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 36.418849] #1: 0000000027b1394e (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 36.418857] #2: 00000000ca516e01 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 36.418866] #3: 000000004416520a (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 36.418874] #4: 00000000b845c09c (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 36.418882] #5: 000000000a452444 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 36.418891] [ 36.418892] stack backtrace: [ 36.418895] CPU: 0 PID: 8093 Comm: syz-executor371 Not tainted 4.19.211-syzkaller #0 [ 36.418899] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 36.418901] Call Trace: [ 36.418903] dump_stack+0x1fc/0x2ef [ 36.418905] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 36.418908] __lock_acquire+0x30c9/0x3ff0 [ 36.418910] ? mark_held_locks+0xf0/0xf0 [ 36.418911] ? snprintf+0xf0/0xf0 [ 36.418914] ? console_unlock+0x3ec/0x1110 [ 36.418916] lock_acquire+0x170/0x3c0 [ 36.418918] ? console_unlock+0x3a9/0x1110 [ 36.418920] console_unlock+0x411/0x1110 [ 36.418922] ? console_unlock+0x3a9/0x1110 [ 36.418924] vprintk_emit+0x2d1/0x740 [ 36.418926] vprintk_func+0x79/0x180 [ 36.418928] printk+0xba/0xed [ 36.418930] ? log_store.cold+0x16/0x16 [ 36.418932] ? set_next_entity+0xb52/0x1dc0 [ 36.418934] ? __lock_acquire+0x6de/0x3ff0 [ 36.418936] ? ___ratelimit+0x319/0x590 [ 36.418938] should_fail+0x66b/0x7b0 [ 36.418940] ? setup_fault_attr+0x200/0x200 [ 36.418942] ? mark_held_locks+0xf0/0xf0 [ 36.418944] ? lock_acquire+0x170/0x3c0 [ 36.418946] __should_failslab+0x115/0x180 [ 36.418948] should_failslab+0x5/0x10 [ 36.418950] __kmalloc+0x6d/0x3c0 [ 36.418952] ? tty_buffer_alloc+0x23f/0x2a0 [ 36.418954] ? __mutex_lock+0x368/0x1190 [ 36.418956] tty_buffer_alloc+0x23f/0x2a0 [ 36.418958] __tty_buffer_request_room+0x156/0x2a0 [ 36.418961] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 36.418963] ? do_raw_spin_lock+0xcb/0x220 [ 36.418965] pty_write+0x126/0x1f0 [ 36.418967] n_tty_write+0xa03/0xff0 [ 36.418969] ? __ldsem_down_read_nested+0xd2/0x780 [ 36.418971] ? n_tty_open+0x160/0x160 [ 36.418973] ? do_wait_intr_irq+0x270/0x270 [ 36.418975] ? __might_fault+0x192/0x1d0 [ 36.418977] tty_write+0x496/0x810 [ 36.418979] ? n_tty_open+0x160/0x160 [ 36.418981] __vfs_write+0xf7/0x770 [ 36.418983] ? tty_compat_ioctl+0x270/0x270 [ 36.418985] ? common_file_perm+0x4e5/0x850 [ 36.418987] ? kernel_read+0x110/0x110 [ 36.418990] ? trace_hardirqs_off+0x64/0x200 [ 36.418992] ? apparmor_getprocattr+0x11e0/0x11e0 [ 36.418994] ? vfs_write+0x3d7/0x540 [ 36.418996] ? security_file_permission+0x1c0/0x220 [ 36.418998] vfs_write+0x1f3/0x540 [ 36.419000] ksys_write+0x12b/0x2a0 [ 36.419002] ? __ia32_sys_read+0xb0/0xb0 [ 36.419005] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.419007] ? do_syscall_64+0x21/0x620 [ 36.419009] do_syscall_64+0xf9/0x620 [ 36.419011] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.419013] RIP: 0033:0x7fdf2684d679 [ 36.419020] 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 [ 36.419022] RSP: 002b:00007ffd650d5c98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 36.419027] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fdf2684d679 [ 36.419031] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 36.419034] RBP: 00007ffd650d5ca0 R08: 0000000000000001 R09: 00007fdf26810033 [ 36.419037] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 36.419040] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000