================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888029caffff by task kworker/u8:1/13 CPU: 0 UID: 0 PID: 13 Comm: kworker/u8:1 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: events_unbound nsim_dev_trap_report_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2139 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38b/0x610 drivers/usb/core/hcd.c:1661 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745 dummy_timer+0x1809/0x3a00 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x202/0xad0 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:__kasan_check_byte+0x15/0x50 mm/kasan/common.c:579 Code: 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 40 d6 41 54 49 89 f4 55 48 89 fd 53 e8 5d 23 00 00 89 c3 <84> c0 74 0b 89 d8 5b 5d 41 5c e9 57 d6 eb fe 4c 89 e1 48 89 ef 31 RSP: 0018:ffffc90000127648 EFLAGS: 00000297 RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000002 RDX: 0000000000000000 RSI: ffffffff816c05f1 RDI: fffffbfff1c7888c RBP: ffffffff8e3c4460 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000082897 R12: ffffffff816c05f1 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 kasan_check_byte include/linux/kasan.h:401 [inline] lock_acquire kernel/locking/lockdep.c:5842 [inline] lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5825 rcu_lock_acquire include/linux/rcupdate.h:331 [inline] rcu_read_lock include/linux/rcupdate.h:867 [inline] class_rcu_constructor include/linux/rcupdate.h:1195 [inline] unwind_next_frame+0xd1/0x20a0 arch/x86/kernel/unwind_orc.c:479 arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 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+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2530 [inline] slab_free mm/slub.c:6619 [inline] kmem_cache_free+0x2d4/0x6c0 mm/slub.c:6729 kfree_skbmem+0x1a4/0x1f0 net/core/skbuff.c:1110 __kfree_skb net/core/skbuff.c:1167 [inline] consume_skb net/core/skbuff.c:1398 [inline] consume_skb+0xcc/0x100 net/core/skbuff.c:1392 nsim_dev_trap_report drivers/net/netdevsim/dev.c:836 [inline] nsim_dev_trap_report_work+0x8bd/0xcf0 drivers/net/netdevsim/dev.c:866 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 1: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] device_private_init drivers/base/core.c:3534 [inline] device_add+0xccc/0x1aa0 drivers/base/core.c:3585 platform_device_add+0x316/0x810 drivers/base/platform.c:716 vudc_init+0xbd/0x4b0 drivers/usb/usbip/vudc_main.c:56 do_one_initcall+0x123/0x6e0 init/main.c:1283 do_initcall_level init/main.c:1345 [inline] do_initcalls init/main.c:1361 [inline] do_basic_setup init/main.c:1380 [inline] kernel_init_freeable+0x5c8/0x920 init/main.c:1593 kernel_init+0x1c/0x2b0 init/main.c:1483 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888029cafc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 751 bytes to the right of allocated 272-byte region [ffff888029cafc00, ffff888029cafd10) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888029cac800 pfn:0x29cac 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 ffff88813ffa6c80 ffffea0001568310 ffffea000156c910 raw: ffff888029cac800 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88813ffa6c80 ffffea0001568310 ffffea000156c910 head: ffff888029cac800 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000a72b01 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 1, tgid 1 (swapper/0), ts 25394362691, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3046 [inline] allocate_slab mm/slub.c:3219 [inline] new_slab+0x24a/0x360 mm/slub.c:3273 ___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4643 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4762 __slab_alloc_node mm/slub.c:4838 [inline] slab_alloc_node mm/slub.c:5260 [inline] __kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5750 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] device_private_init drivers/base/core.c:3534 [inline] device_add+0xccc/0x1aa0 drivers/base/core.c:3585 usb_hub_create_port_device+0x3a1/0xde0 drivers/usb/core/port.c:769 hub_configure drivers/usb/core/hub.c:1738 [inline] hub_probe+0x203b/0x3480 drivers/usb/core/hub.c:2005 usb_probe_interface+0x303/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 page_owner free stack trace missing Memory state around the buggy address: ffff888029cafe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029caff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029caff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888029cb0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888029cb0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 80 00 00 addb $0x0,(%rax) 3: 00 00 add %al,(%rax) 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 0f 1f 40 d6 nopl -0x2a(%rax) 19: 41 54 push %r12 1b: 49 89 f4 mov %rsi,%r12 1e: 55 push %rbp 1f: 48 89 fd mov %rdi,%rbp 22: 53 push %rbx 23: e8 5d 23 00 00 call 0x2385 28: 89 c3 mov %eax,%ebx * 2a: 84 c0 test %al,%al <-- trapping instruction 2c: 74 0b je 0x39 2e: 89 d8 mov %ebx,%eax 30: 5b pop %rbx 31: 5d pop %rbp 32: 41 5c pop %r12 34: e9 57 d6 eb fe jmp 0xfeebd690 39: 4c 89 e1 mov %r12,%rcx 3c: 48 89 ef mov %rbp,%rdi 3f: 31 .byte 0x31