Oops: general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047] CPU: 3 UID: 0 PID: 6078 Comm: syz-executor167 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:serial_core_get_ctrl_dev drivers/tty/serial/serial_core.c:3267 [inline] RIP: 0010:serial_core_unregister_port+0xec/0x960 drivers/tty/serial/serial_core.c:3376 Code: 3c 02 00 0f 85 23 08 00 00 48 8b 83 b0 01 00 00 48 8d 78 40 48 89 44 24 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ee 07 00 00 48 8b 44 24 08 48 8d bb f0 00 00 00 RSP: 0018:ffffc9000359fa28 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffffffff9bc61058 RCX: 0000000000000000 RDX: 0000000000000008 RSI: ffffffff85aee6c3 RDI: 0000000000000040 RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff2289f2b R10: ffffc9000359fb48 R11: 0000000000000000 R12: ffffffff8fbd3ce0 R13: ffffffff9bc61058 R14: ffffffff9bc61208 R15: ffffffff8fbd5368 FS: 000055559214d400(0000) GS:ffff8880d5e64000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5cf9c4ebc0 CR3: 000000005996d000 CR4: 0000000000352ef0 Call Trace: serial8250_unregister_port+0x1db/0x890 drivers/tty/serial/8250/8250_core.c:932 serial8250_remove+0x8c/0xc0 drivers/tty/serial/8250/8250_platform.c:241 platform_remove+0x5f/0x80 drivers/base/platform.c:1524 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 unbind_store+0xf8/0x110 drivers/base/bus.c:244 drv_attr_store+0x74/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5cf9c27907 Code: 48 89 fa 4c 89 df e8 88 1e 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffc43a00870 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000055559214d400 RCX: 00007f5cf9c27907 RDX: 000000000000000a RSI: 00007f5cf9c6802e RDI: 0000000000000003 RBP: 000000000000001d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007f5cf9c6a330 R13: 00007f5cf9c6802e R14: 00007f5cf9c94580 R15: 0000000000000002 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:serial_core_get_ctrl_dev drivers/tty/serial/serial_core.c:3267 [inline] RIP: 0010:serial_core_unregister_port+0xec/0x960 drivers/tty/serial/serial_core.c:3376 Code: 3c 02 00 0f 85 23 08 00 00 48 8b 83 b0 01 00 00 48 8d 78 40 48 89 44 24 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ee 07 00 00 48 8b 44 24 08 48 8d bb f0 00 00 00 RSP: 0018:ffffc9000359fa28 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffffffff9bc61058 RCX: 0000000000000000 RDX: 0000000000000008 RSI: ffffffff85aee6c3 RDI: 0000000000000040 RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff2289f2b R10: ffffc9000359fb48 R11: 0000000000000000 R12: ffffffff8fbd3ce0 R13: ffffffff9bc61058 R14: ffffffff9bc61208 R15: ffffffff8fbd5368 FS: 000055559214d400(0000) GS:ffff8880d5e64000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5cf9c4ebc0 CR3: 000000005996d000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 3c 02 cmp $0x2,%al 2: 00 0f add %cl,(%rdi) 4: 85 23 test %esp,(%rbx) 6: 08 00 or %al,(%rax) 8: 00 48 8b add %cl,-0x75(%rax) b: 83 b0 01 00 00 48 8d xorl $0xffffff8d,0x48000001(%rax) 12: 78 40 js 0x54 14: 48 89 44 24 08 mov %rax,0x8(%rsp) 19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 20: fc ff df 23: 48 89 fa mov %rdi,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction 2e: 0f 85 ee 07 00 00 jne 0x822 34: 48 8b 44 24 08 mov 0x8(%rsp),%rax 39: 48 8d bb f0 00 00 00 lea 0xf0(%rbx),%rdi