==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852
Read of size 1 at addr ffff888109f33fff by task rcu_preempt/15
CPU: 1 UID: 0 PID: 15 Comm: rcu_preempt Not tainted 6.15.0-rc6-syzkaller-00105-gab6dc9a6c721 #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/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:408 [inline]
print_report+0xc3/0x670 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852
__hid_input_report.constprop.0+0x311/0x450 drivers/hid/hid-core.c:2117
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38a/0x6e0 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1734
dummy_timer+0x180e/0x3a20 drivers/usb/gadget/udc/dummy_hcd.c:1994
__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+0x205/0x8d0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 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+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 16 cd 32 fa 48 89 df e8 be 20 33 fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 35 dd 26 fa 65 8b 05 ae 26 3f 05 85 c0 74 16 5b
RSP: 0018:ffffc900000ff9e8 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffffffff937dfac0 RCX: ffffffff8184222f
RDX: 0000000000000000 RSI: ffffffff88ad8ea3 RDI: ffffffff876851e0
RBP: 0000000000000206 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8a78c697 R11: 0000000000000000 R12: 0000000000000001
R13: ffffc900000ffbe0 R14: ffffffff874ae2c0 R15: 1ffff9200001ff44
debug_object_assert_init+0x1c5/0x2f0 lib/debugobjects.c:1009
debug_timer_assert_init kernel/time/timer.c:845 [inline]
debug_assert_init kernel/time/timer.c:890 [inline]
__try_to_del_timer_sync+0x7f/0x170 kernel/time/timer.c:1499
__timer_delete_sync+0xf4/0x1b0 kernel/time/timer.c:1662
schedule_timeout+0x12b/0x290 kernel/time/sleep_timeout.c:100
rcu_gp_fqs_loop+0x1ea/0xb00 kernel/rcu/tree.c:2046
rcu_gp_kthread+0x270/0x380 kernel/rcu/tree.c:2248
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 5239:
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:377 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4327 [inline]
__kmalloc_node_track_caller_noprof+0x212/0x4c0 mm/slub.c:4346
__kmemdup_nul mm/util.c:63 [inline]
kstrdup+0x53/0x100 mm/util.c:83
snd_info_create_entry+0x6f/0x410 sound/core/info.c:669
snd_info_create_card_entry sound/core/info.c:724 [inline]
snd_card_rw_proc_new sound/core/info.c:855 [inline]
snd_card_ro_proc_new include/sound/info.h:210 [inline]
snd_info_card_create+0x19a/0x2b0 sound/core/info.c:493
snd_card_init+0x927/0x1290 sound/core/init.c:356
snd_card_new+0x9d/0x120 sound/core/init.c:188
pcmidi_snd_initialise drivers/hid/hid-prodikeys.c:615 [inline]
pk_probe+0x471/0x1130 drivers/hid/hid-prodikeys.c:823
__hid_device_probe drivers/hid/hid-core.c:2717 [inline]
hid_device_probe+0x354/0x710 drivers/hid/hid-core.c:2754
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x156/0x1e0 drivers/base/bus.c:462
__device_attach+0x1e4/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537
device_add+0x1148/0x1a70 drivers/base/core.c:3692
hid_add_device+0x373/0xa60 drivers/hid/hid-core.c:2900
usbhid_probe+0xd38/0x13f0 drivers/hid/usbhid/hid-core.c:1432
usb_probe_interface+0x300/0x9c0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x156/0x1e0 drivers/base/bus.c:462
__device_attach+0x1e4/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537
device_add+0x1148/0x1a70 drivers/base/core.c:3692
usb_set_configuration+0x1187/0x1e20 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x156/0x1e0 drivers/base/bus.c:462
__device_attach+0x1e4/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537
device_add+0x1148/0x1a70 drivers/base/core.c:3692
usb_new_device+0xd07/0x1a20 drivers/usb/core/hub.c:2663
hub_port_connect drivers/usb/core/hub.c:5535 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5675 [inline]
port_event drivers/usb/core/hub.c:5835 [inline]
hub_event+0x2f85/0x5030 drivers/usb/core/hub.c:5917
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888109f33fe0
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 28 bytes to the right of
allocated 3-byte region [ffff888109f33fe0, ffff888109f33fe3)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109f33
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff888100041500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000800080 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 0x52c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6591, tgid 6590 (syz.0.369), ts 270433389966, free_ts 270337450764
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0xfec/0x2d90 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x25c/0x2160 mm/page_alloc.c:4970
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab mm/slub.c:2618 [inline]
new_slab+0x244/0x340 mm/slub.c:2672
___slab_alloc+0xda5/0x1940 mm/slub.c:3858
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__kmalloc_cache_noprof+0x209/0x3c0 mm/slub.c:4353
kmalloc_noprof include/linux/slab.h:905 [inline]
usb_control_msg+0xbc/0x4a0 drivers/usb/core/message.c:144
get_port_status drivers/usb/core/hub.c:605 [inline]
hub_ext_port_status+0x14e/0x670 drivers/usb/core/hub.c:622
usb_hub_port_status drivers/usb/core/hub.c:672 [inline]
usb_port_resume+0xa5d/0x1860 drivers/usb/core/hub.c:3806
usb_generic_driver_resume+0x41/0xa0 drivers/usb/core/generic.c:317
usb_resume_device drivers/usb/core/driver.c:1304 [inline]
usb_resume_both+0x5e6/0x800 drivers/usb/core/driver.c:1528
__rpm_callback+0xc5/0x610 drivers/base/power/runtime.c:394
rpm_callback+0x1b7/0x200 drivers/base/power/runtime.c:448
rpm_resume+0xd0a/0x1310 drivers/base/power/runtime.c:922
page last free pid 5212 tgid 5212 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0x66c/0xe70 mm/page_alloc.c:2725
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 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]
__do_kmalloc_node mm/slub.c:4326 [inline]
__kvmalloc_node_noprof+0x226/0x5c0 mm/slub.c:5012
seq_buf_alloc fs/seq_file.c:38 [inline]
seq_read_iter+0x826/0x12c0 fs/seq_file.c:210
kernfs_fop_read_iter+0x40f/0x5a0 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:489 [inline]
vfs_read+0x8c8/0xc70 fs/read_write.c:570
ksys_read+0x12a/0x240 fs/read_write.c:713
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888109f33e80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff888109f33f00: fa fc fc fc fa fc fc fc 06 fc fc fc 07 fc fc fc
>ffff888109f33f80: fa fc fc fc fa fc fc fc fa fc fc fc 03 fc fc fc
^
ffff888109f34000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888109f34080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 16 cd 32 fa call 0xfa32cd29
13: 48 89 df mov %rbx,%rdi
16: e8 be 20 33 fa call 0xfa3320d9
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 35 dd 26 fa call 0xfa26dd69
34: 65 8b 05 ae 26 3f 05 mov %gs:0x53f26ae(%rip),%eax # 0x53f26e9
3b: 85 c0 test %eax,%eax
3d: 74 16 je 0x55
3f: 5b pop %rbx