==================================================================
BUG: KASAN: null-ptr-deref in mcp2221_raw_event+0xc1f/0x1030 drivers/hid/hid-mcp2221.c:910
Write of size 222 at addr 0000000000000000 by task syz.1.807/8288
CPU: 1 UID: 0 PID: 8288 Comm: syz.1.807 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
kasan_report+0xe0/0x110 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:189
__asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106
mcp2221_raw_event+0xc1f/0x1030 drivers/hid/hid-mcp2221.c:910
__hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2130
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38a/0x6e0 drivers/usb/core/hcd.c:1663
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1747
dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x202/0xad0 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842
handle_softirqs+0x208/0x8d0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xfa/0x160 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:usb_ep_queue+0xe0/0x390 drivers/usb/gadget/udc/core.c:300
Code: c1 ea 03 80 3c 02 00 0f 85 9a 02 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 6b 10 49 8d 7d 28 48 89 fa 48 c1 ea 03 80 3c 02 00 <0f> 85 6d 02 00 00 44 89 e2 49 8b 45 28 48 89 ee 48 89 df e8 db e2
RSP: 0018:ffffc90014effd80 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff88810b330068 RCX: ffffffff84fabca6
RDX: 1ffffffff0fef979 RSI: ffffffff84fabcb4 RDI: ffffffff87f7cbc8
RBP: ffff88811d719f10 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000cc0
R13: ffffffff87f7cba0 R14: ffff888114d74158 R15: ffff888114d74150
raw_process_ep0_io+0x4c2/0x980 drivers/usb/gadget/legacy/raw_gadget.c:727
raw_ioctl_ep0_write drivers/usb/gadget/legacy/raw_gadget.c:766 [inline]
raw_ioctl+0xb1b/0x2c30 drivers/usb/gadget/legacy/raw_gadget.c:1312
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl fs/ioctl.c:584 [inline]
__x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f19389ae7eb
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:00007f1937414f10 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f19389ae7eb
RDX: 00007f1937414fd0 RSI: 0000000040085503 RDI: 0000000000000003
RBP: 00007f1937415fe0 R08: 0000000000000080 R09: 00007f1937414fd8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000080085502
R13: 0000000800000000 R14: 0000000000000012 R15: 00007f1938a3d391
==================================================================
----------------
Code disassembly (best guess):
0: c1 ea 03 shr $0x3,%edx
3: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
7: 0f 85 9a 02 00 00 jne 0x2a7
d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
14: fc ff df
17: 4c 8b 6b 10 mov 0x10(%rbx),%r13
1b: 49 8d 7d 28 lea 0x28(%r13),%rdi
1f: 48 89 fa mov %rdi,%rdx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
* 2a: 0f 85 6d 02 00 00 jne 0x29d <-- trapping instruction
30: 44 89 e2 mov %r12d,%edx
33: 49 8b 45 28 mov 0x28(%r13),%rax
37: 48 89 ee mov %rbp,%rsi
3a: 48 89 df mov %rbx,%rdi
3d: e8 .byte 0xe8
3e: db e2 fnclex