================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:944 Read of size 1 at addr ffff888121f73fff by task kworker/0:2/751 CPU: 0 UID: 0 PID: 751 Comm: kworker/0:2 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:944 __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+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:lock_acquire+0x62/0x350 kernel/locking/lockdep.c:5872 Code: a8 37 0b 83 f8 07 0f 87 bc 02 00 00 89 c0 48 0f a3 05 62 d2 42 09 0f 82 74 02 00 00 8b 35 7a e0 42 09 85 f6 0f 85 8d 00 00 00 <48> 8b 44 24 30 65 48 2b 05 79 a8 37 0b 0f 85 c7 02 00 00 48 83 c4 RSP: 0018:ffffc9000196e1f0 EFLAGS: 00000206 RAX: 0000000000000046 RBX: ffffffff892c7360 RCX: 0000000072378f48 RDX: 0000000000000000 RSI: ffffffff88d04e76 RDI: ffffffff878963e0 RBP: 0000000000000002 R08: 9a8d914adbd081b2 R09: 0000000000000000 R10: 0000000000000006 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:331 [inline] rcu_read_lock include/linux/rcupdate.h:841 [inline] class_rcu_constructor include/linux/rcupdate.h:1155 [inline] unwind_next_frame+0xd1/0x20a0 arch/x86/kernel/unwind_orc.c:479 arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x14f/0x3b0 mm/slub.c:4236 __kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637 kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713 __kernfs_create_file+0x53/0x350 fs/kernfs/file.c:1039 sysfs_add_file_mode_ns+0x207/0x3c0 fs/sysfs/file.c:319 create_files fs/sysfs/group.c:76 [inline] internal_create_group+0x578/0xf30 fs/sysfs/group.c:183 internal_create_groups+0x9d/0x150 fs/sysfs/group.c:223 device_add_groups drivers/base/core.c:2836 [inline] device_add_attrs drivers/base/core.c:2906 [inline] device_add+0x731/0x1aa0 drivers/base/core.c:3643 i2c_register_adapter+0x39e/0x1370 drivers/i2c/i2c-core-base.c:1576 i2c_add_adapter drivers/i2c/i2c-core-base.c:1676 [inline] i2c_add_adapter+0x10a/0x1b0 drivers/i2c/i2c-core-base.c:1656 devm_i2c_add_adapter+0x1b/0x90 drivers/i2c/i2c-core-base.c:1848 mcp2221_probe+0x5f1/0xc50 drivers/hid/hid-mcp2221.c:1285 __hid_device_probe drivers/hid/hid-core.c:2740 [inline] hid_device_probe+0x363/0x720 drivers/hid/hid-core.c:2777 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 hid_add_device+0x373/0xa60 drivers/hid/hid-core.c:2923 usbhid_probe+0xd38/0x13f0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x300/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_set_configuration+0x1187/0x1e20 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x3e0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_new_device+0xd07/0x1a60 drivers/usb/core/hub.c:2694 hub_port_connect drivers/usb/core/hub.c:5566 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5870 [inline] hub_event+0x2fce/0x5060 drivers/usb/core/hub.c:5952 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x5b6/0x6c0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888121f76600 pfn:0x121f70 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f8(unknown) raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000 raw: ffff888121f76600 0000000000000000 00000000f8000000 0000000000000000 head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000 head: ffff888121f76600 0000000000000000 00000000f8000000 0000000000000000 head: 0200000000000002 ffffea000487dc01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 751, tgid 751 (kworker/0:2), ts 1032654964698, free_ts 1003238182471 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0xf98/0x2ce0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x259/0x21e0 mm/page_alloc.c:5148 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2416 ___kmalloc_large_node+0xed/0x160 mm/slub.c:4306 __kmalloc_large_noprof+0x1c/0x70 mm/slub.c:4327 kmalloc_noprof include/linux/slab.h:902 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] usbhid_probe+0xaf6/0x13f0 drivers/hid/usbhid/hid-core.c:1418 usb_probe_interface+0x300/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 page last free pid 11511 tgid 11511 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x78a/0xfd0 mm/page_alloc.c:2895 discard_slab mm/slub.c:2753 [inline] __put_partials+0x165/0x1c0 mm/slub.c:3218 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] __kmalloc_cache_noprof+0x14c/0x3c0 mm/slub.c:4391 kmalloc_noprof include/linux/slab.h:905 [inline] usb_control_msg+0xbc/0x4a0 drivers/usb/core/message.c:144 rtl8xxxu_read32+0x100/0x1f0 drivers/net/wireless/realtek/rtl8xxxu/core.c:670 rtl8710b_indirect_read32+0xa8/0x1c0 drivers/net/wireless/realtek/rtl8xxxu/8710b.c:481 rtl8710b_read_syson_reg drivers/net/wireless/realtek/rtl8xxxu/8710b.c:532 [inline] rtl8710bu_identify_chip+0x3a1/0x640 drivers/net/wireless/realtek/rtl8xxxu/8710b.c:647 rtl8xxxu_probe+0x1038/0x6680 drivers/net/wireless/realtek/rtl8xxxu/core.c:7867 usb_probe_interface+0x300/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 Memory state around the buggy address: ffff888121f73e80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff888121f73f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >ffff888121f73f80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ ffff888121f74000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888121f74080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: a8 37 test $0x37,%al 2: 0b 83 f8 07 0f 87 or -0x78f0f808(%rbx),%eax 8: bc 02 00 00 89 mov $0x89000002,%esp d: c0 48 0f a3 rorb $0xa3,0xf(%rax) 11: 05 62 d2 42 09 add $0x942d262,%eax 16: 0f 82 74 02 00 00 jb 0x290 1c: 8b 35 7a e0 42 09 mov 0x942e07a(%rip),%esi # 0x942e09c 22: 85 f6 test %esi,%esi 24: 0f 85 8d 00 00 00 jne 0xb7 * 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2f: 65 48 2b 05 79 a8 37 sub %gs:0xb37a879(%rip),%rax # 0xb37a8b0 36: 0b 37: 0f 85 c7 02 00 00 jne 0x304 3d: 48 rex.W 3e: 83 .byte 0x83 3f: c4 .byte 0xc4