audit: type=1800 audit(1666739260.189:166): pid=27069 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file0" dev="sda1" ino=14208 res=0 BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 in_atomic(): 1, irqs_disabled(): 1, pid: 27041, name: syz-executor.5 3 locks held by syz-executor.5/27041: #0: 00000000d888b2ba (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272 #1: 000000009fc6f980 (&(&gsm->control_lock)->rlock){....}, at: gsm_control_send+0x109/0x4b0 drivers/tty/n_gsm.c:1365 #2: 00000000eccdbd5a (&(&gsm->tx_lock)->rlock){....}, at: gsm_data_queue drivers/tty/n_gsm.c:777 [inline] #2: 00000000eccdbd5a (&(&gsm->tx_lock)->rlock){....}, at: gsm_control_transmit+0x1b5/0x290 drivers/tty/n_gsm.c:1306 irq event stamp: 424 hardirqs last enabled at (423): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (423): [] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:184 hardirqs last disabled at (424): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (424): [] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:152 softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856 softirqs last disabled at (0): [<0000000000000000>] (null) Preemption disabled at: [<0000000000000000>] (null) CPU: 1 PID: 27041 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192 do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2599 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4660f985a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f465f4ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46610b9050 RCX: 00007f4660f985a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f4660ff37b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6244adf R14: 00007f465f4ea300 R15: 0000000000022000 ======================================================== WARNING: possible irq lock inversion dependency detected 4.19.211-syzkaller #0 Tainted: G W -------------------------------------------------------- syz-executor.5/27041 just changed the state of lock: 000000009fc6f980 (&(&gsm->control_lock)->rlock){..-.}, at: gsm_control_retransmit+0x20/0x220 drivers/tty/n_gsm.c:1325 but this lock took another, SOFTIRQ-unsafe lock in the past: (console_lock){+.+.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &(&gsm->control_lock)->rlock --> &(&gsm->tx_lock)->rlock --> console_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(console_lock); local_irq_disable(); lock(&(&gsm->control_lock)->rlock); lock(&(&gsm->tx_lock)->rlock); lock(&(&gsm->control_lock)->rlock); *** DEADLOCK *** 2 locks held by syz-executor.5/27041: #0: 00000000d888b2ba (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272 #1: 000000007ec0b1f9 ((&gsm->t2_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #1: 000000007ec0b1f9 ((&gsm->t2_timer)){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 the shortest dependencies between 2nd lock and 1st lock: -> (console_lock){+.+.} ops: 25091 { HARDIRQ-ON-W at: console_lock+0x44/0x80 kernel/printk/printk.c:2275 con_init+0x12/0x605 drivers/tty/vt/vt.c:3363 console_init+0x4cb/0x718 kernel/printk/printk.c:2862 start_kernel+0x686/0x911 init/main.c:659 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 SOFTIRQ-ON-W at: console_lock+0x44/0x80 kernel/printk/printk.c:2275 con_init+0x12/0x605 drivers/tty/vt/vt.c:3363 console_init+0x4cb/0x718 kernel/printk/printk.c:2862 start_kernel+0x686/0x911 init/main.c:659 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 INITIAL USE at: } ... key at: [] console_lock_dep_map+0x0/0x40 ... acquired at: do_con_write+0x11b/0x1d90 drivers/tty/vt/vt.c:2601 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> (&(&gsm->tx_lock)->rlock){....} ops: 1 { INITIAL USE at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 gsm_data_queue drivers/tty/n_gsm.c:777 [inline] gsm_control_transmit+0x1b5/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.4+0x0/0x40 ... acquired at: gsm_data_queue drivers/tty/n_gsm.c:777 [inline] gsm_control_transmit+0x1b5/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> (&(&gsm->control_lock)->rlock){..-.} ops: 2 { IN-SOFTIRQ-W at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 gsm_control_retransmit+0x20/0x220 drivers/tty/n_gsm.c:1325 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:184 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] gsm_control_send+0x3b1/0x4b0 drivers/tty/n_gsm.c:1383 audit: type=1804 audit(1666739260.189:167): pid=27069 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir3479113903/syzkaller.F2RiLa/147/file0" dev="sda1" ino=14208 res=1 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe INITIAL USE at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 gsm_control_send+0x109/0x4b0 drivers/tty/n_gsm.c:1365 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.5+0x0/0x40 ... acquired at: mark_irqflags kernel/locking/lockdep.c:3010 [inline] __lock_acquire+0xdc4/0x3ff0 kernel/locking/lockdep.c:3373 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 gsm_control_retransmit+0x20/0x220 drivers/tty/n_gsm.c:1325 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 audit: type=1804 audit(1666739260.199:168): pid=27069 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir3479113903/syzkaller.F2RiLa/147/file0" dev="sda1" ino=14208 res=1 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:184 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] gsm_control_send+0x3b1/0x4b0 drivers/tty/n_gsm.c:1383 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe stack backtrace: CPU: 1 PID: 27041 Comm: syz-executor.5 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_irq_inversion_bug.cold+0x313/0x346 kernel/locking/lockdep.c:2626 check_usage_forwards+0x1a2/0x310 kernel/locking/lockdep.c:2651 mark_lock_irq kernel/locking/lockdep.c:2760 [inline] mark_lock+0x3d8/0x1160 kernel/locking/lockdep.c:3132 audit: type=1800 audit(1666739260.369:169): pid=27102 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14199 res=0 mark_irqflags kernel/locking/lockdep.c:3010 [inline] __lock_acquire+0xdc4/0x3ff0 kernel/locking/lockdep.c:3373 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 gsm_control_retransmit+0x20/0x220 drivers/tty/n_gsm.c:1325 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:184 Code: 48 c7 c0 88 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 2f 48 83 3d 7c 31 d8 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb b2 e8 fb eb e6 f8 eb c0 0f 0b 0f 0b 48 c7 c7 88 audit: type=1804 audit(1666739260.399:170): pid=27102 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir171609595/syzkaller.WGWkL7/99/file0" dev="sda1" ino=14199 res=1 RSP: 0018:ffff8880633bf848 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: 0000000000000286 RCX: 1ffff11014e9e1cd RDX: dffffc0000000000 RSI: ffff8880a74f0e48 RDI: 0000000000000286 RBP: ffff888098aa6ed8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000286 R13: ffff8880633bf8b8 R14: ffff888098aa6b88 R15: ffff888098aa6ed8 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] gsm_control_send+0x3b1/0x4b0 drivers/tty/n_gsm.c:1383 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 audit: type=1804 audit(1666739260.409:171): pid=27102 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.3" name="/root/syzkaller-testdir171609595/syzkaller.WGWkL7/99/file0" dev="sda1" ino=14199 res=1 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4660f985a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f465f4ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46610b9050 RCX: 00007f4660f985a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f4660ff37b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6244adf R14: 00007f465f4ea300 R15: 0000000000022000 audit: type=1800 audit(1666739262.839:172): pid=27142 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="sda1" ino=14222 res=0 input: syz0 as /devices/virtual/input/input24 BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 in_atomic(): 1, irqs_disabled(): 1, pid: 27247, name: syz-executor.5 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] (null) hardirqs last disabled at (0): [] copy_process.part.0+0x1518/0x8260 kernel/fork.c:1853 softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856 softirqs last disabled at (0): [<0000000000000000>] (null) Preemption disabled at: [<0000000000000000>] (null) CPU: 0 PID: 27247 Comm: syz-executor.5 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192 do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2599 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4660f985a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f465f4ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46610b9050 RCX: 00007f4660f985a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f4660ff37b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6244adf R14: 00007f465f4ea300 R15: 0000000000022000 input: syz0 as /devices/virtual/input/input25 kauditd_printk_skb: 8 callbacks suppressed audit: type=1800 audit(1666739265.070:181): pid=27338 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="file0" dev="sda1" ino=14224 res=0 audit: type=1804 audit(1666739265.090:182): pid=27338 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir3479113903/syzkaller.F2RiLa/149/file0" dev="sda1" ino=14224 res=1 audit: type=1804 audit(1666739265.090:183): pid=27338 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir3479113903/syzkaller.F2RiLa/149/file0" dev="sda1" ino=14224 res=1 BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 in_atomic(): 1, irqs_disabled(): 1, pid: 27453, name: syz-executor.5 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] (null) hardirqs last disabled at (0): [] copy_process.part.0+0x1518/0x8260 kernel/fork.c:1853 softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856 softirqs last disabled at (0): [<0000000000000000>] (null) Preemption disabled at: [<0000000000000000>] (null) CPU: 1 PID: 27453 Comm: syz-executor.5 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192 do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2599 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4660f985a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f465f4ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46610b9050 RCX: 00007f4660f985a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f4660ff37b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6244adf R14: 00007f465f4ea300 R15: 0000000000022000 xt_CT: You must specify a L4 protocol and not use inversions on it xt_CT: You must specify a L4 protocol and not use inversions on it xt_CT: You must specify a L4 protocol and not use inversions on it xt_CT: You must specify a L4 protocol and not use inversions on it BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 in_atomic(): 1, irqs_disabled(): 1, pid: 27763, name: syz-executor.5 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] (null) hardirqs last disabled at (0): [] copy_process.part.0+0x1518/0x8260 kernel/fork.c:1853 softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856 softirqs last disabled at (0): [<0000000000000000>] (null) Preemption disabled at: [<0000000000000000>] (null) CPU: 1 PID: 27763 Comm: syz-executor.5 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192 do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2599 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4660f985a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f465f4ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f46610b9050 RCX: 00007f4660f985a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f4660ff37b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6244adf R14: 00007f465f4ea300 R15: 0000000000022000 BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 in_atomic(): 1, irqs_disabled(): 1, pid: 28055, name: syz-executor.1 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] (null) hardirqs last disabled at (0): [] copy_process.part.0+0x1518/0x8260 kernel/fork.c:1853 softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856 softirqs last disabled at (0): [<0000000000000000>] (null) Preemption disabled at: [<0000000000000000>] (null) CPU: 1 PID: 28055 Comm: syz-executor.1 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192 do_con_write+0x116/0x1d90 drivers/tty/vt/vt.c:2599 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3163 gsmld_output+0xdd/0x1b0 drivers/tty/n_gsm.c:2240 gsm_data_kick+0x21b/0x920 drivers/tty/n_gsm.c:693 gsm_data_queue drivers/tty/n_gsm.c:778 [inline] gsm_control_transmit+0x1c3/0x290 drivers/tty/n_gsm.c:1306 gsm_control_send+0x3a6/0x4b0 drivers/tty/n_gsm.c:1382 gsm_disconnect drivers/tty/n_gsm.c:2039 [inline] gsmld_config.constprop.0+0x679/0x1100 drivers/tty/n_gsm.c:2551 gsmld_ioctl+0x3d7/0x480 drivers/tty/n_gsm.c:2615 tty_ioctl+0x65d/0x1630 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f66cd3a05a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f66cb8f2168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f66cd4c1050 RCX: 00007f66cd3a05a9 RDX: 0000000020000040 RSI: 00000000404c4701 RDI: 0000000000000003 RBP: 00007f66cd3fb7b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd126164df R14: 00007f66cb8f2300 R15: 0000000000022000 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 27948 Comm: syz-executor.4 Tainted: G W 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:cdev_del+0x22/0x90 fs/char_dev.c:602 Code: cf 0f 1f 80 00 00 00 00 55 48 89 fd 48 83 ec 08 e8 b3 dc be ff 48 8d 7d 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4f 48 RSP: 0018:ffff888068287b18 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff88823884f300 RCX: ffffc9000bbe7000 RDX: 000000000000000c RSI: ffffffff81a3a8bd RDI: 0000000000000064 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: ffffffff8c66505b R12: ffff88823884f308 R13: ffff8882388eb3c8 R14: ffff8880a3d676c0 R15: ffff8880b51ecab0 FS: 00007fe01c773700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7e6fbdf000 CR3: 000000006769c000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tty_unregister_device drivers/tty/tty_io.c:3054 [inline] tty_unregister_device+0x112/0x1b0 drivers/tty/tty_io.c:3049 gsmld_detach_gsm drivers/tty/n_gsm.c:2289 [inline] gsmld_close+0xaa/0x1f0 drivers/tty/n_gsm.c:2358 tty_ldisc_close+0xa2/0xd0 drivers/tty/tty_ldisc.c:493 tty_set_ldisc+0x1fe/0x650 drivers/tty/tty_ldisc.c:588 tiocsetd drivers/tty/tty_io.c:2359 [inline] tty_ioctl+0xb4b/0x1630 drivers/tty/tty_io.c:2603 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fe01e2425a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe01c773168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe01e363120 RCX: 00007fe01e2425a9 RDX: 0000000020000000 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 00007fe01e29d7b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe76ab8b7f R14: 00007fe01c773300 R15: 0000000000022000 Modules linked in: ---[ end trace b079385369dc546f ]--- RIP: 0010:cdev_del+0x22/0x90 fs/char_dev.c:602 Code: cf 0f 1f 80 00 00 00 00 55 48 89 fd 48 83 ec 08 e8 b3 dc be ff 48 8d 7d 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4f 48 RSP: 0018:ffff888068287b18 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff88823884f300 RCX: ffffc9000bbe7000 RDX: 000000000000000c RSI: ffffffff81a3a8bd RDI: 0000000000000064 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: ffffffff8c66505b R12: ffff88823884f308 R13: ffff8882388eb3c8 R14: ffff8880a3d676c0 R15: ffff8880b51ecab0 FS: 00007fe01c773700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd6d171ff8 CR3: 000000006769c000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 48 c7 c0 88 82 f1 89 mov $0xffffffff89f18288,%rax 7: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx e: fc ff df 11: 48 c1 e8 03 shr $0x3,%rax 15: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) 19: 75 2f jne 0x4a 1b: 48 83 3d 7c 31 d8 01 cmpq $0x0,0x1d8317c(%rip) # 0x1d8319f 22: 00 23: 74 15 je 0x3a 25: 48 89 df mov %rbx,%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: eb b2 jmp 0xffffffe3 31: e8 fb eb e6 f8 callq 0xf8e6ec31 36: eb c0 jmp 0xfffffff8 38: 0f 0b ud2 3a: 0f 0b ud2 3c: 48 rex.W 3d: c7 .byte 0xc7 3e: c7 (bad) 3f: 88 .byte 0x88