==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88810c7bffff by task kworker/1:5/13014
CPU: 1 UID: 0 PID: 13014 Comm: kworker/1:5 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: usb_hub_wq hub_event
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/0x470 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/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x208/0x940 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:stack_trace_consume_entry+0xf/0x170 kernel/stacktrace.c:83
Code: ff ff eb c7 e8 a2 db eb 05 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 55 <53> 48 89 fb 48 83 c7 10 48 89 fa 48 c1 ea 03 48 83 ec 08 0f b6 04
RSP: 0018:ffffc9001540e368 EFLAGS: 00000282
RAX: dffffc0000000000 RBX: ffffc9001540e378 RCX: ffffc9001540e2cc
RDX: 1ffff92002a81c78 RSI: ffffffff8537f3fe RDI: ffffc9001540e438
RBP: ffffc9001540e408 R08: 0000000000000001 R09: 000000003ef92a89
R10: 0000000000000002 R11: 0000000000028578 R12: ffffffff816b1980
R13: ffffc9001540e438 R14: 0000000000000000 R15: ffff8881126d9d40
arch_stack_walk+0x88/0x100 arch/x86/kernel/stacktrace.c:27
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
unpoison_slab_object mm/kasan/common.c:339 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:365
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x26e/0x740 mm/slub.c:5270
skb_clone+0x190/0x3f0 net/core/skbuff.c:2087
do_one_broadcast net/netlink/af_netlink.c:1455 [inline]
netlink_broadcast_filtered+0xb76/0xf90 net/netlink/af_netlink.c:1533
netlink_broadcast+0x39/0x50 net/netlink/af_netlink.c:1557
uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline]
kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline]
kobject_uevent_env+0xcbc/0x1920 lib/kobject_uevent.c:608
device_add+0x1103/0x1980 drivers/base/core.c:3670
i2c_register_adapter+0x39e/0x13b0 drivers/i2c/i2c-core-base.c:1573
i2c_add_adapter drivers/i2c/i2c-core-base.c:1673 [inline]
i2c_add_adapter+0x10a/0x1a0 drivers/i2c/i2c-core-base.c:1653
devm_i2c_add_adapter+0x1b/0x90 drivers/i2c/i2c-core-base.c:1845
mcp2221_probe+0x5f1/0xc50 drivers/hid/hid-mcp2221.c:1289
__hid_device_probe drivers/hid/hid-core.c:2775 [inline]
hid_device_probe+0x5ba/0x8d0 drivers/hid/hid-core.c:2812
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
hid_add_device+0x31b/0x5c0 drivers/hid/hid-core.c:2951
usbhid_probe+0xd5d/0x1410 drivers/hid/usbhid/hid-core.c:1435
usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_set_configuration+0x1187/0x1e50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_new_device+0xd07/0x1a90 drivers/usb/core/hub.c:2695
hub_port_connect drivers/usb/core/hub.c:5567 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x31bf/0x5420 drivers/usb/core/hub.c:5953
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
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:397 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:414
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
usb_hub_create_port_device+0x75/0xde0 drivers/usb/core/port.c:742
hub_configure drivers/usb/core/hub.c:1734 [inline]
hub_probe+0x203b/0x36c0 drivers/usb/core/hub.c:2001
usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_set_configuration+0x1187/0x1e50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_new_device+0xd07/0x1a90 drivers/usb/core/hub.c:2695
register_root_hub+0x299/0x750 drivers/usb/core/hcd.c:994
usb_add_hcd+0xaf2/0x1780 drivers/usb/core/hcd.c:2993
dummy_hcd_probe+0x15c/0x380 drivers/usb/gadget/udc/dummy_hcd.c:2694
platform_probe+0x106/0x1d0 drivers/base/platform.c:1446
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
platform_device_add+0x316/0x830 drivers/base/platform.c:757
dummy_hcd_init+0x323/0xeb0 drivers/usb/gadget/udc/dummy_hcd.c:2845
do_one_initcall+0x123/0x680 init/main.c:1378
do_initcall_level init/main.c:1440 [inline]
do_initcalls init/main.c:1456 [inline]
do_basic_setup init/main.c:1475 [inline]
kernel_init_freeable+0x5c8/0x920 init/main.c:1688
kernel_init+0x1c/0x2b0 init/main.c:1578
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:556
insert_work+0x36/0x230 kernel/workqueue.c:2180
__queue_work+0x94f/0x10e0 kernel/workqueue.c:2335
queue_work_on+0x15f/0x1f0 kernel/workqueue.c:2386
queue_work include/linux/workqueue.h:669 [inline]
rpm_suspend+0xe8f/0x11b0 drivers/base/power/runtime.c:688
rpm_idle+0x5dc/0x760 drivers/base/power/runtime.c:562
__pm_runtime_idle+0xba/0x1a0 drivers/base/power/runtime.c:1129
pm_runtime_put include/linux/pm_runtime.h:563 [inline]
hub_configure drivers/usb/core/hub.c:1745 [inline]
hub_probe+0x212a/0x36c0 drivers/usb/core/hub.c:2001
usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_set_configuration+0x1187/0x1e50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_new_device+0xd07/0x1a90 drivers/usb/core/hub.c:2695
register_root_hub+0x299/0x750 drivers/usb/core/hcd.c:994
usb_add_hcd+0xaf2/0x1780 drivers/usb/core/hcd.c:2993
dummy_hcd_probe+0x15c/0x380 drivers/usb/gadget/udc/dummy_hcd.c:2694
platform_probe+0x106/0x1d0 drivers/base/platform.c:1446
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
platform_device_add+0x316/0x830 drivers/base/platform.c:757
dummy_hcd_init+0x323/0xeb0 drivers/usb/gadget/udc/dummy_hcd.c:2845
do_one_initcall+0x123/0x680 init/main.c:1378
do_initcall_level init/main.c:1440 [inline]
do_initcalls init/main.c:1456 [inline]
do_basic_setup init/main.c:1475 [inline]
kernel_init_freeable+0x5c8/0x920 init/main.c:1688
kernel_init+0x1c/0x2b0 init/main.c:1578
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the object at ffff88810c7bf000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 2743 bytes to the right of
allocated 1352-byte region [ffff88810c7bf000, ffff88810c7bf548)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c7b8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff888100042000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 0200000000000040 ffff888100042000 dead000000000122 0000000000000000
head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 0200000000000003 ffffea000431ee01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 11372417083, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__kmalloc_cache_noprof+0x3d6/0x7e0 mm/slub.c:5771
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
usb_create_ep_devs+0x4d/0x2b0 drivers/usb/core/endpoint.c:157
create_intf_ep_devs.isra.0+0x161/0x200 drivers/usb/core/message.c:1252
usb_set_configuration+0x11a7/0x1e50 drivers/usb/core/message.c:2216
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 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:
ffff88810c7bfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810c7bff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810c7bff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88810c7c0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88810c7c0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: eb c7 jmp 0xffffffc9
2: e8 a2 db eb 05 call 0x5ebdba9
7: 66 90 xchg %ax,%ax
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: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: f3 0f 1e fa endbr64
1d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
24: fc ff df
27: 55 push %rbp
* 28: 53 push %rbx <-- trapping instruction
29: 48 89 fb mov %rdi,%rbx
2c: 48 83 c7 10 add $0x10,%rdi
30: 48 89 fa mov %rdi,%rdx
33: 48 c1 ea 03 shr $0x3,%rdx
37: 48 83 ec 08 sub $0x8,%rsp
3b: 0f .byte 0xf
3c: b6 04 mov $0x4,%dh