=========================================
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
Read of size 1 at addr ffff88811ce07fff by task syz.2.2691/17830
CPU: 1 UID: 0 PID: 17830 Comm: syz.2.2691 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/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+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175
hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023
__run_hrtimer kernel/time/hrtimer.c:2074 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:_compound_head include/linux/page-flags.h:247 [inline]
RIP: 0010:page_slab mm/slab.h:176 [inline]
RIP: 0010:kfree+0x72/0x650 mm/slub.c:6794
Code: 00 00 48 83 fd 10 0f 86 46 01 00 00 48 89 ef e8 04 e4 59 ff 48 c1 e8 0c 48 89 c7 48 c1 e7 06 48 03 3d f2 d1 2e 07 48 8b 5f 08 <48> 89 d8 83 e0 01 48 83 e8 01 48 09 c3 48 21 fb 80 7b 33 f5 0f 95
RSP: 0018:ffffc90001a0fd98 EFLAGS: 00000282
RAX: 0000000000114a91 RBX: ffff888100041640 RCX: 000000000000002e
RDX: 0000000000000000 RSI: ffffffff87d2bd00 RDI: ffffea000452a440
RBP: ffff888114a912a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888114a912a0
R13: ffff888118c3ae00 R14: 00007f761ed95fe0 R15: 0000000000000003
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:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f762033e1eb
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:00007f761ed95f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f762033e1eb
RDX: 00007f761ed95fe0 RSI: 0000000040085507 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007f76206f0320 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00002000000000c0
R13: 0000000000000000 R14: 00007f76205c5fa0 R15: 00007ffead938e68
Allocated by task 5205:
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:409 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x2d8/0x680 mm/slub.c:5563
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
mm_init_sched+0x4d/0x4b0 kernel/sched/fair.c:1658
mm_alloc_sched_noprof include/linux/mm_types.h:1639 [inline]
mm_init+0x992/0xdb0 kernel/fork.c:1144
dup_mm kernel/fork.c:1539 [inline]
copy_mm kernel/fork.c:1595 [inline]
copy_process+0x4b00/0x8110 kernel/fork.c:2311
kernel_clone+0x176/0x9d0 kernel/fork.c:2771
__do_sys_clone+0xd9/0x120 kernel/fork.c:2913
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 15:
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:264 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6509 [inline]
kfree+0x20c/0x650 mm/slub.c:6802
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
Last potentially related work creation:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:556
__call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3181
sched_cache_group_put kernel/sched/fair.c:1713 [inline]
sched_cache_group_put kernel/sched/fair.c:1708 [inline]
mm_destroy_sched+0x9c/0xd0 kernel/sched/fair.c:1808
__mmdrop+0xbc/0x430 kernel/fork.c:733
mmdrop include/linux/sched/mm.h:55 [inline]
__mmput kernel/fork.c:1205 [inline]
mmput+0x385/0x430 kernel/fork.c:1216
exit_mm kernel/exit.c:592 [inline]
do_exit+0x83b/0x2a50 kernel/exit.c:974
do_group_exit+0xd5/0x2a0 kernel/exit.c:1129
get_signal+0x1ec7/0x21e0 kernel/signal.c:3112
arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0xd2/0x530 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x55a/0x710 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88811ce07f00
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 127 bytes to the right of
allocated 128-byte region [ffff88811ce07f00, ffff88811ce07f80)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11ce07
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff888100041a00 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 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 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 11, tgid 11 (kworker/0:1), ts 214002556132
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab mm/slub.c:3462 [inline]
new_slab+0xa9/0x6e0 mm/slub.c:3513
refill_objects+0xe3/0x410 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
__kmalloc_cache_noprof+0x4a1/0x680 mm/slub.c:5559
_kmalloc_noprof include/linux/slab.h:991 [inline]
dummy_urb_enqueue+0xa3/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1299
usb_hcd_submit_urb+0x268/0x2150 drivers/usb/core/hcd.c:1542
usb_submit_urb+0x827/0x19b0 drivers/usb/core/urb.c:586
usb_start_wait_urb+0x10e/0x580 drivers/usb/core/message.c:62
usb_internal_control_msg drivers/usb/core/message.c:117 [inline]
usb_control_msg+0x328/0x4b0 drivers/usb/core/message.c:167
hub_set_address drivers/usb/core/hub.c:4788 [inline]
hub_port_init+0xe46/0x3810 drivers/usb/core/hub.c:5093
usb_reset_and_verify_device+0x539/0x1110 drivers/usb/core/hub.c:6233
usb_reset_device+0x540/0xaa0 drivers/usb/core/hub.c:6428
rt2x00usb_probe+0x52/0x890 drivers/net/wireless/ralink/rt2x00/rt2x00usb.c:805
page last free pid 7559 tgid 7559 ts 213593450026 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962
__pagetable_free include/linux/mm.h:3804 [inline]
pagetable_free include/linux/mm.h:3828 [inline]
pagetable_dtor_free include/linux/mm.h:3927 [inline]
__tlb_remove_table include/asm-generic/tlb.h:221 [inline]
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
Memory state around the buggy address:
ffff88811ce07e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811ce07f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88811ce07f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88811ce08000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811ce08080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 48 83 fd 10 cmp $0x10,%rbp
6: 0f 86 46 01 00 00 jbe 0x152
c: 48 89 ef mov %rbp,%rdi
f: e8 04 e4 59 ff call 0xff59e418
14: 48 c1 e8 0c shr $0xc,%rax
18: 48 89 c7 mov %rax,%rdi
1b: 48 c1 e7 06 shl $0x6,%rdi
1f: 48 03 3d f2 d1 2e 07 add 0x72ed1f2(%rip),%rdi # 0x72ed218
26: 48 8b 5f 08 mov 0x8(%rdi),%rbx
* 2a: 48 89 d8 mov %rbx,%rax <-- trapping instruction
2d: 83 e0 01 and $0x1,%eax
30: 48 83 e8 01 sub $0x1,%rax
34: 48 09 c3 or %rax,%rbx
37: 48 21 fb and %rdi,%rbx
3a: 80 7b 33 f5 cmpb $0xf5,0x33(%rbx)
3e: 0f .byte 0xf
3f: 95 xchg %eax,%ebp