general protection fault, probably for non-canonical address 0xdffffc000000000c: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000060-0x0000000000000067] CPU: 1 PID: 18174 Comm: syz-executor.3 Not tainted 5.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:cdev_del+0x22/0x90 fs/char_dev.c:596 Code: b5 0f 1f 80 00 00 00 00 55 48 89 fd 48 83 ec 08 e8 93 68 b5 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:ffffc90005167ce0 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff8880a2a52900 RCX: ffffffff83e78bbe RDX: 000000000000000c RSI: ffffffff81be662d RDI: 0000000000000064 RBP: 0000000000000000 R08: ffff8880520602c0 R09: 0000000000000001 R10: ffffffff8c347aff R11: fffffbfff1868f5f R12: 0000000000000208 R13: ffff8880a1d1b208 R14: ffff8880a2e7f028 R15: ffff88804e8bc650 FS: 0000000000e62940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2fb23000 CR3: 0000000053fd6000 CR4: 00000000001426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tty_unregister_device drivers/tty/tty_io.c:3193 [inline] tty_unregister_device+0x10d/0x1a0 drivers/tty/tty_io.c:3188 gsmld_detach_gsm drivers/tty/n_gsm.c:2418 [inline] gsmld_close+0xb3/0x1f0 drivers/tty/n_gsm.c:2487 tty_ldisc_close.isra.0+0x110/0x190 drivers/tty/tty_ldisc.c:489 tty_ldisc_kill+0x94/0x150 drivers/tty/tty_ldisc.c:637 tty_ldisc_release+0xe1/0x2a0 drivers/tty/tty_ldisc.c:809 tty_release_struct+0x16/0x50 drivers/tty/tty_io.c:1614 tty_release+0xbc7/0xe90 drivers/tty/tty_io.c:1785 __fput+0x33e/0x880 fs/file_table.c:281 task_work_run+0xf4/0x1b0 kernel/task_work.c:123 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x2fa/0x360 arch/x86/entry/common.c:165 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:279 [inline] do_syscall_64+0x6b1/0x7d0 arch/x86/entry/common.c:305 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x416651 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffe7659ea90 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000416651 RDX: 0000000000000000 RSI: 00000000000002eb RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000023c982e9 R09: 0000000023c982ed R10: 00007ffe7659eb80 R11: 0000000000000293 R12: 0000000000790630 R13: 0000000000092925 R14: ffffffffffffffff R15: 000000000078bfac Modules linked in: ---[ end trace a77ddfb83738f7fa ]--- RIP: 0010:cdev_del+0x22/0x90 fs/char_dev.c:596 Code: b5 0f 1f 80 00 00 00 00 55 48 89 fd 48 83 ec 08 e8 93 68 b5 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:ffffc90005167ce0 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff8880a2a52900 RCX: ffffffff83e78bbe RDX: 000000000000000c RSI: ffffffff81be662d RDI: 0000000000000064 RBP: 0000000000000000 R08: ffff8880520602c0 R09: 0000000000000001 R10: ffffffff8c347aff R11: fffffbfff1868f5f R12: 0000000000000208 R13: ffff8880a1d1b208 R14: ffff8880a2e7f028 R15: ffff88804e8bc650 FS: 0000000000e62940(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffe261b708 CR3: 0000000053fd6000 CR4: 00000000001426f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400