==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888151523fff by task kworker/0:7/6377
CPU: 0 UID: 0 PID: 6377 Comm: kworker/0:7 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: usb_hub_wq hub_event
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/0x1d0 mm/kasan/report.c:595
mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2161
hid_irq_in+0x55d/0x710 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+0xda1/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x470/0xa00 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x17d/0x2c0 kernel/time/hrtimer.c:2011
handle_softirqs+0x1dd/0x9e0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x160/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__debug_check_no_obj_freed lib/debugobjects.c:1107 [inline]
RIP: 0010:debug_check_no_obj_freed+0x105/0x630 lib/debugobjects.c:1156
Code: 00 00 49 89 ff 48 25 00 f0 ff ff 48 8d 96 ff 0f 00 00 48 c7 84 24 98 00 00 00 00 00 00 00 48 c7 84 24 a0 00 00 00 00 00 00 00 <48> 29 c2 48 c7 84 24 a8 00 00 00 00 00 00 00 48 c1 ea 0c 48 c7 84
RSP: 0018:ffffc900140f67a0 EFLAGS: 00000286
RAX: ffff888140c83000 RBX: 1ffff9200281ed00 RCX: ffff88813bf4e5a0
RDX: ffff888140c84fff RSI: ffff888140c84000 RDI: ffff888140c83000
RBP: ffffc900140f68c8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000140c83000 R14: ffffea00050320c0 R15: ffff888140c83000
__free_pages_prepare mm/page_alloc.c:1404 [inline]
__free_frozen_pages+0x3ba/0xf60 mm/page_alloc.c:2938
selinux_genfs_get_sid security/selinux/hooks.c:1364 [inline]
inode_doinit_with_dentry+0x99d/0x1320 security/selinux/hooks.c:1563
selinux_d_instantiate+0x26/0x40 security/selinux/hooks.c:6658
security_d_instantiate+0x62/0xc0 security/security.c:3704
d_make_persistent+0x64/0x180 fs/dcache.c:2867
debugfs_create_dir+0x19b/0x440 fs/debugfs/inode.c:591
i2c_register_adapter+0x3ff/0x1210 drivers/i2c/i2c-core-base.c:1579
i2c_add_adapter drivers/i2c/i2c-core-base.c:1672 [inline]
i2c_add_adapter+0x10a/0x1a0 drivers/i2c/i2c-core-base.c:1652
devm_i2c_add_adapter+0x1b/0x90 drivers/i2c/i2c-core-base.c:1844
mcp2221_probe.cold+0x60e/0xf16 drivers/hid/hid-mcp2221.c:1306
__hid_device_probe drivers/hid/hid-core.c:2822 [inline]
hid_device_probe+0x50e/0x800 drivers/hid/hid-core.c:2859
call_driver_probe drivers/base/dd.c:631 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:709
__driver_probe_device+0x22e/0x480 drivers/base/dd.c:871
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:901
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:1029
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1101
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1156
bus_probe_device+0x64/0x160 drivers/base/bus.c:613
device_add+0x1210/0x1950 drivers/base/core.c:3706
hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:3003
usbhid_probe+0xc3c/0x1230 drivers/hid/usbhid/hid-core.c:1449
usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:631 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:709
__driver_probe_device+0x22e/0x480 drivers/base/dd.c:871
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:901
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:1029
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1101
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1156
bus_probe_device+0x64/0x160 drivers/base/bus.c:613
device_add+0x1210/0x1950 drivers/base/core.c:3706
usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268
usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:631 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:709
__driver_probe_device+0x22e/0x480 drivers/base/dd.c:871
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:901
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:1029
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1101
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1156
bus_probe_device+0x64/0x160 drivers/base/bus.c:613
device_add+0x1210/0x1950 drivers/base/core.c:3706
usb_new_device.cold+0x685/0x115c 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+0x314d/0x4af0 drivers/usb/core/hub.c:5953
process_one_work+0xa0e/0x1980 kernel/workqueue.c:3314
process_scheduled_works kernel/workqueue.c:3397 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3478
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x69a/0xc80 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 24740:
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:950 [inline]
dummy_urb_enqueue+0xa3/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1277
usb_hcd_submit_urb+0x268/0x2150 drivers/usb/core/hcd.c:1542
usb_submit_urb+0x8aa/0x1910 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
rtl8xxxu_read32+0xff/0x1c0 drivers/net/wireless/realtek/rtl8xxxu/core.c:667
rtl8xxxu_read_efuse8+0xb8/0x160 drivers/net/wireless/realtek/rtl8xxxu/core.c:1765
rtl8xxxu_read_efuse+0x314/0x790 drivers/net/wireless/realtek/rtl8xxxu/core.c:1834
rtl8xxxu_probe+0x126d/0x1ae0 drivers/net/wireless/realtek/rtl8xxxu/core.c:7788
usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:631 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:709
__driver_probe_device+0x22e/0x480 drivers/base/dd.c:871
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:901
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:1029
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1101
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1156
bus_probe_device+0x64/0x160 drivers/base/bus.c:613
device_add+0x1210/0x1950 drivers/base/core.c:3706
usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268
usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:631 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:709
__driver_probe_device+0x22e/0x480 drivers/base/dd.c:871
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:901
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:1029
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1101
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1156
bus_probe_device+0x64/0x160 drivers/base/bus.c:613
device_add+0x1210/0x1950 drivers/base/core.c:3706
usb_new_device.cold+0x685/0x115c 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+0x314d/0x4af0 drivers/usb/core/hub.c:5953
process_one_work+0xa0e/0x1980 kernel/workqueue.c:3314
process_scheduled_works kernel/workqueue.c:3397 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3478
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x69a/0xc80 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 31649:
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:2689 [inline]
slab_free mm/slub.c:6251 [inline]
kfree+0x204/0x650 mm/slub.c:6566
dummy_timer+0xd35/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:1999
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x470/0xa00 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x17d/0x2c0 kernel/time/hrtimer.c:2011
handle_softirqs+0x1dd/0x9e0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x160/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
The buggy address belongs to the object at ffff888151523f00
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 [ffff888151523f00, ffff888151523f80)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x151523
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
raw: 0000000000000000 0000000800100010 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 24740, tgid 24740 (kworker/0:2), ts 3386915373087, free_ts 3386914981683
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1853
prep_new_page mm/page_alloc.c:1861 [inline]
get_page_from_freelist+0x20a5/0x3850 mm/page_alloc.c:3941
__alloc_frozen_pages_noprof+0x273/0x28a0 mm/page_alloc.c:5221
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab mm/slub.c:3467 [inline]
new_slab+0xa6/0x6b0 mm/slub.c:3525
refill_objects+0x277/0x420 mm/slub.c:7272
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x375/0x650 mm/slub.c:4652
alloc_from_pcs mm/slub.c:4750 [inline]
slab_alloc_node mm/slub.c:4884 [inline]
__kmalloc_cache_noprof+0x52c/0x6b0 mm/slub.c:5415
kmalloc_noprof include/linux/slab.h:950 [inline]
dummy_urb_enqueue+0xa3/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1277
usb_hcd_submit_urb+0x268/0x2150 drivers/usb/core/hcd.c:1542
usb_submit_urb+0x8aa/0x1910 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
rtl8xxxu_read32+0xff/0x1c0 drivers/net/wireless/realtek/rtl8xxxu/core.c:667
rtl8xxxu_read_efuse8+0xb8/0x160 drivers/net/wireless/realtek/rtl8xxxu/core.c:1765
rtl8xxxu_read_efuse+0x314/0x790 drivers/net/wireless/realtek/rtl8xxxu/core.c:1834
rtl8xxxu_probe+0x126d/0x1ae0 drivers/net/wireless/realtek/rtl8xxxu/core.c:7788
page last free pid 31649 tgid 31649 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1397 [inline]
__free_frozen_pages+0x6d8/0xf60 mm/page_alloc.c:2938
vfree mm/vmalloc.c:3472 [inline]
vfree+0x15f/0x8d0 mm/vmalloc.c:3436
kcov_put kernel/kcov.c:442 [inline]
kcov_put kernel/kcov.c:438 [inline]
kcov_close+0x34/0x60 kernel/kcov.c:543
__fput+0x3ff/0xb50 fs/file_table.c:510
task_work_run+0x150/0x240 kernel/task_work.c:233
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x951/0x2af0 kernel/exit.c:976
do_group_exit+0xd5/0x2a0 kernel/exit.c:1119
get_signal+0x20ff/0x2210 kernel/signal.c:3037
arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:64 [inline]
exit_to_user_mode_loop+0x83/0x480 kernel/entry/common.c:98
__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:318 [inline]
do_syscall_64+0x682/0x7f0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888151523e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888151523f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888151523f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888151524000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888151524080: 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: 49 89 ff mov %rdi,%r15
5: 48 25 00 f0 ff ff and $0xfffffffffffff000,%rax
b: 48 8d 96 ff 0f 00 00 lea 0xfff(%rsi),%rdx
12: 48 c7 84 24 98 00 00 movq $0x0,0x98(%rsp)
19: 00 00 00 00 00
1e: 48 c7 84 24 a0 00 00 movq $0x0,0xa0(%rsp)
25: 00 00 00 00 00
* 2a: 48 29 c2 sub %rax,%rdx <-- trapping instruction
2d: 48 c7 84 24 a8 00 00 movq $0x0,0xa8(%rsp)
34: 00 00 00 00 00
39: 48 c1 ea 0c shr $0xc,%rdx
3d: 48 rex.W
3e: c7 .byte 0xc7
3f: 84 .byte 0x84