================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88805211bfff by task syz.5.1624/10431 CPU: 1 UID: 0 PID: 10431 Comm: syz.5.1624 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 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+0x40a/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+0x529/0xc60 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842 handle_softirqs+0x283/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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa8/0x110 kernel/locking/spinlock.c:194 Code: 74 05 e8 1b aa 4a f6 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4f f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 e3 4e 13 f6 65 8b 05 6c 01 24 07 85 c0 74 40 48 c7 04 24 0e 36 RSP: 0018:ffffc9001b2ff720 EFLAGS: 00000206 RAX: 7b2ded2c55873700 RBX: 0000000000000a06 RCX: 7b2ded2c55873700 RDX: 0000000000000000 RSI: ffffffff8d9b930b RDI: 0000000000000001 RBP: ffffc9001b2ff7b8 R08: ffffffff8fa39f37 R09: 1ffffffff1f473e6 R10: dffffc0000000000 R11: fffffbfff1f473e7 R12: dffffc0000000000 R13: ffff888144f380c0 R14: ffff888144f38000 R15: 1ffff9200365fee4 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] dummy_queue+0x573/0x8e0 drivers/usb/gadget/udc/dummy_hcd.c:744 usb_ep_queue+0xf0/0x390 drivers/usb/gadget/udc/core.c:300 raw_process_ep_io+0x599/0xbc0 drivers/usb/gadget/legacy/raw_gadget.c:1113 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1152 [inline] raw_ioctl+0x23d1/0x3c90 drivers/usb/gadget/legacy/raw_gadget.c:1324 __do_compat_sys_ioctl fs/ioctl.c:696 [inline] __se_compat_sys_ioctl fs/ioctl.c:639 [inline] __ia32_compat_sys_ioctl+0x543/0x840 fs/ioctl.c:639 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f12539 Code: 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5425504 EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000040085507 RDX: 00000000f5425548 RSI: 00000000f73a4ff4 RDI: 0000000000000001 RBP: 00000000f5426568 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10180: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4376 [inline] __kmalloc_node_track_caller_noprof+0x271/0x4e0 mm/slub.c:4395 kmemdup_noprof+0x2b/0x70 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:765 [inline] smc_sysctl_net_init+0x42/0x420 net/smc/smc_sysctl.c:113 smc_net_init+0x16/0x50 net/smc/af_smc.c:3479 ops_init+0x35c/0x5c0 net/core/net_namespace.c:136 setup_net+0x10c/0x320 net/core/net_namespace.c:438 copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570 create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110 copy_namespaces+0x438/0x4b0 kernel/nsproxy.c:175 copy_process+0x1733/0x3c00 kernel/fork.c:2178 kernel_clone+0x21e/0x840 kernel/fork.c:2605 __do_compat_sys_ia32_clone arch/x86/kernel/sys_ia32.c:254 [inline] __se_compat_sys_ia32_clone arch/x86/kernel/sys_ia32.c:240 [inline] __ia32_compat_sys_ia32_clone+0x189/0x1e0 arch/x86/kernel/sys_ia32.c:240 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 59: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kfree+0x18e/0x440 mm/slub.c:4894 smc_net_exit+0x15/0x20 net/smc/af_smc.c:3487 ops_exit_list net/core/net_namespace.c:198 [inline] ops_undo_list+0x497/0x990 net/core/net_namespace.c:251 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:682 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+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 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 ffff88805211bc00 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 [ffff88805211bc00, ffff88805211be00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888052118400 pfn:0x52118 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801a441c80 ffffea0001f6ff10 ffffea000155ac10 raw: ffff888052118400 0000000000100008 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801a441c80 ffffea0001f6ff10 ffffea000155ac10 head: ffff888052118400 0000000000100008 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001484601 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 8551, tgid 8551 (syz-executor), ts 196288039751, free_ts 185774281082 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:2492 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0xbeb/0x1420 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __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+0x305/0x4f0 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fib6_info_alloc+0x30/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x142/0x860 net/ipv6/route.c:3811 ip6_route_add+0x49/0x1b0 net/ipv6/route.c:3940 addrconf_add_mroute net/ipv6/addrconf.c:2552 [inline] addrconf_add_dev+0x24f/0x340 net/ipv6/addrconf.c:2570 addrconf_dev_config net/ipv6/addrconf.c:3479 [inline] addrconf_init_auto_addrs+0x57c/0xa30 net/ipv6/addrconf.c:3567 addrconf_notify+0xacc/0x1010 net/ipv6/addrconf.c:3740 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9617 page last free pid 8498 tgid 8498 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:2758 [inline] __put_partials+0x156/0x1a0 mm/slub.c:3223 put_cpu_partial+0x17c/0x250 mm/slub.c:3298 __slab_free+0x2d5/0x3c0 mm/slub.c:4565 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:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kvmalloc_node_noprof+0x2b0/0x5f0 mm/slub.c:5067 bucket_table_alloc lib/rhashtable.c:186 [inline] rhashtable_rehash_alloc+0x9f/0x2a0 lib/rhashtable.c:367 rht_deferred_worker+0x4f8/0x2430 lib/rhashtable.c:-1 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+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 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: ffff88805211be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805211bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805211bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805211c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805211c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 1b aa 4a f6 call 0xf64aaa22 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4f jne 0x6b 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 e3 4e 13 f6 call 0xf6134f12 <-- trapping instruction 2f: 65 8b 05 6c 01 24 07 mov %gs:0x724016c(%rip),%eax # 0x72401a2 36: 85 c0 test %eax,%eax 38: 74 40 je 0x7a 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss