==================================================================
BUG: KASAN: null-ptr-deref in mcp2221_raw_event+0xc1f/0x1030 drivers/hid/hid-mcp2221.c:910
Write of size 128 at addr 0000000000000000 by task syz.5.4092/22417
CPU: 0 UID: 0 PID: 22417 Comm: syz.5.4092 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+0x38b/0x610 drivers/usb/core/hcd.c:1661
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745
dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x1ff/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:task_work_pending include/linux/task_work.h:26 [inline]
RIP: 0010:get_signal+0xfa/0x26d0 kernel/signal.c:2806
Code: 85 26 21 00 00 48 8b 85 d8 08 00 00 be 08 00 00 00 65 48 8b 2d af c2 4c 0b 48 89 ef 48 89 04 24 e8 2b 81 96 00 f0 80 65 02 fd <48> 8d bd 30 09 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc900019dfce8 EFLAGS: 00000246
RAX: 0000000000000001 RBX: 1ffff9200033bfad RCX: ffffffff8145ad75
RDX: ffffed1023493001 RSI: 0000000000000008 RDI: ffff88811a498000
RBP: ffff88811a498000 R08: 0000000000000001 R09: ffffed1023493000
R10: ffff88811a498007 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000010 R14: dffffc0000000000 R15: 0000000000000000
arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x7c/0xe0 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x3e9/0x4b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd906b4e7eb
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:00007fd904d2cf60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: fffffffffffffffc RBX: 0000000000000003 RCX: 00007fd906b4e7eb
RDX: 00007fd904d2dff0 RSI: 0000000080085502 RDI: 0000000000000003
RBP: 00007fd906bd1e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00002000000008c0
R13: 0000000000000000 R14: 00007fd906d76360 R15: 00007ffdfebab888
==================================================================
----------------
Code disassembly (best guess):
0: 85 26 test %esp,(%rsi)
2: 21 00 and %eax,(%rax)
4: 00 48 8b add %cl,-0x75(%rax)
7: 85 d8 test %ebx,%eax
9: 08 00 or %al,(%rax)
b: 00 be 08 00 00 00 add %bh,0x8(%rsi)
11: 65 48 8b 2d af c2 4c mov %gs:0xb4cc2af(%rip),%rbp # 0xb4cc2c8
18: 0b
19: 48 89 ef mov %rbp,%rdi
1c: 48 89 04 24 mov %rax,(%rsp)
20: e8 2b 81 96 00 call 0x968150
25: f0 80 65 02 fd lock andb $0xfd,0x2(%rbp)
* 2a: 48 8d bd 30 09 00 00 lea 0x930(%rbp),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1