================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88805c157fff by task kworker/1:4/5919 CPU: 1 UID: 0 PID: 5919 Comm: kworker/1:4 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 __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+0x202/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 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+0xa4/0xc0 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: 06 3f 12 83 f8 07 0f 87 bc 02 00 00 89 c0 48 0f a3 05 22 99 13 0f 0f 82 74 02 00 00 8b 35 da ca 13 0f 85 f6 0f 85 8d 00 00 00 <48> 8b 44 24 30 65 48 2b 05 79 06 3f 12 0f 85 c7 02 00 00 48 83 c4 RSP: 0018:ffffc90003396768 EFLAGS: 00000206 RAX: 0000000000000046 RBX: ffffffff8e832b18 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8de2d6e8 RDI: ffffffff8c163300 RBP: 0000000000000000 R08: e591b3ec4ad990e7 R09: 000000000000000b R10: ffffc90003396698 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] sysfs_do_create_link_sd+0x41/0x140 fs/sysfs/symlink.c:34 sysfs_do_create_link fs/sysfs/symlink.c:80 [inline] sysfs_create_link+0x61/0xc0 fs/sysfs/symlink.c:92 device_add_class_symlinks drivers/base/core.c:3436 [inline] device_add+0x50a/0x1aa0 drivers/base/core.c:3640 cdev_device_add+0xc2/0x1e0 fs/char_dev.c:556 i2cdev_attach_adapter+0x359/0x4c0 drivers/i2c/i2c-dev.c:691 i2cdev_notifier_call+0x65/0x80 drivers/i2c/i2c-dev.c:729 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 bus_notify+0x56/0x70 drivers/base/bus.c:1001 device_add+0x10d3/0x1aa0 drivers/base/core.c:3669 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:1289 __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+0x23e/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+0x156/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+0x23e/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+0x156/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+0xec/0x3e0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x23e/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+0x156/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+0x2f34/0x4fe0 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+0x3c2/0x780 kernel/kthread.c:463 ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 2: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] set_kthread_struct+0xcb/0x380 kernel/kthread.c:125 copy_process+0x3107/0x7690 kernel/fork.c:2102 kernel_clone+0xfc/0x930 kernel/fork.c:2605 kernel_thread+0xd4/0x120 kernel/fork.c:2667 create_kthread kernel/kthread.c:486 [inline] kthreadd+0x503/0x800 kernel/kthread.c:846 ret_from_fork+0x56a/0x730 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 object at ffff88805c157c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 759 bytes to the right of allocated 264-byte region [ffff88805c157c00, ffff88805c157d08) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5c154 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b841c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b841c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001705501 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 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 5847, tgid 5847 (syz-executor), ts 70243689758, free_ts 15461512951 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+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xcf2/0x1750 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3811 ip6_route_add.part.0+0x22/0x1d0 net/ipv6/route.c:3940 ip6_route_add+0x45/0x60 net/ipv6/route.c:3937 addrconf_prefix_route+0x2fd/0x510 net/ipv6/addrconf.c:2488 inet6_addr_add+0x589/0x960 net/ipv6/addrconf.c:3053 inet6_rtm_newaddr+0x1619/0x1c70 net/ipv6/addrconf.c:5059 rtnetlink_rcv_msg+0x95b/0xe90 net/core/rtnetlink.c:6946 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 __free_pages mm/page_alloc.c:5260 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:7091 destroy_args+0x794/0xc10 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x120/0x6e0 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c2/0x910 init/main.c:1579 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88805c157e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805c157f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805c157f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805c158000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805c158080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 12 83 f8 07 0f 87 adc -0x78f0f808(%rbx),%al 6: bc 02 00 00 89 mov $0x89000002,%esp b: c0 48 0f a3 rorb $0xa3,0xf(%rax) f: 05 22 99 13 0f add $0xf139922,%eax 14: 0f 82 74 02 00 00 jb 0x28e 1a: 8b 35 da ca 13 0f mov 0xf13cada(%rip),%esi # 0xf13cafa 20: 85 f6 test %esi,%esi 22: 0f 85 8d 00 00 00 jne 0xb5 * 28: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2d: 65 48 2b 05 79 06 3f sub %gs:0x123f0679(%rip),%rax # 0x123f06ae 34: 12 35: 0f 85 c7 02 00 00 jne 0x302 3b: 48 rex.W 3c: 83 .byte 0x83 3d: c4 .byte 0xc4