================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88813fffbfff by task syz.3.2496/13876 CPU: 0 UID: 0 PID: 13876 Comm: syz.3.2496 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1a0 mm/kasan/report.c:595 mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139 hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741 dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:lock_acquire+0x5e/0x330 kernel/locking/lockdep.c:5872 Code: 05 7b 34 3d 0b 83 f8 07 0f 87 a4 02 00 00 48 0f a3 05 06 aa 3e 09 0f 82 6f 02 00 00 8b 35 9e b6 3e 09 85 f6 0f 85 8a 00 00 00 <48> 8b 44 24 30 65 48 2b 05 1d 34 3d 0b 0f 85 b8 02 00 00 48 83 c4 RSP: 0018:ffffc90012ae78f8 EFLAGS: 00000206 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff88dcbbf7 RDI: ffffffff878e97a0 RBP: ffffffff894da3a0 R08: 0000000086db7919 R09: 0000000000000007 R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 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/0x1ea0 arch/x86/kernel/unwind_orc.c:495 arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kfree+0x1ad/0x630 mm/slub.c:6878 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1154 [inline] raw_ioctl+0x265/0x2b80 drivers/usb/gadget/legacy/raw_gadget.c:1325 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f56da23ab4b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007f56d8c8df60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f56da23ab4b RDX: 00007f56d8c8dfe0 RSI: 0000000040085507 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007f56da5e0320 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 0000200000000040 R13: 0000000000000000 R14: 00007f56da4b5fa0 R15: 00007ffd8b7c3b88 Allocated by task 13775: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] alloc_pipe_info+0x10e/0x590 fs/pipe.c:800 get_pipe_inode fs/pipe.c:896 [inline] create_pipe_files+0x8c/0x960 fs/pipe.c:928 __do_pipe_flags fs/pipe.c:990 [inline] do_pipe2+0xbd/0x1e0 fs/pipe.c:1038 __do_sys_pipe2 fs/pipe.c:1056 [inline] __se_sys_pipe2 fs/pipe.c:1054 [inline] __x64_sys_pipe2+0x54/0x80 fs/pipe.c:1054 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 13775: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kfree+0x1ad/0x630 mm/slub.c:6878 put_pipe_info fs/pipe.c:721 [inline] pipe_release+0x27a/0x2c0 fs/pipe.c:744 __fput+0x3ff/0xb40 fs/file_table.c:468 fput_close_sync+0x118/0x250 fs/file_table.c:573 __do_sys_close fs/open.c:1573 [inline] __se_sys_close fs/open.c:1558 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1558 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88813fffbc00 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 511 bytes to the right of allocated 512-byte region [ffff88813fffbc00, ffff88813fffbe00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13fff8 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88811e9c1e01 anon flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff88810004b140 0000000000000000 0000000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 ffff88811e9c1e01 head: 0200000000000040 ffff88810004b140 0000000000000000 0000000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 ffff88811e9c1e01 head: 0200000000000002 ffffea0004fffe01 00000000ffffffff 00000000ffffffff head: ffff88813fff9dc0 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 2847, tgid 2847 (klogd), ts 1300170782911, free_ts 1228145694698 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240 alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c4/0x440 mm/slub.c:3302 ___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656 __slab_alloc.isra.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kmalloc_node_track_caller_noprof+0x5d4/0x9a0 mm/slub.c:5764 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:608 __alloc_skb+0x186/0x410 net/core/skbuff.c:690 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_skb_with_frags+0xe0/0x810 net/core/skbuff.c:6714 sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2995 unix_dgram_sendmsg+0x3c7/0x1820 net/unix/af_unix.c:2130 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] __sys_sendto+0x4aa/0x520 net/socket.c:2206 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2209 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 page last free pid 13106 tgid 13106 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973 vfree.part.0+0x12b/0x9d0 mm/vmalloc.c:3466 vfree+0x55/0x80 mm/vmalloc.c:3443 hiddev_release+0x3be/0x520 drivers/hid/usbhid/hiddev.c:239 __fput+0x3ff/0xb40 fs/file_table.c:468 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x829/0x2a30 kernel/exit.c:971 do_group_exit+0xd5/0x2a0 kernel/exit.c:1112 __do_sys_exit_group kernel/exit.c:1123 [inline] __se_sys_exit_group kernel/exit.c:1121 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1121 x64_sys_call+0x14fd/0x1510 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88813fffbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813fffbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88813fffbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88813fffc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813fffc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 05 7b 34 3d 0b add $0xb3d347b,%eax 5: 83 f8 07 cmp $0x7,%eax 8: 0f 87 a4 02 00 00 ja 0x2b2 e: 48 0f a3 05 06 aa 3e bt %rax,0x93eaa06(%rip) # 0x93eaa1c 15: 09 16: 0f 82 6f 02 00 00 jb 0x28b 1c: 8b 35 9e b6 3e 09 mov 0x93eb69e(%rip),%esi # 0x93eb6c0 22: 85 f6 test %esi,%esi 24: 0f 85 8a 00 00 00 jne 0xb4 * 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2f: 65 48 2b 05 1d 34 3d sub %gs:0xb3d341d(%rip),%rax # 0xb3d3454 36: 0b 37: 0f 85 b8 02 00 00 jne 0x2f5 3d: 48 rex.W 3e: 83 .byte 0x83 3f: c4 .byte 0xc4