==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88811c627fff by task kworker/0:5/9531
CPU: 0 UID: 0 PID: 9531 Comm: kworker/0:5 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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+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:rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline]
RIP: 0010:rcu_is_watching+0x41/0xc0 kernel/rcu/tree.c:751
Code: cc 8c 89 c5 83 f8 07 0f 87 82 00 00 00 48 8d 3c ed e0 cb f6 88 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 <75> 5c 48 03 1c ed e0 cb f6 88 48 b8 00 00 00 00 00 fc ff df 48 89
RSP: 0018:ffffc900167f6578 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffffffff8ccc9628 RCX: 0000000000000002
RDX: 1ffffffff11ed97c RSI: ffffffff878e9720 RDI: ffffffff88f6cbe0
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000200 R11: 0000000000044cf9 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
trace_lock_acquire include/trace/events/lock.h:24 [inline]
lock_acquire+0x2c4/0x330 kernel/locking/lockdep.c:5831
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
save_stack+0x162/0x1e0 mm/page_owner.c:165
__reset_page_owner+0x84/0x190 mm/page_owner.c:320
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
selinux_genfs_get_sid security/selinux/hooks.c:1359 [inline]
inode_doinit_with_dentry+0x9a6/0x1330 security/selinux/hooks.c:1557
selinux_d_instantiate+0x26/0x40 security/selinux/hooks.c:6545
security_d_instantiate+0x62/0xc0 security/security.c:3601
d_make_persistent+0x6a/0x190 fs/dcache.c:2790
debugfs_create_dir+0x19b/0x440 fs/debugfs/inode.c:591
i2c_register_adapter+0x3ff/0x1240 drivers/i2c/i2c-core-base.c:1580
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.cold+0x5de/0xab3 drivers/hid/hid-mcp2221.c:1289
__hid_device_probe drivers/hid/hid-core.c:2775 [inline]
hid_device_probe+0x50e/0x800 drivers/hid/hid-core.c:2812
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x400 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x160 drivers/base/bus.c:574
device_add+0x11d9/0x1950 drivers/base/core.c:3689
hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:2951
usbhid_probe+0xd57/0x1350 drivers/hid/usbhid/hid-core.c:1450
usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x400 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x160 drivers/base/bus.c:574
device_add+0x11d9/0x1950 drivers/base/core.c:3689
usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2210
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:581 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x400 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x340 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1031
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x160 drivers/base/bus.c:574
device_add+0x11d9/0x1950 drivers/base/core.c:3689
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+0x9c2/0x1840 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x5da/0xe40 kernel/workqueue.c:3421
kthread+0x3b3/0x730 kernel/kthread.c:463
ret_from_fork+0x6c3/0xa20 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 physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888100000000 pfn:0x11c627
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 dead000000000100 dead000000000122 0000000000000000
raw: ffff888100000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2cc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), pid 9531, tgid 9531 (kworker/0:5), ts 1263668051762, free_ts 1264269841080
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_noprof mm/page_alloc.c:5274 [inline]
alloc_pages_bulk_noprof+0x73f/0x12c0 mm/page_alloc.c:5194
alloc_pages_bulk_mempolicy_noprof+0x250/0x1270 mm/mempolicy.c:2794
vm_area_alloc_pages mm/vmalloc.c:3693 [inline]
__vmalloc_area_node mm/vmalloc.c:3863 [inline]
__vmalloc_node_range_noprof+0x54b/0x1530 mm/vmalloc.c:4051
__vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4111
__vmalloc_noprof+0xa3/0x120 mm/vmalloc.c:4127
__vmalloc_array_noprof mm/util.c:633 [inline]
vmalloc_array_noprof+0x43/0x70 mm/util.c:644
dvb_dmxdev_init+0xbd/0x4c0 drivers/media/dvb-core/dmxdev.c:1417
dvb_usb_adapter_dvb_init+0x658/0x860 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:192
dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:86 [inline]
dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:186 [inline]
dvb_usb_device_init.cold+0xbdb/0x14c3 drivers/media/usb/dvb-usb/dvb-usb-init.c:310
gp8psk_usb_probe+0x4d/0x80 drivers/media/usb/dvb-usb/gp8psk.c:304
usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x400 drivers/base/dd.c:801
page last free pid 9531 tgid 9531 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
dvb_dmxdev_release+0x20e/0x790 drivers/media/dvb-core/dmxdev.c:1473
dvb_usb_adapter_dvb_exit+0x9d/0x240 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:224
dvb_usb_adapter_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:128 [inline]
dvb_usb_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:143 [inline]
dvb_usb_device_exit+0x24d/0x520 drivers/media/usb/dvb-usb/dvb-usb-init.c:338
usb_unbind_interface+0x1dd/0x9e0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:571 [inline]
device_remove+0x12a/0x180 drivers/base/dd.c:563
__device_release_driver drivers/base/dd.c:1282 [inline]
device_release_driver_internal+0x42e/0x600 drivers/base/dd.c:1305
bus_remove_device+0x22f/0x440 drivers/base/bus.c:616
device_del+0x376/0x9b0 drivers/base/core.c:3878
usb_disable_device+0x367/0x810 drivers/usb/core/message.c:1418
usb_disconnect+0x2e2/0x9a0 drivers/usb/core/hub.c:2345
hub_port_connect drivers/usb/core/hub.c:5407 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x1d0c/0x4af0 drivers/usb/core/hub.c:5953
process_one_work+0x9c2/0x1840 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x5da/0xe40 kernel/workqueue.c:3421
Memory state around the buggy address:
ffff88811c627e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811c627f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811c627f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811c628000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811c628080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: cc int3
1: 8c 89 c5 83 f8 07 mov %cs,0x7f883c5(%rcx)
7: 0f 87 82 00 00 00 ja 0x8f
d: 48 8d 3c ed e0 cb f6 lea -0x77093420(,%rbp,8),%rdi
14: 88
15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1c: fc ff df
1f: 48 89 fa mov %rdi,%rdx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
* 2a: 75 5c jne 0x88 <-- trapping instruction
2c: 48 03 1c ed e0 cb f6 add -0x77093420(,%rbp,8),%rbx
33: 88
34: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
3b: fc ff df
3e: 48 rex.W
3f: 89 .byte 0x89