KASAN: slab-use-after-free Read in serial_core_unregister_port

Status: upstream: reported C repro on 2026/07/29 01:37
Subsystems: serial
Labels: prio:high actionable
[Documentation on labels]
Reported-by: syzbot+9f57c1b2792029198fcf@syzkaller.appspotmail.com
First crash: 51d, last: 13d
✨ AI Jobs (4)
ID Workflow Result Correct Bug Created Started Finished Revision
eb754161 repro-c Reproduced: ✅ KASAN: slab-use-after-free Read in serial_core_unregister_port 2026/08/16 13:32 2026/08/16 15:29 2026/08/16 16:37 746171ee
032d8101 moderation Actionable: ✅ KASAN: slab-use-after-free Read in serial_core_unregister_port 2026/07/29 00:48 2026/07/29 00:48 2026/07/29 01:36 7be3c40b
21229927 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ KASAN: slab-use-after-free Read in serial_core_unregister_port 2026/07/28 00:49 2026/07/28 00:49 2026/07/28 01:33 4cb2b096
185d0eb2 assessment-security 💥 KASAN: slab-use-after-free Read in serial_core_unregister_port 2026/07/26 00:37 2026/07/26 00:37 2026/07/26 02:52 492bab15
Discussions (4)
Title Replies (including bot) Last reply
[PATCH v2] serial: core: fix NULL pointer dereference in serial_core_unregister_port() 2 (2) 2026/08/28 07:10
[PATCH] serial: core: fix NULL pointer dereference in serial_core_unregister_port() 5 (5) 2026/08/26 08:20
[syzbot] [serial?] KASAN: slab-use-after-free Read in serial_core_unregister_port 0 (2) 2026/08/17 10:16
[syzbot] Monthly serial report (Aug 2026) 0 (1) 2026/08/04 12:32
Last patch testing requests (2)
Created Duration User Patch Repo Result
2026/08/31 16:20 13m retest repro upstream report job log log
2026/08/17 08:59 15m nogikh@google.com upstream report job log log

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
CPU: 2 UID: 0 PID: 6063 Comm: syz-executor410 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:3236 [inline]
RIP: 0010:serial_core_unregister_port+0xec/0x960 drivers/tty/serial/serial_core.c:3345
Code: 3c 02 00 0f 85 23 08 00 00 48 8b 83 98 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 d8 00 00 00
RSP: 0018:ffffc90003657a20 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff9bc06240 RCX: fffff520006caf42
RDX: 0000000000000008 RSI: ffffffff85a28113 RDI: 0000000000000040
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff2283e1a
R10: ffffc90003657b40 R11: 0000000000000000 R12: ffffffff8fbac9a0
R13: ffff88802857e010 R14: ffffffff9bc063d8 R15: ffffffff8fbadf68
FS:  00005555919d4400(0000) GS:ffff8880d5dde000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1adba17bc0 CR3: 000000002d4a7000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 serial8250_unregister_port+0x1e4/0x8a0 drivers/tty/serial/8250/8250_core.c:883
 serial8250_remove+0x8c/0xc0 drivers/tty/serial/8250/8250_platform.c:241
 platform_remove+0x5f/0x80 drivers/base/platform.c:1456
 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+0x6ac/0x1050 fs/read_write.c:687
 ksys_write+0x12a/0x250 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1adb9f0907
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:00007ffdfe653cc0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00005555919d4400 RCX: 00007f1adb9f0907
RDX: 000000000000000a RSI: 00007f1adba3102e RDI: 0000000000000003
RBP: 000000000000001d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00007f1adba33330
R13: 00007f1adba3102e R14: 00007f1adba5d580 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:serial_core_get_ctrl_dev drivers/tty/serial/serial_core.c:3236 [inline]
RIP: 0010:serial_core_unregister_port+0xec/0x960 drivers/tty/serial/serial_core.c:3345
Code: 3c 02 00 0f 85 23 08 00 00 48 8b 83 98 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 d8 00 00 00
RSP: 0018:ffffc90003657a20 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff9bc06240 RCX: fffff520006caf42
RDX: 0000000000000008 RSI: ffffffff85a28113 RDI: 0000000000000040
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff2283e1a
R10: ffffc90003657b40 R11: 0000000000000000 R12: ffffffff8fbac9a0
R13: ffff88802857e010 R14: ffffffff9bc063d8 R15: ffffffff8fbadf68
FS:  00005555919d4400(0000) GS:ffff8880d5dde000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1adba17bc0 CR3: 000000002d4a7000 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 98 01 00 00 48 8d 	sbbl   $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 d8 00 00 00 	lea    0xd8(%rbx),%rdi

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/17 10:15 upstream 8d3ae59288f1 492bab15 .config console log report C ci-qemu-upstream general protection fault in serial_core_unregister_port
2026/07/27 00:34 upstream 4235cb24ec1e 492bab15 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in serial_core_unregister_port
2026/07/24 16:48 upstream 48a5a7ab8d6a dd737a83 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in serial_core_unregister_port
* Struck through repros no longer work on HEAD.