================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88802efbffff by task syz.4.91/6296 CPU: 1 UID: 0 PID: 6296 Comm: syz.4.91 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 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:2130 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+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 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+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:36 [inline] RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:139 [inline] RIP: 0010:wrmsrq arch/x86/include/asm/msr.h:199 [inline] RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:233 [inline] RIP: 0010:__x2apic_send_IPI_dest arch/x86/kernel/apic/x2apic_phys.c:113 [inline] RIP: 0010:x2apic_send_IPI+0x9a/0xe0 arch/x86/kernel/apic/x2apic_phys.c:50 Code: 8b 13 0f ae f0 0f ae e8 b9 00 04 00 00 41 83 fc 02 44 89 e0 48 0f 44 c1 48 c1 e2 20 b9 30 08 00 00 48 09 d0 48 c1 ea 20 0f 30 <66> 90 5b 5d 41 5c e9 db f9 2d 0a 5b 31 d2 5d 48 89 c6 bf 30 08 00 RSP: 0018:ffffc90005cefa08 EFLAGS: 00000246 RAX: 00000000000000fb RBX: ffff8880b84201b4 RCX: 0000000000000830 RDX: 0000000000000000 RSI: 00000000000000fb RDI: ffffffff8df61e80 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 00000000000000fb R13: 1ffff92000b9df47 R14: 1ffff92000b9df01 R15: 0000000000000000 arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:95 [inline] send_call_function_single_ipi kernel/smp.c:120 [inline] __smp_call_single_queue+0x28c/0x2f0 kernel/smp.c:413 generic_exec_single+0xb4/0x390 kernel/smp.c:450 smp_call_function_single_async+0x68/0xd0 kernel/smp.c:732 rdmsr_safe_on_cpu+0x104/0x210 arch/x86/lib/msr-smp.c:179 msr_read+0x19d/0x250 arch/x86/kernel/msr.c:66 vfs_read+0x1e4/0xcf0 fs/read_write.c:570 ksys_read+0x12a/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6a6018eba9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6a60ff1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f6a603d6090 RCX: 00007f6a6018eba9 RDX: 0000000000018ff8 RSI: 0000200000019680 RDI: 0000000000000008 RBP: 00007f6a60211e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f6a603d6128 R14: 00007f6a603d6090 R15: 00007fff5cfe6508 Allocated by task 1: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] device_private_init drivers/base/core.c:3534 [inline] device_add+0xccc/0x1aa0 drivers/base/core.c:3585 __video_register_device+0x1dd9/0x5ab0 drivers/media/v4l2-core/v4l2-dev.c:1064 video_register_device include/media/v4l2-dev.h:390 [inline] vivid_create_devnodes drivers/media/test-drivers/vivid/vivid-core.c:1709 [inline] vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:2042 [inline] vivid_probe drivers/media/test-drivers/vivid/vivid-core.c:2095 [inline] vivid_probe+0x9b0f/0xb890 drivers/media/test-drivers/vivid/vivid-core.c:2080 platform_probe+0x103/0x1d0 drivers/base/platform.c:1405 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 __driver_attach+0x283/0x580 drivers/base/dd.c:1217 bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:370 bus_add_driver+0x2e9/0x690 drivers/base/bus.c:678 driver_register+0x15c/0x4b0 drivers/base/driver.c:249 vivid_init+0x5eb/0x8c0 drivers/media/test-drivers/vivid/vivid-core.c:2294 do_one_initcall+0x120/0x6e0 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c2/0x910 init/main.c:1579 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x56a/0x730 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 ffff88802efbfc00 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 [ffff88802efbfc00, ffff88802efbfd10) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2efbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b841c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b841c80 dead000000000122 0000000000000000 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000bbef01 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 10935422673, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xcf2/0x1750 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kvmalloc_node_noprof+0x3b1/0x620 mm/slub.c:5067 v4l2_ctrl_new+0x97d/0x2180 drivers/media/v4l2-core/v4l2-ctrls-core.c:2031 v4l2_ctrl_new_std+0x1be/0x290 drivers/media/v4l2-core/v4l2-ctrls-core.c:2185 vivid_create_controls+0x19d5/0x3e10 drivers/media/test-drivers/vivid/vivid-ctrls.c:1946 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1933 [inline] vivid_probe drivers/media/test-drivers/vivid/vivid-core.c:2095 [inline] vivid_probe+0x515f/0xb890 drivers/media/test-drivers/vivid/vivid-core.c:2080 platform_probe+0x103/0x1d0 drivers/base/platform.c:1405 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 page_owner free stack trace missing Memory state around the buggy address: ffff88802efbfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802efbff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802efbff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802efc0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802efc0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 8b 13 mov (%rbx),%edx 2: 0f ae f0 mfence 5: 0f ae e8 lfence 8: b9 00 04 00 00 mov $0x400,%ecx d: 41 83 fc 02 cmp $0x2,%r12d 11: 44 89 e0 mov %r12d,%eax 14: 48 0f 44 c1 cmove %rcx,%rax 18: 48 c1 e2 20 shl $0x20,%rdx 1c: b9 30 08 00 00 mov $0x830,%ecx 21: 48 09 d0 or %rdx,%rax 24: 48 c1 ea 20 shr $0x20,%rdx 28: 0f 30 wrmsr * 2a: 66 90 xchg %ax,%ax <-- trapping instruction 2c: 5b pop %rbx 2d: 5d pop %rbp 2e: 41 5c pop %r12 30: e9 db f9 2d 0a jmp 0xa2dfa10 35: 5b pop %rbx 36: 31 d2 xor %edx,%edx 38: 5d pop %rbp 39: 48 89 c6 mov %rax,%rsi 3c: bf .byte 0xbf 3d: 30 08 xor %cl,(%rax)