==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888057333fff by task kworker/0:9/6779
CPU: 0 UID: 0 PID: 6779 Comm: kworker/0:9 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
__hid_input_report drivers/hid/hid-core.c:2139 [inline]
hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2166
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:lock_acquire+0x16c/0x340 kernel/locking/lockdep.c:5872
Code: 00 00 00 00 9c 8f 44 24 30 f7 44 24 30 00 02 00 00 0f 85 cd 00 00 00 f7 44 24 08 00 02 00 00 74 01 fb 65 48 8b 05 14 17 e0 10 <48> 3b 44 24 58 0f 85 e5 00 00 00 48 83 c4 60 5b 41 5c 41 5d 41 5e
RSP: 0000:ffffc900045ae218 EFLAGS: 00000206
RAX: ae7cc6e8a63a4f00 RBX: 0000000000000000 RCX: ae7cc6e8a63a4f00
RDX: 0000000000000009 RSI: ffffffff8d977b3e RDI: ffffffff8bc07ae0
RBP: ffffffff821a232d R08: ffffc900045ae098 R09: 0000000000000020
R10: dffffc0000000000 R11: ffffffff819ee940 R12: 0000000000000000
R13: ffffffff8e062320 R14: 0000000000000001 R15: 0000000000000246
fs_reclaim_acquire+0x99/0x100 mm/page_alloc.c:4318
might_alloc include/linux/sched/mm.h:317 [inline]
slab_pre_alloc_hook mm/slub.c:4904 [inline]
slab_alloc_node mm/slub.c:5239 [inline]
kmem_cache_alloc_node_noprof+0x48/0x720 mm/slub.c:5315
__alloc_skb+0x255/0x430 net/core/skbuff.c:679
alloc_skb include/linux/skbuff.h:1383 [inline]
alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:289
uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline]
kobject_uevent_net_broadcast+0x2fa/0x560 lib/kobject_uevent.c:410
kobject_uevent_env+0x55c/0x9f0 lib/kobject_uevent.c:608
device_add+0x557/0xb80 drivers/base/core.c:3670
cdev_device_add+0x1d6/0x390 fs/char_dev.c:556
i2cdev_attach_adapter+0x2ed/0x510 drivers/i2c/i2c-dev.c:691
notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85
blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380
bus_notify+0x143/0x180 drivers/base/bus.c:1038
device_add+0x54d/0xb80 drivers/base/core.c:3669
i2c_register_adapter+0x4ed/0x1150 drivers/i2c/i2c-core-base.c:1573
devm_i2c_add_adapter+0x1b/0x80 drivers/i2c/i2c-core-base.c:1845
mcp2221_probe+0x404/0x880 drivers/hid/hid-mcp2221.c:1289
__hid_device_probe drivers/hid/hid-core.c:2775 [inline]
hid_device_probe+0x416/0x7a0 drivers/hid/hid-core.c:2812
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0xad0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x320 drivers/base/dd.c:801
driver_probe_device+0x4f/0x240 drivers/base/dd.c:831
__device_attach_driver+0x279/0x430 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500
__device_attach+0x2b8/0x430 drivers/base/dd.c:1031
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x12a/0x220 drivers/base/bus.c:574
device_add+0x7b6/0xb80 drivers/base/core.c:3689
hid_add_device+0x272/0x3e0 drivers/hid/hid-core.c:2951
usbhid_probe+0xe13/0x12c0 drivers/hid/usbhid/hid-core.c:1435
usb_probe_interface+0x668/0xc90 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0xad0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x320 drivers/base/dd.c:801
driver_probe_device+0x4f/0x240 drivers/base/dd.c:831
__device_attach_driver+0x279/0x430 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500
__device_attach+0x2b8/0x430 drivers/base/dd.c:1031
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x12a/0x220 drivers/base/bus.c:574
device_add+0x7b6/0xb80 drivers/base/core.c:3689
usb_set_configuration+0x1a87/0x2110 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c4/0x3c0 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0xad0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x320 drivers/base/dd.c:801
driver_probe_device+0x4f/0x240 drivers/base/dd.c:831
__device_attach_driver+0x279/0x430 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500
__device_attach+0x2b8/0x430 drivers/base/dd.c:1031
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086
bus_probe_device+0x12a/0x220 drivers/base/bus.c:574
device_add+0x7b6/0xb80 drivers/base/core.c:3689
usb_new_device+0xa39/0x1720 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+0x29b1/0x4ef0 drivers/usb/core/hub.c:5953
process_one_work+0x93a/0x15a0 kernel/workqueue.c:3261
process_scheduled_works kernel/workqueue.c:3344 [inline]
worker_thread+0x9b0/0xee0 kernel/workqueue.c:3425
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Allocated by task 5827:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5657 [inline]
__kmalloc_noprof+0x41d/0x800 mm/slub.c:5669
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
fib6_info_alloc+0x30/0xf0 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x142/0x860 net/ipv6/route.c:3809
ip6_route_add+0x49/0x1b0 net/ipv6/route.c:3938
addrconf_prefix_route net/ipv6/addrconf.c:2488 [inline]
fixup_permanent_addr net/ipv6/addrconf.c:3598 [inline]
addrconf_permanent_addr+0x67f/0x9d0 net/ipv6/addrconf.c:3622
addrconf_notify+0x864/0x1050 net/ipv6/addrconf.c:3694
notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2269 [inline]
call_netdevice_notifiers net/core/dev.c:2283 [inline]
__dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1
netif_change_flags+0xe8/0x1a0 net/core/dev.c:9803
do_setlink+0xc55/0x41c0 net/core/rtnetlink.c:3158
rtnl_changelink net/core/rtnetlink.c:3776 [inline]
__rtnl_newlink net/core/rtnetlink.c:3935 [inline]
rtnl_newlink+0x161c/0x1c90 net/core/rtnetlink.c:4072
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6958
netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2550
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec+0x18f/0x1d0 net/socket.c:728
__sock_sendmsg net/socket.c:743 [inline]
__sys_sendto+0x3ce/0x540 net/socket.c:2212
__do_sys_sendto net/socket.c:2219 [inline]
__se_sys_sendto net/socket.c:2215 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2215
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888057333c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 719 bytes to the right of
allocated 304-byte region [ffff888057333c00, ffff888057333d30)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57330
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe26c80 ffffea0000c28d00 dead000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fe26c80 ffffea0000c28d00 dead000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00015ccc01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 50, tgid 50 (kworker/u8:3), ts 95245773853, free_ts 30726168161
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab+0x86/0x3b0 mm/slub.c:3248
new_slab mm/slub.c:3302 [inline]
___slab_alloc+0xf2b/0x1960 mm/slub.c:4656
__slab_alloc+0x65/0x100 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__kmalloc_cache_noprof+0x41e/0x700 mm/slub.c:5771
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
mca_alloc net/ipv6/mcast.c:871 [inline]
__ipv6_dev_mc_inc+0x44f/0xa50 net/ipv6/mcast.c:961
addrconf_join_solict net/ipv6/addrconf.c:2246 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4099 [inline]
addrconf_dad_work+0x3d0/0x14b0 net/ipv6/addrconf.c:4227
process_one_work+0x93a/0x15a0 kernel/workqueue.c:3261
process_scheduled_works kernel/workqueue.c:3344 [inline]
worker_thread+0x9b0/0xee0 kernel/workqueue.c:3425
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
page last free pid 1 tgid 1 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943
__free_pages mm/page_alloc.c:5329 [inline]
free_contig_range+0x1bd/0x490 mm/page_alloc.c:7205
destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:983
debug_vm_pgtable+0x38f/0x3a0 mm/debug_vm_pgtable.c:1372
do_one_initcall+0x1fb/0x820 init/main.c:1378
do_initcall_level+0x104/0x190 init/main.c:1440
do_initcalls+0x59/0xa0 init/main.c:1456
kernel_init_freeable+0x334/0x4b0 init/main.c:1688
kernel_init+0x1d/0x1d0 init/main.c:1578
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Memory state around the buggy address:
ffff888057333e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888057333f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888057333f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888057334000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888057334080: 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: 00 00 add %al,(%rax)
4: 9c pushf
5: 8f 44 24 30 pop 0x30(%rsp)
9: f7 44 24 30 00 02 00 testl $0x200,0x30(%rsp)
10: 00
11: 0f 85 cd 00 00 00 jne 0xe4
17: f7 44 24 08 00 02 00 testl $0x200,0x8(%rsp)
1e: 00
1f: 74 01 je 0x22
21: fb sti
22: 65 48 8b 05 14 17 e0 mov %gs:0x10e01714(%rip),%rax # 0x10e0173e
29: 10
* 2a: 48 3b 44 24 58 cmp 0x58(%rsp),%rax <-- trapping instruction
2f: 0f 85 e5 00 00 00 jne 0x11a
35: 48 83 c4 60 add $0x60,%rsp
39: 5b pop %rbx
3a: 41 5c pop %r12
3c: 41 5d pop %r13
3e: 41 5e pop %r14