================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950 Read of size 1 at addr ffff8881360affff by task kworker/0:4/12773 CPU: 0 UID: 0 PID: 12773 Comm: kworker/0:4 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950 __hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139 hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741 dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1785 [inline] __hrtimer_run_queues+0x50e/0xa70 kernel/time/hrtimer.c:1849 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1866 handle_softirqs+0x1de/0x9d0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:lock_acquire+0x5e/0x380 kernel/locking/lockdep.c:5872 Code: 05 3b 44 66 0b 83 f8 07 0f 87 f0 00 00 00 48 0f a3 05 c6 20 61 09 0f 82 c2 02 00 00 8b 35 6e 30 61 09 85 f6 0f 85 dd 00 00 00 <48> 8b 44 24 30 65 48 2b 05 dd 43 66 0b 0f 85 02 03 00 00 48 83 c4 RSP: 0018:ffffc90003bc66e8 EFLAGS: 00000206 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffffff890010b3 RDI: ffffffff87afc6a0 RBP: ffffffff896de6e0 R08: 000000006c614559 R09: 0000000000000007 R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:312 [inline] rcu_read_lock include/linux/rcupdate.h:850 [inline] class_rcu_constructor include/linux/rcupdate.h:1193 [inline] unwind_next_frame+0xd1/0x1ea0 arch/x86/kernel/unwind_orc.c:495 arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2685 [inline] slab_free mm/slub.c:6165 [inline] kfree+0x1dc/0x640 mm/slub.c:6483 mcp_send_report drivers/hid/hid-mcp2221.c:162 [inline] mcp_send_data_req_status+0x9a/0x170 drivers/hid/hid-mcp2221.c:182 mcp_set_i2c_speed drivers/hid/hid-mcp2221.c:241 [inline] mcp2221_probe.cold+0x384/0xab3 drivers/hid/hid-mcp2221.c:1275 __hid_device_probe drivers/hid/hid-core.c:2775 [inline] hid_device_probe+0x50e/0x800 drivers/hid/hid-core.c:2812 call_driver_probe drivers/base/dd.c:583 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:661 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:803 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:833 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:961 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1033 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1088 bus_probe_device+0x64/0x160 drivers/base/bus.c:574 device_add+0x11d9/0x1950 drivers/base/core.c:3689 hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:2951 usbhid_probe+0xd57/0x1350 drivers/hid/usbhid/hid-core.c:1450 usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:583 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:661 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:803 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:833 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:961 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1033 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1088 bus_probe_device+0x64/0x160 drivers/base/bus.c:574 device_add+0x11d9/0x1950 drivers/base/core.c:3689 usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:583 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:661 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:803 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:833 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:961 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1033 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1088 bus_probe_device+0x64/0x160 drivers/base/bus.c:574 device_add+0x11d9/0x1950 drivers/base/core.c:3689 usb_new_device.cold+0x685/0x115c drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x314d/0x4af0 drivers/usb/core/hub.c:5953 process_one_work+0xa23/0x19a0 kernel/workqueue.c:3276 process_scheduled_works kernel/workqueue.c:3359 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3440 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x6c3/0xcb0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5236: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_mempool_unpoison_object+0x83/0x150 mm/kasan/common.c:564 kasan_mempool_unpoison_object include/linux/kasan.h:391 [inline] napi_skb_cache_get+0x361/0x8e0 net/core/skbuff.c:306 __alloc_skb+0x5d3/0x710 net/core/skbuff.c:696 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_skb_with_frags+0xe0/0x810 net/core/skbuff.c:6763 sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2995 unix_dgram_sendmsg+0x3c7/0x1820 net/unix/af_unix.c:2125 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] sock_write_iter+0x524/0x5a0 net/socket.c:1195 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x1f8/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 2853: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2685 [inline] slab_free mm/slub.c:6165 [inline] kmem_cache_free+0x105/0x640 mm/slub.c:6295 kfree_skbmem+0x19a/0x210 net/core/skbuff.c:1151 __kfree_skb net/core/skbuff.c:1218 [inline] consume_skb net/core/skbuff.c:1450 [inline] consume_skb+0xd1/0x110 net/core/skbuff.c:1444 __unix_dgram_recvmsg+0x754/0xc30 net/unix/af_unix.c:2653 unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2670 sock_recvmsg_nosec net/socket.c:1078 [inline] sock_recvmsg+0x1a4/0x1f0 net/socket.c:1100 ____sys_recvmsg+0x218/0x640 net/socket.c:2812 ___sys_recvmsg+0x16a/0x1a0 net/socket.c:2854 __sys_recvmsg+0x16d/0x220 net/socket.c:2887 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8881360afdc0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 343 bytes to the right of allocated 232-byte region [ffff8881360afdc0, ffff8881360afea8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1360af flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff888102aff8c0 dead000000000100 dead000000000122 raw: 0000000000000000 00000008000c000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14, tgid 14 (ksoftirqd/0), ts 147651550235, free_ts 137251899599 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0xf10/0x39f0 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x273/0x2860 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3292 [inline] allocate_slab mm/slub.c:3481 [inline] new_slab+0xa6/0x6c0 mm/slub.c:3539 refill_objects+0x26b/0x400 mm/slub.c:7175 refill_sheaf mm/slub.c:2812 [inline] __pcs_replace_empty_main+0x1ab/0x660 mm/slub.c:4615 alloc_from_pcs mm/slub.c:4717 [inline] slab_alloc_node mm/slub.c:4851 [inline] kmem_cache_alloc_noprof+0x520/0x6a0 mm/slub.c:4873 skb_clone+0x190/0x400 net/core/skbuff.c:2120 dev_queue_xmit_nit+0x255/0xa80 net/core/dev.c:2574 xmit_one net/core/dev.c:3867 [inline] dev_hard_start_xmit+0x2f5/0x7d0 net/core/dev.c:3887 sch_direct_xmit+0x194/0x890 net/sched/sch_generic.c:347 __dev_xmit_skb net/core/dev.c:4186 [inline] __dev_queue_xmit+0x23fc/0x47f0 net/core/dev.c:4802 dev_queue_xmit include/linux/netdevice.h:3384 [inline] neigh_hh_output include/net/neighbour.h:540 [inline] neigh_output include/net/neighbour.h:554 [inline] ip_finish_output2+0xea0/0x2420 net/ipv4/ip_output.c:237 __ip_finish_output.part.0+0x1b4/0x350 net/ipv4/ip_output.c:315 __ip_finish_output net/ipv4/ip_output.c:303 [inline] ip_finish_output net/ipv4/ip_output.c:325 [inline] NF_HOOK_COND include/linux/netfilter.h:307 [inline] ip_output+0x392/0xc00 net/ipv4/ip_output.c:438 dst_output include/net/dst.h:470 [inline] ip_local_out+0x193/0x1f0 net/ipv4/ip_output.c:131 page last free pid 14 tgid 14 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7b1/0xfb0 mm/page_alloc.c:2978 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2869 handle_softirqs+0x1de/0x9d0 kernel/softirq.c:622 run_ksoftirqd kernel/softirq.c:1063 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055 smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x6c3/0xcb0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8881360afe80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff8881360aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881360aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881360b0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881360b0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 05 3b 44 66 0b add $0xb66443b,%eax 5: 83 f8 07 cmp $0x7,%eax 8: 0f 87 f0 00 00 00 ja 0xfe e: 48 0f a3 05 c6 20 61 bt %rax,0x96120c6(%rip) # 0x96120dc 15: 09 16: 0f 82 c2 02 00 00 jb 0x2de 1c: 8b 35 6e 30 61 09 mov 0x961306e(%rip),%esi # 0x9613090 22: 85 f6 test %esi,%esi 24: 0f 85 dd 00 00 00 jne 0x107 * 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2f: 65 48 2b 05 dd 43 66 sub %gs:0xb6643dd(%rip),%rax # 0xb664414 36: 0b 37: 0f 85 02 03 00 00 jne 0x33f 3d: 48 rex.W 3e: 83 .byte 0x83 3f: c4 .byte 0xc4