================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 Read of size 1 at addr ffff8880297cbfff by task udevd/5160 CPU: 0 PID: 5160 Comm: udevd Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x220 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 hid_input_report+0x400/0x520 drivers/hid/hid-core.c:2095 hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x8a3/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1750 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1814 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1831 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 RIP: 0010:memset_orig+0x4a/0xac arch/x86/lib/memset_64.S:73 Code: 75 6c 48 89 d1 48 c1 e9 06 74 35 0f 1f 44 00 00 48 ff c9 48 89 07 48 89 47 08 48 89 47 10 48 89 47 18 48 89 47 20 48 89 47 28 <48> 89 47 30 48 89 47 38 48 8d 7f 40 75 d8 0f 1f 84 00 00 00 00 00 RSP: 0018:ffffc900032d78b8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000dc0 RCX: 0000000000000000 RDX: 0000000000000200 RSI: 0000000000000000 RDI: ffffc900032d7a80 RBP: ffffc900032d7ae8 R08: 0000000000000004 R09: 0000000000000000 R10: ffffc900032d78c0 R11: fffffbfff21b4eb7 R12: ffff888141271190 R13: ffff88805b983018 R14: ffff888069b17000 R15: ffffc900032d78c0 kasan_save_stack mm/kasan/common.c:42 [inline] kasan_set_track+0x3f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] uevent_show+0x156/0x300 drivers/base/core.c:2700 dev_attr_show+0x54/0xc0 drivers/base/core.c:2379 sysfs_kf_seq_show+0x34d/0x4c0 fs/sysfs/file.c:59 seq_read_iter+0x49f/0xd50 fs/seq_file.c:230 call_read_iter include/linux/fs.h:2012 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x431/0x920 fs/read_write.c:470 ksys_read+0x147/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7feb26aa7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffdea5924e0 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007feb27213880 RCX: 00007feb26aa7407 RDX: 0000000000001000 RSI: 0000561d87464820 RDI: 000000000000000c RBP: 00007feb26befff0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000a R13: 00007feb26befea0 R14: 0000000000000000 R15: 0000561d873401b0 Allocated by task 17992: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3519 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd8/0x7e0 fs/kernfs/dir.c:624 kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1068 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x428/0xd00 fs/sysfs/group.c:152 internal_create_groups fs/sysfs/group.c:192 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:218 device_add_groups drivers/base/core.c:2785 [inline] device_add_attrs+0x1b2/0x810 drivers/base/core.c:2905 device_add+0x528/0xc20 drivers/base/core.c:3637 netdev_register_kobject+0x17a/0x310 net/core/net-sysfs.c:2042 register_netdevice+0x128f/0x1ae0 net/core/dev.c:10280 register_vlan_dev+0x3c7/0x7f0 net/8021q/vlan.c:180 vlan_newlink+0x446/0x590 net/8021q/vlan_netlink.c:195 rtnl_newlink_create net/core/rtnetlink.c:3517 [inline] __rtnl_newlink net/core/rtnetlink.c:3737 [inline] rtnl_newlink+0x14d0/0x2020 net/core/rtnetlink.c:3750 rtnetlink_rcv_msg+0x7c7/0xf10 net/core/rtnetlink.c:6475 netlink_rcv_skb+0x216/0x480 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8c1/0xbe0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x46a/0x620 net/socket.c:2201 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2209 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8880297cbe88 which belongs to the cache kernfs_node_cache of size 184 The buggy address is located 191 bytes to the right of allocated 184-byte region [ffff8880297cbe88, ffff8880297cbf40) The buggy address belongs to the physical page: page:ffffea0000a5f2c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x297cb flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888019a4ddc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 17992, tgid 17992 (syz-executor), ts 1406079552181, free_ts 1406078019654 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2e0 mm/slub.c:2081 ___slab_alloc+0xc6d/0x1300 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x1b7/0x2e0 mm/slub.c:3519 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd8/0x7e0 fs/kernfs/dir.c:624 kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1068 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x428/0xd00 fs/sysfs/group.c:152 internal_create_groups fs/sysfs/group.c:192 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:218 device_add_groups drivers/base/core.c:2785 [inline] device_add_attrs+0xdf/0x810 drivers/base/core.c:2894 device_add+0x528/0xc20 drivers/base/core.c:3637 netdev_register_kobject+0x17a/0x310 net/core/net-sysfs.c:2042 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 tlb_batch_list_free mm/mmu_gather.c:114 [inline] tlb_finish_mmu+0x112/0x1d0 mm/mmu_gather.c:395 exit_mmap+0x3f0/0xb50 mm/mmap.c:3315 __mmput+0x118/0x3c0 kernel/fork.c:1355 exit_mm+0x1da/0x2c0 kernel/exit.c:569 do_exit+0x88e/0x23c0 kernel/exit.c:870 do_group_exit+0x21b/0x2d0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff8880297cbe80: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880297cbf00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880297cbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880297cc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880297cc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 75 6c jne 0x6e 2: 48 89 d1 mov %rdx,%rcx 5: 48 c1 e9 06 shr $0x6,%rcx 9: 74 35 je 0x40 b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 10: 48 ff c9 dec %rcx 13: 48 89 07 mov %rax,(%rdi) 16: 48 89 47 08 mov %rax,0x8(%rdi) 1a: 48 89 47 10 mov %rax,0x10(%rdi) 1e: 48 89 47 18 mov %rax,0x18(%rdi) 22: 48 89 47 20 mov %rax,0x20(%rdi) 26: 48 89 47 28 mov %rax,0x28(%rdi) * 2a: 48 89 47 30 mov %rax,0x30(%rdi) <-- trapping instruction 2e: 48 89 47 38 mov %rax,0x38(%rdi) 32: 48 8d 7f 40 lea 0x40(%rdi),%rdi 36: 75 d8 jne 0x10 38: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 3f: 00