================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888115373fff by task kworker/0:8/29489 CPU: 0 UID: 0 PID: 29489 Comm: kworker/0:8 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 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/0x1a0 mm/kasan/report.c:595 mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 __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:1777 [inline] __hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x1dd/0x8f0 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:arch_atomic_read arch/x86/include/asm/atomic.h:23 [inline] RIP: 0010:raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline] RIP: 0010:rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline] RIP: 0010:rcu_is_watching+0x60/0xc0 kernel/rcu/tree.c:751 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 75 5c 48 03 1c ed e0 cb f6 88 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 0f b6 14 02 <48> 89 d8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 24 8b 03 c1 e8 02 RSP: 0018:ffffc9000d5be160 EFLAGS: 00000a06 RAX: dffffc0000000000 RBX: ffff8881f5633628 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffffff878e9720 RDI: ffffffff88f6cbe0 RBP: 0000000000000000 R08: 00000000d7d6efe3 R09: 0000000000000007 R10: 0000000000000200 R11: 0000000000000000 R12: ffffffff819c9780 R13: ffffc9000d5be1e8 R14: 0000000000000000 R15: ffff888112010000 rcu_read_lock include/linux/rcupdate.h:868 [inline] class_rcu_constructor include/linux/rcupdate.h:1195 [inline] unwind_next_frame+0x6fa/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 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5657 [inline] __kmalloc_node_track_caller_noprof+0x34e/0x9a0 mm/slub.c:5764 __kmemdup_nul mm/util.c:64 [inline] kstrdup+0x51/0xe0 mm/util.c:84 kstrdup_const+0x63/0x80 mm/util.c:104 __kernfs_new_node+0x9b/0x960 fs/kernfs/dir.c:633 kernfs_new_node+0x11b/0x1a0 fs/kernfs/dir.c:718 kernfs_create_dir_ns+0x4c/0x1a0 fs/kernfs/dir.c:1088 sysfs_create_dir_ns+0x13a/0x2b0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x2c8/0x930 lib/kobject.c:240 kobject_add_varg lib/kobject.c:374 [inline] kobject_add+0x16a/0x1e0 lib/kobject.c:426 device_add+0x294/0x1950 drivers/base/core.c:3627 i2c_register_adapter+0x39e/0x1240 drivers/i2c/i2c-core-base.c:1573 i2c_add_adapter drivers/i2c/i2c-core-base.c:1673 [inline] i2c_add_adapter+0x10a/0x1a0 drivers/i2c/i2c-core-base.c:1653 devm_i2c_add_adapter+0x1b/0x90 drivers/i2c/i2c-core-base.c:1845 mcp2221_probe.cold+0x5de/0xab3 drivers/hid/hid-mcp2221.c:1289 __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:581 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086 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:581 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086 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:2210 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:581 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x400 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x340 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086 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+0x9c2/0x1840 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3421 kthread+0x3b3/0x730 kernel/kthread.c:463 ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Allocated by task 30642: 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_slab_alloc+0x6e/0x70 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] kmem_cache_alloc_from_sheaf_noprof+0x7e/0x160 mm/slub.c:5570 mas_pop_node lib/maple_tree.c:1086 [inline] mas_new_ma_node lib/maple_tree.c:2140 [inline] mas_split+0x90a/0x16b0 lib/maple_tree.c:3017 mas_commit_b_node.isra.0+0x76/0xc0 lib/maple_tree.c:3072 mas_wr_bnode+0x140/0x1d0 lib/maple_tree.c:3739 mas_wr_store_entry+0x7e3/0x2390 lib/maple_tree.c:3771 mas_store_prealloc+0x6e5/0xfb0 lib/maple_tree.c:5169 vma_iter_store_new mm/vma.h:551 [inline] vma_complete+0x974/0xe70 mm/vma.c:351 __split_vma+0xa3d/0xdf0 mm/vma.c:564 split_vma mm/vma.c:594 [inline] vma_modify+0x10c9/0x22c0 mm/vma.c:1672 vma_modify_flags+0x1f2/0x350 mm/vma.c:1692 mprotect_fixup+0x209/0xb40 mm/mprotect.c:756 do_mprotect_pkey+0x9e1/0xe70 mm/mprotect.c:930 __do_sys_mprotect mm/mprotect.c:951 [inline] __se_sys_mprotect mm/mprotect.c:948 [inline] __x64_sys_mprotect+0x78/0xc0 mm/mprotect.c:948 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 22: 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:2540 [inline] __rcu_free_sheaf_prepare+0x5d/0x280 mm/slub.c:2763 rcu_free_sheaf+0x1a/0xd0 mm/slub.c:6226 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857 handle_softirqs+0x1dd/0x8f0 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+0x3b3/0x730 kernel/kthread.c:463 ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff888115373e00 which belongs to the cache maple_node of size 256 The buggy address is located 255 bytes to the right of allocated 256-byte region [ffff888115373e00, ffff888115373f00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115372 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff88810004bc80 ffffea000404b600 dead000000000004 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff88810004bc80 ffffea000404b600 dead000000000004 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000001 ffffea000454dc81 00000000ffffffff 00000000ffffffff head: ffff888100000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 29881, tgid 29881 (modprobe), ts 2942046074435, free_ts 2382502302631 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240 alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c4/0x440 mm/slub.c:3302 ___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656 __kmem_cache_alloc_bulk+0x20f/0x700 mm/slub.c:7431 refill_sheaf mm/slub.c:2650 [inline] __prefill_sheaf_pfmemalloc+0x42/0x90 mm/slub.c:5328 kmem_cache_prefill_sheaf+0x1b7/0x420 mm/slub.c:5422 mt_get_sheaf lib/maple_tree.c:189 [inline] mas_alloc_nodes+0x2c3/0x390 lib/maple_tree.c:1140 mas_preallocate+0x39c/0xf10 lib/maple_tree.c:5194 vma_iter_prealloc mm/vma.h:505 [inline] __split_vma+0x33d/0xdf0 mm/vma.c:524 split_vma mm/vma.c:594 [inline] vma_modify+0x10c9/0x22c0 mm/vma.c:1672 vma_modify_flags+0x1f2/0x350 mm/vma.c:1692 mprotect_fixup+0x209/0xb40 mm/mprotect.c:756 do_mprotect_pkey+0x9e1/0xe70 mm/mprotect.c:930 page last free pid 21096 tgid 21096 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kmalloc_noprof+0x2f7/0x990 mm/slub.c:5669 kmalloc_noprof include/linux/slab.h:961 [inline] usb_alloc_urb+0x66/0xa0 drivers/usb/core/urb.c:75 usb_internal_control_msg drivers/usb/core/message.c:96 [inline] usb_control_msg+0x1d3/0x4a0 drivers/usb/core/message.c:154 usb_get_descriptor+0xbb/0x1b0 drivers/usb/core/message.c:794 usb_get_configuration+0x3a8/0x4220 drivers/usb/core/config.c:982 usb_enumerate_device drivers/usb/core/hub.c:2527 [inline] usb_new_device+0x580/0x7d0 drivers/usb/core/hub.c:2665 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+0x9c2/0x1840 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3421 kthread+0x3b3/0x730 kernel/kthread.c:463 ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888115373e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888115373f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888115373f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888115374000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888115374080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 48 89 fa mov %rdi,%rdx 3: 48 c1 ea 03 shr $0x3,%rdx 7: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) b: 75 5c jne 0x69 d: 48 03 1c ed e0 cb f6 add -0x77093420(,%rbp,8),%rbx 14: 88 15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1c: fc ff df 1f: 48 89 da mov %rbx,%rdx 22: 48 c1 ea 03 shr $0x3,%rdx 26: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx * 2a: 48 89 d8 mov %rbx,%rax <-- trapping instruction 2d: 83 e0 07 and $0x7,%eax 30: 83 c0 03 add $0x3,%eax 33: 38 d0 cmp %dl,%al 35: 7c 04 jl 0x3b 37: 84 d2 test %dl,%dl 39: 75 24 jne 0x5f 3b: 8b 03 mov (%rbx),%eax 3d: c1 e8 02 shr $0x2,%eax