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

Status: upstream: reported C repro on 2026/08/06 15:27
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+de553c19cb054f174a35@syzkaller.appspotmail.com
Fix commit: bdab5605259b usb: gadget: uvc: fix dangling pointers in uvc_function_bind() and uvc_function_unbind()
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-arm32 ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root]
First crash: 48d, last: 5d02h
✨ AI Jobs (7)
ID Workflow Result Correct Bug Created Started Finished Revision
f2356c1f assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/09/13 00:58 2026/09/13 00:58 2026/09/13 00:58 70a60e12
6935162f assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/27 02:45 2026/08/27 02:45 2026/08/27 02:45 a2b77b9e
83d74d28 assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/19 02:12 2026/08/19 02:12 2026/08/19 02:12 1e72964b
2f22dbee assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/14 00:45 2026/08/14 00:45 2026/08/14 00:45 0165196a
eaca564e assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/11 00:56 2026/08/11 00:56 2026/08/11 00:56 039457bd
1703835f assessment-security 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/09 11:58 2026/08/09 11:58 2026/08/09 11:58 5d63f80b
a41b0512 repro-c 💥 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 2026/08/07 14:02 2026/08/07 23:53 2026/08/07 23:53 e4ef95d6
Discussions (3)
Title Replies (including bot) Last reply
[PATCH] usb: udc: Make tracing aware that usb_ep_alloc_request() can return NULL 1 (1) 2026/09/17 08:36
[syzbot] [usb?] KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req 0 (2) 2026/09/16 20:51
[PATCH] usb: gadget: uvc: fix dangling pointers in uvc_function_bind() and uvc_function_unbind() 1 (1) 2026/08/13 17:43
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 general protection fault in trace_event_raw_event_udc_log_req 2 2 9d17h 9d17h 0/2 premoderation: reported on 2026/09/12 05:56
android-5-10 general protection fault in trace_event_raw_event_udc_log_req 2 3 9d23h 17d 0/2 premoderation: reported on 2026/09/04 05:20
android-6-12 general protection fault in trace_event_raw_event_udc_log_req 2 6 2d04h 39d 0/1 premoderation: reported on 2026/08/13 03:18

Sample crash report:
RBP: 00007ffd24c2deb0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000b
R13: 64755f796d6d7564 R14: 00007f7ea170aa41 R15: 0000000000000000
 </TASK>
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 1 UID: 0 PID: 6018 Comm: syz-executor177 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:do_trace_event_raw_event_udc_log_req drivers/usb/gadget/udc/trace.h:223 [inline]
RIP: 0010:trace_event_raw_event_udc_log_req+0x207/0x6c0 drivers/usb/gadget/udc/trace.h:223
Code: e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 7f 04 00 00 49 8d 7d 10 41 c6 04 24 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 4b 04 00 00 49 8d 7f 0c 41 8b
RSP: 0018:ffffc900055379e0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff8cda4a23 RDI: 0000000000000010
RBP: 1ffff92000aa6f3e R08: 0000000000000001 R09: ffffed1003ed2e25
R10: ffff88801f69712e R11: 0000000000000001 R12: ffff88801f69712f
R13: 0000000000000000 R14: ffffffff8cda4a20 R15: ffff88801f6970ec
FS:  000055558eb7d400(0000) GS:ffff8880d5c59000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d12b7cc300 CR3: 0000000036264000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __do_trace_usb_ep_alloc_request drivers/usb/gadget/udc/trace.h:264 [inline]
 trace_usb_ep_alloc_request drivers/usb/gadget/udc/trace.h:264 [inline]
 usb_ep_alloc_request+0x217/0x2e0 drivers/usb/gadget/udc/core.c:202
 gadget_bind+0xe7/0x660 drivers/usb/gadget/legacy/raw_gadget.c:294
 gadget_bind_driver+0x28c/0xbf0 drivers/usb/gadget/udc/core.c:1662
 call_driver_probe drivers/base/dd.c:628 [inline]
 really_probe+0x241/0xa60 drivers/base/dd.c:706
 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868
 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
 __driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
 bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
 bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
 driver_register+0x1e2/0x360 drivers/base/driver.c:174
 usb_gadget_register_driver_owner+0x132/0x210 drivers/usb/gadget/udc/core.c:1752
 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:596 [inline]
 raw_ioctl+0x1a85/0x2b80 drivers/usb/gadget/legacy/raw_gadget.c:1307
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 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:0x7f7ea16ae7bb
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007ffd24c2de50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f7ea16ae7bb
RDX: 0000000000000000 RSI: 0000000000005501 RDI: 0000000000000003
RBP: 00007ffd24c2deb0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000b
R13: 64755f796d6d7564 R14: 00007f7ea170aa41 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:do_trace_event_raw_event_udc_log_req drivers/usb/gadget/udc/trace.h:223 [inline]
RIP: 0010:trace_event_raw_event_udc_log_req+0x207/0x6c0 drivers/usb/gadget/udc/trace.h:223
Code: e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 7f 04 00 00 49 8d 7d 10 41 c6 04 24 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 4b 04 00 00 49 8d 7f 0c 41 8b
RSP: 0018:ffffc900055379e0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff8cda4a23 RDI: 0000000000000010
RBP: 1ffff92000aa6f3e R08: 0000000000000001 R09: ffffed1003ed2e25
R10: ffff88801f69712e R11: 0000000000000001 R12: ffff88801f69712f
R13: 0000000000000000 R14: ffffffff8cda4a20 R15: ffff88801f6970ec
FS:  000055558eb7d400(0000) GS:ffff8880d5c59000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d12b7cc300 CR3: 0000000036264000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	e2 83                	loop   0xffffff85
   2:	e2 07                	loop   0xb
   4:	38 d0                	cmp    %dl,%al
   6:	7f 08                	jg     0x10
   8:	84 c0                	test   %al,%al
   a:	0f 85 7f 04 00 00    	jne    0x48f
  10:	49 8d 7d 10          	lea    0x10(%r13),%rdi
  14:	41 c6 04 24 00       	movb   $0x0,(%r12)
  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:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 08                	je     0x3a
  32:	3c 03                	cmp    $0x3,%al
  34:	0f 8e 4b 04 00 00    	jle    0x485
  3a:	49 8d 7f 0c          	lea    0xc(%r15),%rdi
  3e:	41                   	rex.B
  3f:	8b                   	.byte 0x8b

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/16 20:51 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9b87fdc9af2f 70a60e12 .config console log report C ci-qemu-upstream general protection fault in trace_event_raw_event_udc_log_req
2026/08/04 01:39 upstream 848acc8ffe1b 9451e17e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-use-after-free Read in trace_event_raw_event_udc_log_req
* Struck through repros no longer work on HEAD.