================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 Read of size 1 at addr ffff888134577fff by task kworker/1:6/8695 CPU: 1 UID: 0 PID: 8695 Comm: kworker/1:6 Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 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+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 __hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175 hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287 __usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741 dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023 __run_hrtimer kernel/time/hrtimer.c:2074 [inline] __hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148 handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x168/0x210 kernel/softirq.c:758 irq_exit_rcu+0x9/0x30 kernel/softirq.c:775 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:228 [inline] RIP: 0010:unwind_next_frame+0x1f6/0x2090 arch/x86/kernel/unwind_orc.c:510 Code: 89 c3 39 d0 0f 83 2f 16 00 00 48 ba 00 00 00 00 00 fc ff df 89 c1 48 8d 3c 8d b8 95 f4 8b 49 89 f8 49 c1 e8 03 45 0f b6 04 10 <48> 89 fa 83 e2 07 83 c2 03 44 38 c2 7c 2f 45 84 c0 74 2a 48 89 4c RSP: 0018:ffffc9000213e3f8 EFLAGS: 00000a06 RAX: 00000000000050b0 RBX: 0000000000000001 RCX: 00000000000050b0 RDX: dffffc0000000000 RSI: 0000000000068d23 RDI: ffffffff8bf5d878 RBP: ffffc9000213e4b0 R08: 0000000000000000 R09: 0000000000000007 R10: 0000000000000200 R11: 00000000000050b0 R12: ffffc9000213e4b8 R13: ffffc9000213e468 R14: ffffc9000213e49d R15: ffffffff8150b060 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:409 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2d8/0x680 mm/slub.c:5563 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] init_srcu_struct_fields+0xa67/0xfa0 kernel/rcu/srcutree.c:207 __init_srcu_struct include/linux/srcu.h:33 [inline] gpiochip_add_data_with_key+0x2ec/0x3840 drivers/gpio/gpiolib.c:1204 devm_gpiochip_add_data_with_key+0x5c/0xd0 drivers/gpio/gpiolib-devres.c:363 mcp2221_probe.cold+0x94d/0xf16 drivers/hid/hid-mcp2221.c:1342 __hid_device_probe drivers/hid/hid-core.c:2839 [inline] hid_device_probe+0x4fe/0x850 drivers/hid/hid-core.c:2878 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:3065 usbhid_probe+0xa64/0x10b0 drivers/hid/usbhid/hid-core.c:1452 usb_probe_interface+0x386/0x980 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_set_configuration+0xd97/0x1dc0 drivers/usb/core/message.c:2274 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2713 usb_new_device drivers/usb/core/hub.c:5838 [inline] hub_port_connect drivers/usb/core/hub.c:5585 [inline] hub_port_connect_change drivers/usb/core/hub.c:5725 [inline] port_event drivers/usb/core/hub.c:5889 [inline] hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5971 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 2976: 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:351 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:377 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_noprof+0x264/0x650 mm/slub.c:5010 lsm_inode_alloc security/security.c:254 [inline] security_inode_alloc+0x3b/0x150 security/security.c:1215 inode_init_always_gfp+0xc6f/0xfb0 fs/inode.c:298 inode_init_always include/linux/fs.h:2965 [inline] alloc_inode+0x8e/0x250 fs/inode.c:345 new_inode+0x22/0x1c0 fs/inode.c:1170 __shmem_get_inode+0x1df/0xec0 mm/shmem.c:3043 shmem_get_inode mm/shmem.c:3140 [inline] shmem_mknod+0xcb/0x2e0 mm/shmem.c:3833 shmem_mkdir+0x31/0x80 mm/shmem.c:3896 vfs_mkdir+0x364/0x850 fs/namei.c:5410 filename_mkdirat+0x136/0x450 fs/namei.c:5443 __do_sys_mkdirat fs/namei.c:5464 [inline] __se_sys_mkdirat fs/namei.c:5461 [inline] __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5461 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 23: 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:264 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6509 [inline] kmem_cache_free+0x108/0x650 mm/slub.c:6636 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645 run_ksoftirqd kernel/softirq.c:1099 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1091 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3181 security_inode_free+0x53/0x90 security/security.c:1253 __destroy_inode+0x1ea/0x710 fs/inode.c:362 destroy_inode+0x91/0x1c0 fs/inode.c:385 evict+0x599/0xad0 fs/inode.c:846 iput_final fs/inode.c:2014 [inline] iput.part.0+0x989/0x1050 fs/inode.c:2063 iput+0x35/0x40 fs/inode.c:2029 d_delete_notify include/linux/fsnotify.h:381 [inline] vfs_rmdir fs/namei.c:5528 [inline] vfs_rmdir+0x5c8/0x8a0 fs/namei.c:5488 filename_rmdir+0x2eb/0x590 fs/namei.c:5572 __do_sys_unlinkat fs/namei.c:5747 [inline] __se_sys_unlinkat fs/namei.c:5740 [inline] __x64_sys_unlinkat+0xf5/0x130 fs/namei.c:5740 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888134577f18 which belongs to the cache lsm_inode_cache of size 120 The buggy address is located 111 bytes to the right of allocated 120-byte region [ffff888134577f18, ffff888134577f90) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x134577 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881012ea500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000200160016 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5502, tgid 5502 (syz-executor), ts 121080318192 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] kmem_cache_alloc_noprof+0x471/0x650 mm/slub.c:5010 lsm_inode_alloc security/security.c:254 [inline] security_inode_alloc+0x3b/0x150 security/security.c:1215 inode_init_always_gfp+0xc6f/0xfb0 fs/inode.c:298 inode_init_always include/linux/fs.h:2965 [inline] alloc_inode+0x8e/0x250 fs/inode.c:345 new_inode+0x22/0x1c0 fs/inode.c:1170 __shmem_get_inode+0x1df/0xec0 mm/shmem.c:3043 shmem_get_inode mm/shmem.c:3140 [inline] shmem_symlink+0x11f/0xbf0 mm/shmem.c:4066 vfs_symlink fs/namei.c:5794 [inline] vfs_symlink+0x178/0x4d0 fs/namei.c:5773 filename_symlinkat+0x17b/0x450 fs/namei.c:5819 __do_sys_symlinkat fs/namei.c:5839 [inline] __se_sys_symlinkat fs/namei.c:5834 [inline] __x64_sys_symlinkat+0x9c/0xe0 fs/namei.c:5834 page last free pid 5498 tgid 5497 ts 121062754212 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962 tlb_batch_list_free mm/mmu_gather.c:161 [inline] tlb_finish_mmu+0x27d/0x810 mm/mmu_gather.c:552 exit_mmap+0x454/0xa00 mm/mmap.c:1328 __mmput kernel/fork.c:1193 [inline] mmput+0xe0/0x430 kernel/fork.c:1216 exit_mm kernel/exit.c:592 [inline] do_exit+0x83b/0x2a50 kernel/exit.c:974 do_group_exit+0xd5/0x2a0 kernel/exit.c:1129 get_signal+0x1ec7/0x21e0 kernel/signal.c:3112 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0xd2/0x530 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline] do_syscall_64+0x55a/0x710 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888134577e80: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff888134577f00: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb >ffff888134577f80: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888134578000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888134578080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 89 c3 mov %eax,%ebx 2: 39 d0 cmp %edx,%eax 4: 0f 83 2f 16 00 00 jae 0x1639 a: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx 11: fc ff df 14: 89 c1 mov %eax,%ecx 16: 48 8d 3c 8d b8 95 f4 lea -0x740b6a48(,%rcx,4),%rdi 1d: 8b 1e: 49 89 f8 mov %rdi,%r8 21: 49 c1 e8 03 shr $0x3,%r8 25: 45 0f b6 04 10 movzbl (%r8,%rdx,1),%r8d * 2a: 48 89 fa mov %rdi,%rdx <-- trapping instruction 2d: 83 e2 07 and $0x7,%edx 30: 83 c2 03 add $0x3,%edx 33: 44 38 c2 cmp %r8b,%dl 36: 7c 2f jl 0x67 38: 45 84 c0 test %r8b,%r8b 3b: 74 2a je 0x67 3d: 48 rex.W 3e: 89 .byte 0x89 3f: 4c rex.WR