================================================================== BUG: KASAN: null-ptr-deref in mcp2221_raw_event+0xc1f/0x1030 drivers/hid/hid-mcp2221.c:910 Write of size 227 at addr 0000000000000000 by task syz.4.2486/14338 CPU: 0 UID: 0 PID: 14338 Comm: syz.4.2486 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+0x311/0x450 drivers/hid/hid-core.c:2130 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x388/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:_static_cpu_has arch/x86/include/asm/cpufeature.h:101 [inline] RIP: 0010:addr_has_metadata mm/kasan/kasan.h:334 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:177 [inline] RIP: 0010:kasan_check_range+0x32/0x1b0 mm/kasan/generic.c:189 Code: 84 64 01 00 00 48 89 f8 41 54 44 0f b6 c2 48 01 f0 55 53 0f 82 d7 00 00 00 eb 0f cc cc cc 48 b8 00 00 00 00 00 00 00 ff eb 0a <48> b8 00 00 00 00 00 80 ff ff 48 39 c7 0f 82 b3 00 00 00 4c 8d 54 RSP: 0000:ffffc90012337af0 EFLAGS: 00000286 RAX: ffffea0004ec95b8 RBX: ffffea0004ec9580 RCX: ffffffff81db1c0d RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffea0004ec95b4 RBP: ffffffff93a1d6c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffea0004ec95b4 R13: 1ffff92002466f62 R14: 0000000000000000 R15: 00007f38e9fb9000 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] page_ref_count include/linux/page_ref.h:67 [inline] set_page_refcounted mm/internal.h:512 [inline] folio_alloc_mpol_noprof mm/mempolicy.c:2440 [inline] vma_alloc_folio_noprof+0x15d/0x450 mm/mempolicy.c:2470 folio_prealloc mm/memory.c:1061 [inline] wp_page_copy mm/memory.c:3552 [inline] do_wp_page+0x1931/0x3a50 mm/memory.c:4013 handle_pte_fault mm/memory.c:6068 [inline] __handle_mm_fault+0x1032/0x3210 mm/memory.c:6195 handle_mm_fault+0x589/0xd10 mm/memory.c:6364 do_user_addr_fault+0x613/0x1240 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x5c/0xb0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f38e9c3da2c Code: 23 83 c0 01 44 39 d0 75 dc 48 89 f0 25 ff 1f 00 00 49 89 34 c1 41 88 3c 00 31 c0 c3 66 90 41 38 3c 10 74 0b 41 88 3c 10 31 c0 <49> 89 34 d1 c3 b8 01 00 00 00 c3 66 0f 1f 84 00 00 00 00 00 48 83 RSP: 002b:00007ffde6d44428 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00007f38eaaf5720 RCX: 0000000000000000 RDX: 0000000000000fb7 RSI: ffffffff87346fb7 RDI: 0000000000000000 RBP: ffffffff87346fb7 R08: 00007f38e9fb0000 R09: 00007f38e9fb2000 R10: 0000000087346fbb R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffffffff87346ecc R15: 0000000000000026 ================================================================== ---------------- Code disassembly (best guess): 0: 84 64 01 00 test %ah,0x0(%rcx,%rax,1) 4: 00 48 89 add %cl,-0x77(%rax) 7: f8 clc 8: 41 54 push %r12 a: 44 0f b6 c2 movzbl %dl,%r8d e: 48 01 f0 add %rsi,%rax 11: 55 push %rbp 12: 53 push %rbx 13: 0f 82 d7 00 00 00 jb 0xf0 19: eb 0f jmp 0x2a 1b: cc int3 1c: cc int3 1d: cc int3 1e: 48 b8 00 00 00 00 00 movabs $0xff00000000000000,%rax 25: 00 00 ff 28: eb 0a jmp 0x34 * 2a: 48 b8 00 00 00 00 00 movabs $0xffff800000000000,%rax <-- trapping instruction 31: 80 ff ff 34: 48 39 c7 cmp %rax,%rdi 37: 0f 82 b3 00 00 00 jb 0xf0 3d: 4c rex.WR 3e: 8d .byte 0x8d 3f: 54 push %rsp