================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88811db8ffff by task kworker/0:3/5227 CPU: 0 UID: 0 PID: 5227 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Workqueue: 0x0 (events) 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+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x470 drivers/hid/hid-core.c:2139 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+0x1809/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x208/0x940 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 2a 3d 02 fa 48 89 df e8 e2 8f 02 fa e8 5d 8a 2e fa fb bf 01 00 00 00 32 e3 f5 f9 65 8b 05 4b 37 49 05 85 c0 74 06 5b c3 cc cc cc cc RSP: 0018:ffffc9000222fd38 EFLAGS: 00000202 RAX: 00000000002440e3 RBX: ffff8881f5638000 RCX: ffffffff8188023f RDX: 0000000000000000 RSI: ffffffff88d036ab RDI: 0000000000000001 RBP: ffffffff814a2a4b R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8aa48bd7 R11: ffff8881136ea7e8 R12: 0000000000000000 R13: ffff8881122fe500 R14: ffffed102245fca8 R15: ffff8881122fe540 worker_thread+0x2e0/0xf10 kernel/workqueue.c:3435 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Allocated by task 20419: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:414 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] device_private_init drivers/base/core.c:3534 [inline] device_add+0xcf2/0x1980 drivers/base/core.c:3585 usb_set_configuration+0x1187/0x1e50 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 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/0xb20 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x470 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x350 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031 device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086 bus_probe_device+0x64/0x150 drivers/base/bus.c:574 device_add+0x116e/0x1980 drivers/base/core.c:3689 usb_new_device+0xd07/0x1a90 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+0x31bf/0x5420 drivers/usb/core/hub.c:5953 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Freed by task 5215: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6668 [inline] kfree+0x2c8/0x680 mm/slub.c:6876 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1ef/0x6f0 lib/kobject.c:737 put_device+0x1f/0x30 drivers/base/core.c:3797 usb_disable_device+0x438/0x820 drivers/usb/core/message.c:1425 usb_disconnect+0x2e1/0x9e0 drivers/usb/core/hub.c:2345 hub_port_connect drivers/usb/core/hub.c:5407 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x1b50/0x5420 drivers/usb/core/hub.c:5953 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x74f/0xa30 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 ffff88811db8fc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 511 bytes to the right of allocated 512-byte region [ffff88811db8fc00, ffff88811db8fe00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11db8c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100041c80 ffffea000439fe00 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100041c80 ffffea000439fe00 dead000000000002 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000002 ffffea000476e301 00000000ffffffff 00000000ffffffff head: ffff88811db8d000 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5241, tgid 5241 (udevd), ts 1944929224651, free_ts 1944558633301 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c3/0x430 mm/slub.c:3302 ___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __kmalloc_cache_noprof+0x3d6/0x7e0 mm/slub.c:5771 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:641 do_dentry_open+0x723/0x13e0 fs/open.c:962 vfs_open+0x82/0x3f0 fs/open.c:1094 do_open fs/namei.c:4628 [inline] path_openat+0x2078/0x3140 fs/namei.c:4787 do_filp_open+0x20b/0x470 fs/namei.c:4814 do_sys_openat2+0x11f/0x250 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1447 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94 page last free pid 13404 tgid 13404 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x795/0x1010 mm/page_alloc.c:2943 hiddev_free drivers/hid/hid-core.c:763 [inline] kref_put include/linux/kref.h:65 [inline] hid_device_release+0x133/0x190 drivers/hid/hid-core.c:770 device_release+0xa4/0x240 drivers/base/core.c:2565 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1ef/0x6f0 lib/kobject.c:737 put_device+0x1f/0x30 drivers/base/core.c:3797 usbhid_probe+0xf33/0x1410 drivers/hid/usbhid/hid-core.c:1446 usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xb20 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x470 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x350 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031 device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086 bus_probe_device+0x64/0x150 drivers/base/bus.c:574 device_add+0x116e/0x1980 drivers/base/core.c:3689 Memory state around the buggy address: ffff88811db8fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811db8ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811db8ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811db90000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811db90080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 53 push %rbx 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fb mov %rdi,%rbx e: 48 83 c7 18 add $0x18,%rdi 12: e8 2a 3d 02 fa call 0xfa023d41 17: 48 89 df mov %rbx,%rdi 1a: e8 e2 8f 02 fa call 0xfa029001 1f: e8 5d 8a 2e fa call 0xfa2e8a81 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 32 e3 f5 f9 call 0xf9f5e361 <-- trapping instruction 2f: 65 8b 05 4b 37 49 05 mov %gs:0x549374b(%rip),%eax # 0x5493781 36: 85 c0 test %eax,%eax 38: 74 06 je 0x40 3a: 5b pop %rbx 3b: c3 ret 3c: cc int3 3d: cc int3 3e: cc int3 3f: cc int3