[ 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.10.50' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.928031] FAULT_INJECTION: forcing a failure. [ 36.928031] name fail_page_alloc, interval 1, probability 0, space 0, times 1 [ 36.940741] CPU: 1 PID: 8099 Comm: syz-executor165 Not tainted 4.19.211-syzkaller #0 [ 36.948687] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 36.958017] Call Trace: [ 36.960590] dump_stack+0x1fc/0x2ef [ 36.964200] should_fail.cold+0xa/0xf [ 36.967987] ? setup_fault_attr+0x200/0x200 [ 36.972292] __alloc_pages_nodemask+0x239/0x2890 [ 36.977054] ? static_obj+0x50/0x50 [ 36.980674] ? get_reg+0x1f0/0x1f0 [ 36.984201] ? check_usage_backwards+0x300/0x300 [ 36.989040] ? gfp_pfmemalloc_allowed+0x150/0x150 [ 36.993878] ? __read_once_size_nocheck.constprop.0+0x10/0x10 [ 36.999750] ? deref_stack_reg+0x1d0/0x1d0 [ 37.003966] ? __bfs.part.0+0x1ce/0x450 [ 37.008075] ? is_bpf_text_address+0xd5/0x1b0 [ 37.012562] ? __lock_acquire+0x22f9/0x3ff0 [ 37.016871] cache_grow_begin+0xa4/0x8a0 [ 37.020937] ? setup_fault_attr+0x200/0x200 [ 37.025379] cache_alloc_refill+0x273/0x340 [ 37.029683] __kmalloc+0x362/0x3c0 [ 37.033203] ? tty_buffer_alloc+0x23f/0x2a0 [ 37.037552] tty_buffer_alloc+0x23f/0x2a0 [ 37.041790] __tty_buffer_request_room+0x156/0x2a0 [ 37.046741] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.052266] ? do_raw_spin_lock+0xcb/0x220 [ 37.056483] pty_write+0x126/0x1f0 [ 37.060009] n_tty_write+0xa03/0xff0 [ 37.063705] ? __ldsem_down_read_nested+0xd2/0x780 [ 37.068618] ? n_tty_open+0x160/0x160 [ 37.072500] ? do_wait_intr_irq+0x270/0x270 [ 37.076801] ? __might_fault+0x192/0x1d0 [ 37.081019] tty_write+0x496/0x810 [ 37.084541] ? n_tty_open+0x160/0x160 [ 37.088327] __vfs_write+0xf7/0x770 [ 37.091935] ? tty_compat_ioctl+0x270/0x270 [ 37.096235] ? common_file_perm+0x4e5/0x850 [ 37.100536] ? kernel_read+0x110/0x110 [ 37.104401] ? vm_insert_page+0x9c0/0x9c0 [ 37.108531] ? apparmor_getprocattr+0x11e0/0x11e0 [ 37.113378] ? vfs_write+0x3d7/0x540 [ 37.117078] ? security_file_permission+0x1c0/0x220 [ 37.122076] vfs_write+0x1f3/0x540 [ 37.125596] ksys_write+0x12b/0x2a0 [ 37.129219] ? __ia32_sys_read+0xb0/0xb0 [ 37.133291] ? trace_hardirqs_off_caller+0x6e/0x210 [ 37.138299] ? do_syscall_64+0x21/0x620 [ 37.142274] do_syscall_64+0xf9/0x620 [ 37.146076] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.151251] RIP: 0033:0x7f5247f17679 [ 37.154951] 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.174043] RSP: 002b:00007ffefed1b868 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 37.181745] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f5247f17679 [ 37.189018] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 37.196265] RBP: 00007ffefed1b870 R08: 0000000000000001 R09: 00007f5247ed0033 [ 37.203518] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 37.210766] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 37.218052] [ 37.218055] ====================================================== [ 37.218058] WARNING: possible circular locking dependency detected [ 37.218060] 4.19.211-syzkaller #0 Not tainted [ 37.218063] ------------------------------------------------------ [ 37.218065] syz-executor165/8099 is trying to acquire lock: [ 37.218067] 00000000ce26112d (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 37.218074] [ 37.218077] but task is already holding lock: [ 37.218078] 0000000073fdc6cf (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 37.218086] [ 37.218088] which lock already depends on the new lock. [ 37.218089] [ 37.218090] [ 37.218093] the existing dependency chain (in reverse order) is: [ 37.218094] [ 37.218095] -> #2 (&(&port->lock)->rlock){-.-.}: [ 37.218102] tty_port_tty_get+0x1d/0x80 [ 37.218105] tty_port_default_wakeup+0x11/0x40 [ 37.218107] serial8250_tx_chars+0x490/0xaf0 [ 37.218109] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 37.218112] serial8250_default_handle_irq+0xae/0x220 [ 37.218114] serial8250_interrupt+0x101/0x240 [ 37.218116] __handle_irq_event_percpu+0x27e/0x8e0 [ 37.218118] handle_irq_event+0x102/0x290 [ 37.218121] handle_edge_irq+0x260/0xcf0 [ 37.218122] handle_irq+0x35/0x50 [ 37.218124] do_IRQ+0x93/0x1c0 [ 37.218126] ret_from_intr+0x0/0x1e [ 37.218128] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 37.218130] uart_write+0x3bb/0x6f0 [ 37.218132] do_output_char+0x5de/0x850 [ 37.218134] n_tty_write+0x46e/0xff0 [ 37.218136] tty_write+0x496/0x810 [ 37.218138] redirected_tty_write+0xaa/0xb0 [ 37.218140] do_iter_write+0x461/0x5d0 [ 37.218142] vfs_writev+0x153/0x2e0 [ 37.218144] do_writev+0x136/0x330 [ 37.218146] do_syscall_64+0xf9/0x620 [ 37.218149] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.218150] [ 37.218151] -> #1 (&port_lock_key){-.-.}: [ 37.218158] serial8250_console_write+0x90e/0xb70 [ 37.218161] console_unlock+0xbb6/0x1110 [ 37.218163] vprintk_emit+0x2d1/0x740 [ 37.218166] vprintk_func+0x79/0x180 [ 37.218169] printk+0xba/0xed [ 37.218172] register_console+0x87f/0xc90 [ 37.218175] univ8250_console_init+0x3a/0x46 [ 37.218177] console_init+0x4cb/0x718 [ 37.218181] start_kernel+0x686/0x911 [ 37.218184] secondary_startup_64+0xa4/0xb0 [ 37.218186] [ 37.218188] -> #0 (console_owner){....}: [ 37.218198] console_unlock+0x411/0x1110 [ 37.218202] vprintk_emit+0x2d1/0x740 [ 37.218204] vprintk_func+0x79/0x180 [ 37.218207] printk+0xba/0xed [ 37.218210] should_fail+0x66b/0x7b0 [ 37.218214] __alloc_pages_nodemask+0x239/0x2890 [ 37.218217] cache_grow_begin+0xa4/0x8a0 [ 37.218220] cache_alloc_refill+0x273/0x340 [ 37.218222] __kmalloc+0x362/0x3c0 [ 37.218224] tty_buffer_alloc+0x23f/0x2a0 [ 37.218227] __tty_buffer_request_room+0x156/0x2a0 [ 37.218229] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.218231] pty_write+0x126/0x1f0 [ 37.218233] n_tty_write+0xa03/0xff0 [ 37.218235] tty_write+0x496/0x810 [ 37.218237] __vfs_write+0xf7/0x770 [ 37.218239] vfs_write+0x1f3/0x540 [ 37.218241] ksys_write+0x12b/0x2a0 [ 37.218243] do_syscall_64+0xf9/0x620 [ 37.218245] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.218246] [ 37.218249] other info that might help us debug this: [ 37.218250] [ 37.218251] Chain exists of: [ 37.218252] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 37.218262] [ 37.218264] Possible unsafe locking scenario: [ 37.218265] [ 37.218267] CPU0 CPU1 [ 37.218269] ---- ---- [ 37.218270] lock(&(&port->lock)->rlock); [ 37.218275] lock(&port_lock_key); [ 37.218280] lock(&(&port->lock)->rlock); [ 37.218284] lock(console_owner); [ 37.218288] [ 37.218290] *** DEADLOCK *** [ 37.218291] [ 37.218293] 6 locks held by syz-executor165/8099: [ 37.218294] #0: 0000000093df1ed9 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 37.218303] #1: 00000000c94ac3d4 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 37.218311] #2: 00000000ac86e364 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 37.218320] #3: 0000000013e41f68 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 37.218328] #4: 0000000073fdc6cf (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 37.218336] #5: 00000000a1675e29 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 37.218345] [ 37.218346] stack backtrace: [ 37.218350] CPU: 1 PID: 8099 Comm: syz-executor165 Not tainted 4.19.211-syzkaller #0 [ 37.218354] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 37.218355] Call Trace: [ 37.218357] dump_stack+0x1fc/0x2ef [ 37.218360] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 37.218362] __lock_acquire+0x30c9/0x3ff0 [ 37.218364] ? mark_held_locks+0xf0/0xf0 [ 37.218366] ? snprintf+0xf0/0xf0 [ 37.218368] ? console_unlock+0x3ec/0x1110 [ 37.218370] lock_acquire+0x170/0x3c0 [ 37.218372] ? console_unlock+0x3a9/0x1110 [ 37.218374] console_unlock+0x411/0x1110 [ 37.218376] ? console_unlock+0x3a9/0x1110 [ 37.218378] vprintk_emit+0x2d1/0x740 [ 37.218380] vprintk_func+0x79/0x180 [ 37.218381] printk+0xba/0xed [ 37.218383] ? log_store.cold+0x16/0x16 [ 37.218385] ? static_obj+0x50/0x50 [ 37.218387] ? ___ratelimit+0x319/0x590 [ 37.218389] should_fail+0x66b/0x7b0 [ 37.218391] ? setup_fault_attr+0x200/0x200 [ 37.218394] __alloc_pages_nodemask+0x239/0x2890 [ 37.218396] ? static_obj+0x50/0x50 [ 37.218398] ? get_reg+0x1f0/0x1f0 [ 37.218400] ? check_usage_backwards+0x300/0x300 [ 37.218402] ? gfp_pfmemalloc_allowed+0x150/0x150 [ 37.218405] ? __read_once_size_nocheck.constprop.0+0x10/0x10 [ 37.218407] ? deref_stack_reg+0x1d0/0x1d0 [ 37.218409] ? __bfs.part.0+0x1ce/0x450 [ 37.218411] ? is_bpf_text_address+0xd5/0x1b0 [ 37.218413] ? __lock_acquire+0x22f9/0x3ff0 [ 37.218415] cache_grow_begin+0xa4/0x8a0 [ 37.218418] ? setup_fault_attr+0x200/0x200 [ 37.218420] cache_alloc_refill+0x273/0x340 [ 37.218422] __kmalloc+0x362/0x3c0 [ 37.218424] ? tty_buffer_alloc+0x23f/0x2a0 [ 37.218426] tty_buffer_alloc+0x23f/0x2a0 [ 37.218428] __tty_buffer_request_room+0x156/0x2a0 [ 37.218431] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 37.218433] ? do_raw_spin_lock+0xcb/0x220 [ 37.218435] pty_write+0x126/0x1f0 [ 37.218436] n_tty_write+0xa03/0xff0 [ 37.218439] ? __ldsem_down_read_nested+0xd2/0x780 [ 37.218441] ? n_tty_open+0x160/0x160 [ 37.218443] ? do_wait_intr_irq+0x270/0x270 [ 37.218445] ? __might_fault+0x192/0x1d0 [ 37.218447] tty_write+0x496/0x810 [ 37.218449] ? n_tty_open+0x160/0x160 [ 37.218451] __vfs_write+0xf7/0x770 [ 37.218453] ? tty_compat_ioctl+0x270/0x270 [ 37.218455] ? common_file_perm+0x4e5/0x850 [ 37.218457] ? kernel_read+0x110/0x110 [ 37.218459] ? vm_insert_page+0x9c0/0x9c0 [ 37.218461] ? apparmor_getprocattr+0x11e0/0x11e0 [ 37.218463] ? vfs_write+0x3d7/0x540 [ 37.218466] ? security_file_permission+0x1c0/0x220 [ 37.218468] vfs_write+0x1f3/0x540 [ 37.218469] ksys_write+0x12b/0x2a0 [ 37.218471] ? __ia32_sys_read+0xb0/0xb0 [ 37.218474] ? trace_hardirqs_off_caller+0x6e/0x210 [ 37.218476] ? do_syscall_64+0x21/0x620 [ 37.218478] do_syscall_64+0xf9/0x620 [ 37.218480] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 37.218482] RIP: 0033:0x7f5247f17679 [ 37.218489] 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.218492] RSP: 002b:00007ffefed1b868 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 37.218497] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f5247f17679 [ 37.218500] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 37.218503] RBP: 00007ffefed1b870 R08: 0000000000000001 R09: 00007f5247ed0033 [ 37.218506] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 37.218509] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000