[ 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.0.201' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.864323] FAULT_INJECTION: forcing a failure. [ 31.864323] name failslab, interval 1, probability 0, space 0, times 1 [ 31.877317] CPU: 1 PID: 8103 Comm: syz-executor243 Not tainted 4.19.211-syzkaller #0 [ 31.885174] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 31.894502] Call Trace: [ 31.897073] dump_stack+0x1fc/0x2ef [ 31.900680] should_fail.cold+0xa/0xf [ 31.904461] ? setup_fault_attr+0x200/0x200 [ 31.908759] ? mark_held_locks+0xf0/0xf0 [ 31.912796] ? lock_acquire+0x170/0x3c0 [ 31.916746] __should_failslab+0x115/0x180 [ 31.920960] should_failslab+0x5/0x10 [ 31.924736] __kmalloc+0x6d/0x3c0 [ 31.928167] ? tty_buffer_alloc+0x23f/0x2a0 [ 31.932462] ? __mutex_lock+0x368/0x1190 [ 31.936495] tty_buffer_alloc+0x23f/0x2a0 [ 31.940619] __tty_buffer_request_room+0x156/0x2a0 [ 31.945526] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 31.951038] ? do_raw_spin_lock+0xcb/0x220 [ 31.955253] pty_write+0x126/0x1f0 [ 31.958770] n_tty_write+0xa03/0xff0 [ 31.962463] ? __ldsem_down_read_nested+0xd2/0x780 [ 31.967373] ? n_tty_open+0x160/0x160 [ 31.971154] ? check_preemption_disabled+0x41/0x280 [ 31.976144] ? do_wait_intr_irq+0x270/0x270 [ 31.980444] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 31.985610] ? __phys_addr+0x9a/0x110 [ 31.989388] ? __might_fault+0x50/0x1d0 [ 31.993338] tty_write+0x496/0x810 [ 31.996855] ? n_tty_open+0x160/0x160 [ 32.000632] __vfs_write+0xf7/0x770 [ 32.004233] ? tty_compat_ioctl+0x270/0x270 [ 32.008534] ? kernel_read+0x110/0x110 [ 32.012412] ? find_get_pages_range_tag+0xc50/0xc50 [ 32.017413] ? sanity+0x234/0x330 [ 32.020855] ? ondemand_readahead.isra.0+0x575/0xd40 [ 32.025935] ? copy_page_to_iter+0x4f8/0xe00 [ 32.030336] __kernel_write+0x109/0x370 [ 32.034289] write_pipe_buf+0x153/0x1f0 [ 32.038244] ? default_file_splice_read+0xa00/0xa00 [ 32.043242] ? splice_from_pipe_next.part.0+0x2ad/0x360 [ 32.048588] ? page_cache_pipe_buf_confirm+0x1e5/0x2a0 [ 32.053845] __splice_from_pipe+0x389/0x800 [ 32.058148] ? default_file_splice_read+0xa00/0xa00 [ 32.063140] default_file_splice_write+0xd8/0x180 [ 32.067964] ? generic_splice_sendpage+0x140/0x140 [ 32.072874] ? security_file_permission+0x1c0/0x220 [ 32.077870] ? generic_splice_sendpage+0x140/0x140 [ 32.082779] direct_splice_actor+0x115/0x160 [ 32.087166] splice_direct_to_actor+0x33f/0x8d0 [ 32.091812] ? generic_pipe_buf_nosteal+0x10/0x10 [ 32.096629] ? do_splice_to+0x160/0x160 [ 32.100581] do_splice_direct+0x1a7/0x270 [ 32.104708] ? splice_direct_to_actor+0x8d0/0x8d0 [ 32.109529] ? security_file_permission+0x1c0/0x220 [ 32.114523] do_sendfile+0x550/0xc30 [ 32.118221] ? do_compat_pwritev64+0x1b0/0x1b0 [ 32.122782] ? vfs_write+0x393/0x540 [ 32.126474] __se_sys_sendfile64+0x147/0x160 [ 32.130858] ? __se_sys_sendfile+0x180/0x180 [ 32.135246] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.140588] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.145583] ? do_syscall_64+0x21/0x620 [ 32.149533] do_syscall_64+0xf9/0x620 [ 32.153312] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.158477] RIP: 0033:0x7fca79dff719 [ 32.162167] 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.181043] RSP: 002b:00007ffc938e6608 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 [ 32.188724] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fca79dff719 [ 32.195969] RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004 [ 32.203214] RBP: 00007ffc938e6610 R08: 0000000000000002 R09: 00007fca79003432 [ 32.210463] R10: 0000000000007fff R11: 0000000000000246 R12: 0000000000000005 [ 32.217705] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.224978] [ 32.224982] ====================================================== [ 32.224984] WARNING: possible circular locking dependency detected [ 32.224986] 4.19.211-syzkaller #0 Not tainted [ 32.224989] ------------------------------------------------------ [ 32.224992] syz-executor243/8103 is trying to acquire lock: [ 32.224994] 00000000394816cf (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 32.225001] [ 32.225004] but task is already holding lock: [ 32.225005] 000000006e2c14af (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.225013] [ 32.225015] which lock already depends on the new lock. [ 32.225016] [ 32.225017] [ 32.225020] the existing dependency chain (in reverse order) is: [ 32.225021] [ 32.225022] -> #2 (&(&port->lock)->rlock){-.-.}: [ 32.225029] tty_port_tty_get+0x1d/0x80 [ 32.225032] tty_port_default_wakeup+0x11/0x40 [ 32.225034] serial8250_tx_chars+0x490/0xaf0 [ 32.225036] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 32.225039] serial8250_default_handle_irq+0xae/0x220 [ 32.225041] serial8250_interrupt+0x101/0x240 [ 32.225043] __handle_irq_event_percpu+0x27e/0x8e0 [ 32.225045] handle_irq_event+0x102/0x290 [ 32.225048] handle_edge_irq+0x260/0xcf0 [ 32.225050] handle_irq+0x35/0x50 [ 32.225051] do_IRQ+0x93/0x1c0 [ 32.225053] ret_from_intr+0x0/0x1e [ 32.225056] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 32.225058] uart_write+0x3bb/0x6f0 [ 32.225060] do_output_char+0x5de/0x850 [ 32.225062] n_tty_write+0x46e/0xff0 [ 32.225064] tty_write+0x496/0x810 [ 32.225066] redirected_tty_write+0xaa/0xb0 [ 32.225068] do_iter_write+0x461/0x5d0 [ 32.225070] vfs_writev+0x153/0x2e0 [ 32.225072] do_writev+0x136/0x330 [ 32.225074] do_syscall_64+0xf9/0x620 [ 32.225076] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.225077] [ 32.225078] -> #1 (&port_lock_key){-.-.}: [ 32.225086] serial8250_console_write+0x90e/0xb70 [ 32.225088] console_unlock+0xbb6/0x1110 [ 32.225090] vprintk_emit+0x2d1/0x740 [ 32.225092] vprintk_func+0x79/0x180 [ 32.225093] printk+0xba/0xed [ 32.225095] register_console+0x87f/0xc90 [ 32.225098] univ8250_console_init+0x3a/0x46 [ 32.225100] console_init+0x4cb/0x718 [ 32.225102] start_kernel+0x686/0x911 [ 32.225104] secondary_startup_64+0xa4/0xb0 [ 32.225105] [ 32.225106] -> #0 (console_owner){....}: [ 32.225113] console_unlock+0x411/0x1110 [ 32.225115] vprintk_emit+0x2d1/0x740 [ 32.225117] vprintk_func+0x79/0x180 [ 32.225119] printk+0xba/0xed [ 32.225121] should_fail+0x66b/0x7b0 [ 32.225123] __should_failslab+0x115/0x180 [ 32.225125] should_failslab+0x5/0x10 [ 32.225127] __kmalloc+0x6d/0x3c0 [ 32.225129] tty_buffer_alloc+0x23f/0x2a0 [ 32.225131] __tty_buffer_request_room+0x156/0x2a0 [ 32.225134] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.225135] pty_write+0x126/0x1f0 [ 32.225137] n_tty_write+0xa03/0xff0 [ 32.225139] tty_write+0x496/0x810 [ 32.225141] __vfs_write+0xf7/0x770 [ 32.225143] __kernel_write+0x109/0x370 [ 32.225145] write_pipe_buf+0x153/0x1f0 [ 32.225148] __splice_from_pipe+0x389/0x800 [ 32.225150] default_file_splice_write+0xd8/0x180 [ 32.225152] direct_splice_actor+0x115/0x160 [ 32.225154] splice_direct_to_actor+0x33f/0x8d0 [ 32.225157] do_splice_direct+0x1a7/0x270 [ 32.225158] do_sendfile+0x550/0xc30 [ 32.225161] __se_sys_sendfile64+0x147/0x160 [ 32.225163] do_syscall_64+0xf9/0x620 [ 32.225165] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.225166] [ 32.225168] other info that might help us debug this: [ 32.225170] [ 32.225171] Chain exists of: [ 32.225172] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 32.225181] [ 32.225183] Possible unsafe locking scenario: [ 32.225184] [ 32.225187] CPU0 CPU1 [ 32.225189] ---- ---- [ 32.225190] lock(&(&port->lock)->rlock); [ 32.225195] lock(&port_lock_key); [ 32.225200] lock(&(&port->lock)->rlock); [ 32.225204] lock(console_owner); [ 32.225208] [ 32.225209] *** DEADLOCK *** [ 32.225210] [ 32.225212] 6 locks held by syz-executor243/8103: [ 32.225214] #0: 00000000906ceb63 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 32.225227] #1: 00000000cb1581a4 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 32.225235] #2: 00000000542f9b48 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 32.225244] #3: 00000000743f910b (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 32.225252] #4: 000000006e2c14af (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 32.225261] #5: 00000000e539fa8e (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 32.225269] [ 32.225270] stack backtrace: [ 32.225274] CPU: 1 PID: 8103 Comm: syz-executor243 Not tainted 4.19.211-syzkaller #0 [ 32.225278] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.225279] Call Trace: [ 32.225281] dump_stack+0x1fc/0x2ef [ 32.225284] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 32.225286] __lock_acquire+0x30c9/0x3ff0 [ 32.225288] ? mark_held_locks+0xf0/0xf0 [ 32.225290] ? snprintf+0xf0/0xf0 [ 32.225292] ? console_unlock+0x3ec/0x1110 [ 32.225294] lock_acquire+0x170/0x3c0 [ 32.225296] ? console_unlock+0x3a9/0x1110 [ 32.225298] console_unlock+0x411/0x1110 [ 32.225300] ? console_unlock+0x3a9/0x1110 [ 32.225302] vprintk_emit+0x2d1/0x740 [ 32.225304] vprintk_func+0x79/0x180 [ 32.225306] printk+0xba/0xed [ 32.225308] ? log_store.cold+0x16/0x16 [ 32.225310] ? try_to_wake_up+0x733/0x1050 [ 32.225312] ? __lock_acquire+0x6de/0x3ff0 [ 32.225314] ? ___ratelimit+0x319/0x590 [ 32.225316] should_fail+0x66b/0x7b0 [ 32.225318] ? setup_fault_attr+0x200/0x200 [ 32.225320] ? mark_held_locks+0xf0/0xf0 [ 32.225322] ? lock_acquire+0x170/0x3c0 [ 32.225324] __should_failslab+0x115/0x180 [ 32.225326] should_failslab+0x5/0x10 [ 32.225328] __kmalloc+0x6d/0x3c0 [ 32.225330] ? tty_buffer_alloc+0x23f/0x2a0 [ 32.225332] ? __mutex_lock+0x368/0x1190 [ 32.225334] tty_buffer_alloc+0x23f/0x2a0 [ 32.225337] __tty_buffer_request_room+0x156/0x2a0 [ 32.225339] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 32.225341] ? do_raw_spin_lock+0xcb/0x220 [ 32.225343] pty_write+0x126/0x1f0 [ 32.225345] n_tty_write+0xa03/0xff0 [ 32.225348] ? __ldsem_down_read_nested+0xd2/0x780 [ 32.225349] ? n_tty_open+0x160/0x160 [ 32.225352] ? check_preemption_disabled+0x41/0x280 [ 32.225354] ? do_wait_intr_irq+0x270/0x270 [ 32.225356] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 32.225358] ? __phys_addr+0x9a/0x110 [ 32.225360] ? __might_fault+0x50/0x1d0 [ 32.225362] tty_write+0x496/0x810 [ 32.225364] ? n_tty_open+0x160/0x160 [ 32.225366] __vfs_write+0xf7/0x770 [ 32.225368] ? tty_compat_ioctl+0x270/0x270 [ 32.225370] ? kernel_read+0x110/0x110 [ 32.225373] ? find_get_pages_range_tag+0xc50/0xc50 [ 32.225374] ? sanity+0x234/0x330 [ 32.225377] ? ondemand_readahead.isra.0+0x575/0xd40 [ 32.225379] ? copy_page_to_iter+0x4f8/0xe00 [ 32.225381] __kernel_write+0x109/0x370 [ 32.225383] write_pipe_buf+0x153/0x1f0 [ 32.225385] ? default_file_splice_read+0xa00/0xa00 [ 32.225388] ? splice_from_pipe_next.part.0+0x2ad/0x360 [ 32.225390] ? page_cache_pipe_buf_confirm+0x1e5/0x2a0 [ 32.225393] __splice_from_pipe+0x389/0x800 [ 32.225395] ? default_file_splice_read+0xa00/0xa00 [ 32.225397] default_file_splice_write+0xd8/0x180 [ 32.225400] ? generic_splice_sendpage+0x140/0x140 [ 32.225402] ? security_file_permission+0x1c0/0x220 [ 32.225404] ? generic_splice_sendpage+0x140/0x140 [ 32.225406] direct_splice_actor+0x115/0x160 [ 32.225409] splice_direct_to_actor+0x33f/0x8d0 [ 32.225411] ? generic_pipe_buf_nosteal+0x10/0x10 [ 32.225413] ? do_splice_to+0x160/0x160 [ 32.225415] do_splice_direct+0x1a7/0x270 [ 32.225417] ? splice_direct_to_actor+0x8d0/0x8d0 [ 32.225420] ? security_file_permission+0x1c0/0x220 [ 32.225422] do_sendfile+0x550/0xc30 [ 32.225424] ? do_compat_pwritev64+0x1b0/0x1b0 [ 32.225426] ? vfs_write+0x393/0x540 [ 32.225428] __se_sys_sendfile64+0x147/0x160 [ 32.225430] ? __se_sys_sendfile+0x180/0x180 [ 32.225433] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.225436] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.225438] ? do_syscall_64+0x21/0x620 [ 32.225440] do_syscall_64+0xf9/0x620 [ 32.225442] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.225444] RIP: 0033:0x7fca79dff719 [ 32.225451] 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.225453] RSP: 002b:00007ffc938e6608 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 [ 32.225458] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fca79dff719 [ 32.225462] RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004 [ 32.225465] RBP: 00007ffc938e6610 R08: 0000000000000002 R09: 00007fca79003432 [ 32.225468] R10: 0000000000007fff R11: 0000000000000246 R12: 0000000000000005 [ 32.225471] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000