================================================================== BUG: KASAN: null-ptr-deref in mcp2221_raw_event+0xc1f/0x1030 drivers/hid/hid-mcp2221.c:910 Write of size 59 at addr 0000000000000000 by task udevd/2849 CPU: 1 UID: 0 PID: 2849 Comm: udevd 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:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:183 [inline] RIP: 0010:write_comp_data+0x11/0x90 kernel/kcov.c:246 Code: cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 49 89 d2 49 89 f8 49 89 f1 65 48 8b 15 37 7e 14 0b <65> 8b 05 48 7e 14 0b a9 00 01 ff 00 74 1d f6 c4 01 74 67 a9 00 00 RSP: 0018:ffffc900014bf7e8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000078 RCX: ffffffff8288380b RDX: ffff888116dbba00 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 00007ffd4a9776d0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffc900014bfe58 R13: 0000000000000000 R14: ffffc900014bfe50 R15: 0000000000000000 copy_to_user_iter lib/iov_iter.c:20 [inline] iterate_ubuf include/linux/iov_iter.h:30 [inline] iterate_and_advance2 include/linux/iov_iter.h:302 [inline] iterate_and_advance include/linux/iov_iter.h:330 [inline] _copy_to_iter+0x2ab/0x1710 lib/iov_iter.c:185 copy_to_iter include/linux/uio.h:220 [inline] simple_copy_to_iter+0x46/0x90 net/core/datagram.c:521 __skb_datagram_iter+0x129/0x900 net/core/datagram.c:402 skb_copy_datagram_iter+0x40/0x50 net/core/datagram.c:535 skb_copy_datagram_msg include/linux/skbuff.h:4167 [inline] netlink_recvmsg+0x1e1/0x9c0 net/netlink/af_netlink.c:1953 sock_recvmsg_nosec net/socket.c:1065 [inline] sock_recvmsg+0x1f6/0x250 net/socket.c:1087 ____sys_recvmsg+0x218/0x6b0 net/socket.c:2834 ___sys_recvmsg+0x114/0x1a0 net/socket.c:2876 __sys_recvmsg+0x16a/0x220 net/socket.c:2909 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:0x7f91a21c7407 Code: 48 89 fa 4c 89 df e8 38 aa 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:00007ffd4a977580 EFLAGS: 00000202 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007f91a20d9880 RCX: 00007f91a21c7407 RDX: 0000000000000000 RSI: 00007ffd4a977610 RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000562763df4d80 R13: 00007ffd4a9776d0 R14: 00007ffd4a97761c R15: 0000000000000000 ================================================================== ---------------- Code disassembly (best guess): 0: cc int3 1: cc int3 2: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 49 89 d2 mov %rdx,%r10 1c: 49 89 f8 mov %rdi,%r8 1f: 49 89 f1 mov %rsi,%r9 22: 65 48 8b 15 37 7e 14 mov %gs:0xb147e37(%rip),%rdx # 0xb147e61 29: 0b * 2a: 65 8b 05 48 7e 14 0b mov %gs:0xb147e48(%rip),%eax # 0xb147e79 <-- trapping instruction 31: a9 00 01 ff 00 test $0xff0100,%eax 36: 74 1d je 0x55 38: f6 c4 01 test $0x1,%ah 3b: 74 67 je 0xa4 3d: a9 .byte 0xa9