================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852 Read of size 1 at addr ffff88805bb93fff by task kworker/1:0/24 CPU: 1 UID: 0 PID: 24 Comm: kworker/1:0 Not tainted 6.15.0-rc6-syzkaller-00047-ge9565e23cd89 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852 __hid_input_report drivers/hid/hid-core.c:2117 [inline] hid_input_report+0x407/0x520 drivers/hid/hid-core.c:2144 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x41a/0x690 drivers/usb/core/hcd.c:1650 dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1994 __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+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:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 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 7b a4 6e 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 03 27 38 f6 65 8b 05 6c c5 1c 07 85 c0 74 40 48 c7 04 24 0e 36 RSP: 0018:ffffc900001e71a0 EFLAGS: 00000206 RAX: 834e0718ede05700 RBX: 0000000000000a02 RCX: 834e0718ede05700 RDX: 0000000000000006 RSI: ffffffff8d74c01e RDI: 0000000000000001 RBP: ffffc900001e7230 R08: ffffffff8f7efb77 R09: 1ffffffff1efdf6e R10: dffffc0000000000 R11: fffffbfff1efdf6f R12: dffffc0000000000 R13: ffff888028054100 R14: ffffffff8ebccfc0 R15: 1ffff9200003ce34 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] usb_hcd_poll_rh_status+0x406/0x620 drivers/usb/core/hcd.c:762 dummy_hub_control+0xf83/0x17e0 drivers/usb/gadget/udc/dummy_hcd.c:2370 rh_call_control drivers/usb/core/hcd.c:656 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:821 [inline] usb_hcd_submit_urb+0xe07/0x1aa0 drivers/usb/core/hcd.c:1529 usb_start_wait_urb+0x114/0x4c0 drivers/usb/core/message.c:59 usb_internal_control_msg drivers/usb/core/message.c:103 [inline] usb_control_msg+0x232/0x3e0 drivers/usb/core/message.c:154 get_port_status drivers/usb/core/hub.c:605 [inline] hub_ext_port_status+0x116/0x820 drivers/usb/core/hub.c:622 hub_port_wait_reset drivers/usb/core/hub.c:-1 [inline] hub_port_reset+0x72e/0x1750 drivers/usb/core/hub.c:3061 hub_port_init+0xfb9/0x2800 drivers/usb/core/hub.c:5020 hub_port_connect drivers/usb/core/hub.c:5460 [inline] hub_port_connect_change drivers/usb/core/hub.c:5671 [inline] port_event drivers/usb/core/hub.c:5831 [inline] hub_event+0x2518/0x4a00 drivers/usb/core/hub.c:5913 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xade/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 17230: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203 __kernfs_new_node+0xd7/0x7f0 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1038 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319 create_files fs/sysfs/group.c:76 [inline] internal_create_group+0x66d/0x1110 fs/sysfs/group.c:183 internal_create_groups fs/sysfs/group.c:223 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:249 device_add_groups drivers/base/core.c:2839 [inline] device_add_attrs+0xe0/0x5a0 drivers/base/core.c:2903 device_add+0x496/0xb50 drivers/base/core.c:3646 netdev_register_kobject+0x156/0x2f0 net/core/net-sysfs.c:2336 register_netdevice+0x126c/0x1af0 net/core/dev.c:10997 veth_newlink+0x42f/0xa50 drivers/net/veth.c:1818 rtnl_newlink_create+0x305/0xaf0 net/core/rtnetlink.c:3833 __rtnl_newlink net/core/rtnetlink.c:3950 [inline] rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4065 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6955 netlink_rcv_skb+0x21c/0x490 net/netlink/af_netlink.c:2534 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x758/0x8d0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:727 __sys_sendto+0x3bd/0x520 net/socket.c:2180 __do_compat_sys_socketcall net/compat.c:-1 [inline] __se_compat_sys_socketcall net/compat.c:423 [inline] __ia32_compat_sys_socketcall+0x71c/0x9c0 net/compat.c:423 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb4/0x110 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 The buggy address belongs to the object at ffff88805bb93f00 which belongs to the cache kernfs_node_cache of size 176 The buggy address is located 79 bytes to the right of allocated 176-byte region [ffff88805bb93f00, ffff88805bb93fb0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5bb93 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b2b8dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000110011 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 17230, tgid 17230 (syz-executor), ts 998961513027, free_ts 998954418826 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4203 __kernfs_new_node+0xd7/0x7f0 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1038 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319 create_files fs/sysfs/group.c:76 [inline] internal_create_group+0x66d/0x1110 fs/sysfs/group.c:183 internal_create_groups fs/sysfs/group.c:223 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:249 device_add_groups drivers/base/core.c:2839 [inline] device_add_attrs+0xe0/0x5a0 drivers/base/core.c:2903 device_add+0x496/0xb50 drivers/base/core.c:3646 netdev_register_kobject+0x156/0x2f0 net/core/net-sysfs.c:2336 page last free pid 10733 tgid 10733 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xb0e/0xcd0 mm/page_alloc.c:2725 __slab_free+0x326/0x400 mm/slub.c:4553 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/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:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203 getname_flags+0xb8/0x540 fs/namei.c:146 getname include/linux/fs.h:2852 [inline] do_sys_openat2+0xbc/0x1c0 fs/open.c:1423 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805bb93e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88805bb93f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805bb93f80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff88805bb94000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805bb94080: 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 7b a4 6e f6 call 0xf66ea482 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 03 27 38 f6 call 0xf6382732 <-- trapping instruction 2f: 65 8b 05 6c c5 1c 07 mov %gs:0x71cc56c(%rip),%eax # 0x71cc5a2 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