================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88804b74ffff by task kworker/0:3/5949 CPU: 0 UID: 0 PID: 5949 Comm: kworker/0:3 Not tainted 6.17.0-rc1-next-20250814-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: usb_hub_wq hub_event Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 __hid_input_report drivers/hid/hid-core.c:2130 [inline] hid_input_report+0x407/0x520 drivers/hid/hid-core.c:2157 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661 dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842 handle_softirqs+0x286/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:kasan_save_stack mm/kasan/common.c:57 [inline] RIP: 0010:kasan_save_track+0x41/0x80 mm/kasan/common.c:77 Code: 00 89 f3 49 89 fe 49 89 e7 ba 00 02 00 00 4c 89 ff 31 f6 e8 d1 fe 5f 09 4c 89 ff be 40 00 00 00 31 d2 e8 a2 4c 89 ff 4c 89 ff <89> c6 89 da b9 01 00 00 00 e8 11 f1 e4 02 65 48 8b 0c 25 08 a0 e4 RSP: 0000:ffffc9000479e1f0 EFLAGS: 00000246 RAX: 0000000000000035 RBX: 0000000000000dc0 RCX: 9c689cf28a187400 RDX: ffffffff90704d48 RSI: ffffffff8c04d960 RDI: ffffc9000479e1f0 RBP: ffffc9000479e420 R08: 0000000000000015 R09: 0000000000000000 R10: ffffc9000479e0f8 R11: ffffffff81ac88c0 R12: ffff88801a841280 R13: ffff888027318f80 R14: ffff888027318fe0 R15: ffffc9000479e1f0 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4365 [inline] __kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377 kmalloc_noprof include/linux/slab.h:913 [inline] kzalloc_noprof include/linux/slab.h:1043 [inline] kobject_get_path+0xc5/0x2d0 lib/kobject.c:161 kobject_uevent_env+0x292/0x8c0 lib/kobject_uevent.c:545 device_add+0x557/0xb50 drivers/base/core.c:3670 cdev_device_add+0x1d6/0x390 fs/char_dev.c:556 i2cdev_attach_adapter+0x2ed/0x4e0 drivers/i2c/i2c-dev.c:691 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 bus_notify+0x143/0x180 drivers/base/bus.c:1001 device_add+0x54d/0xb50 drivers/base/core.c:3669 i2c_register_adapter+0x4f1/0x10f0 drivers/i2c/i2c-core-base.c:1576 devm_i2c_add_adapter+0x1b/0x80 drivers/i2c/i2c-core-base.c:1848 mcp2221_probe+0x404/0x880 drivers/hid/hid-mcp2221.c:1289 __hid_device_probe drivers/hid/hid-core.c:2740 [inline] hid_device_probe+0x39d/0x710 drivers/hid/hid-core.c:2777 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 hid_add_device+0x398/0x540 drivers/hid/hid-core.c:2923 usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x665/0xc30 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_new_device+0xa39/0x16f0 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+0x2958/0x4a20 drivers/usb/core/hub.c:5952 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5904: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 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+0x1c1/0x3c0 mm/slub.c:4236 getname_flags+0xb8/0x540 fs/namei.c:146 getname include/linux/fs.h:2912 [inline] getname_maybe_null include/linux/fs.h:2919 [inline] vfs_fstatat+0x43/0x170 fs/stat.c:370 __do_sys_newfstatat fs/stat.c:542 [inline] __se_sys_newfstatat fs/stat.c:536 [inline] __x64_sys_newfstatat+0x116/0x190 fs/stat.c:536 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5904: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4782 vfs_fstatat+0x122/0x170 fs/stat.c:376 __do_sys_newfstatat fs/stat.c:542 [inline] __se_sys_newfstatat fs/stat.c:536 [inline] __x64_sys_newfstatat+0x116/0x190 fs/stat.c:536 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88804b74e600 which belongs to the cache names_cache of size 4096 The buggy address is located 2559 bytes to the right of allocated 4096-byte region [ffff88804b74e600, ffff88804b74f600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4b748 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801bed6640 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801bed6640 0000000000000000 dead000000000001 head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea00012dd201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5905, tgid 5905 (syz-executor), ts 680802392623, free_ts 680741796909 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236 getname_flags+0xb8/0x540 fs/namei.c:146 getname include/linux/fs.h:2912 [inline] do_sys_openat2+0xbc/0x1c0 fs/open.c:1429 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1461 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 9338 tgid 9336 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 discard_slab mm/slub.c:2753 [inline] __put_partials+0x156/0x1a0 mm/slub.c:3218 put_cpu_partial+0x17c/0x250 mm/slub.c:3293 __slab_free+0x2d5/0x3c0 mm/slub.c:4550 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349 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+0x1be/0x3d0 mm/slub.c:4391 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1043 [inline] ref_tracker_alloc+0x133/0x460 lib/ref_tracker.c:271 register_netdevice+0x14a3/0x1ae0 net/core/dev.c:11218 tun_set_iff+0x844/0xef0 drivers/net/tun.c:2804 __tun_chr_ioctl+0x788/0x1df0 drivers/net/tun.c:3085 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88804b74fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804b74ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804b74ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804b750000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804b750080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 00 89 f3 49 89 fe add %cl,-0x176b60d(%rcx) 6: 49 89 e7 mov %rsp,%r15 9: ba 00 02 00 00 mov $0x200,%edx e: 4c 89 ff mov %r15,%rdi 11: 31 f6 xor %esi,%esi 13: e8 d1 fe 5f 09 call 0x95ffee9 18: 4c 89 ff mov %r15,%rdi 1b: be 40 00 00 00 mov $0x40,%esi 20: 31 d2 xor %edx,%edx 22: e8 a2 4c 89 ff call 0xff894cc9 27: 4c 89 ff mov %r15,%rdi * 2a: 89 c6 mov %eax,%esi <-- trapping instruction 2c: 89 da mov %ebx,%edx 2e: b9 01 00 00 00 mov $0x1,%ecx 33: e8 11 f1 e4 02 call 0x2e4f149 38: 65 gs 39: 48 rex.W 3a: 8b .byte 0x8b 3b: 0c 25 or $0x25,%al 3d: 08 .byte 0x8 3e: a0 .byte 0xa0 3f: e4 .byte 0xe4