==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88805dabbfff by task kworker/1:5/5915
CPU: 1 UID: 0 PID: 5915 Comm: kworker/1:5 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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+0x52c/0xc60 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x286/0x870 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:1052 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:unwind_next_frame+0x32/0x2390 arch/x86/kernel/unwind_orc.c:470
Code: 56 41 55 41 54 53 48 81 ec 98 00 00 00 49 89 fe 48 bd 00 00 00 00 00 fc ff df 48 8d 5f 48 48 89 d8 48 c1 e8 03 48 89 44 24 30 <80> 3c 28 00 74 08 48 89 df e8 b0 db b3 00 48 89 5c 24 18 49 8b 5e
RSP: 0018:ffffc9000452e1f8 EFLAGS: 00000a02
RAX: 1ffff920008a5c62 RBX: ffffc9000452e310 RCX: cbb159a0d3e2f900
RDX: dffffc0000000000 RSI: ffffffff8707a7d1 RDI: ffffc9000452e2c8
RBP: dffffc0000000000 R08: ffffc9000452e390 R09: 0000000000000029
R10: ffffc9000452e318 R11: ffffffff81adc830 R12: ffff888026341e80
R13: 0000000000011a19 R14: ffffc9000452e2c8 R15: ffffc9000452e2c8
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
unpoison_slab_object mm/kasan/common.c:339 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4982 [inline]
slab_alloc_node mm/slub.c:5292 [inline]
kmem_cache_alloc_lru_noprof+0x36c/0x6e0 mm/slub.c:5311
alloc_inode+0x6a/0x1b0 fs/inode.c:346
new_inode+0x22/0x170 fs/inode.c:1175
debugfs_get_inode fs/debugfs/inode.c:72 [inline]
debugfs_create_dir+0xfb/0x420 fs/debugfs/inode.c:592
i2c_register_adapter+0x55a/0x1160 drivers/i2c/i2c-core-base.c:1580
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
bus_probe_device+0x185/0x260 drivers/base/bus.c:575
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
bus_probe_device+0x185/0x260 drivers/base/bus.c:575
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
bus_probe_device+0x185/0x260 drivers/base/bus.c:575
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+0x94a/0x15d0 kernel/workqueue.c:3267
process_scheduled_works kernel/workqueue.c:3350 [inline]
worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431
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:245
Allocated by task 8066:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414
kasan_kmalloc include/linux/kasan.h:262 [inline]
__do_kmalloc_node mm/slub.c:5654 [inline]
__kmalloc_noprof+0x41d/0x800 mm/slub.c:5666
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ops_init+0x7b/0x5c0 net/core/net_namespace.c:127
setup_net+0x110/0x330 net/core/net_namespace.c:446
copy_net_ns+0x34e/0x560 net/core/net_namespace.c:581
create_new_namespaces+0x3d3/0x710 kernel/nsproxy.c:111
copy_namespaces+0x438/0x4b0 kernel/nsproxy.c:176
copy_process+0x168f/0x3930 kernel/fork.c:2183
kernel_clone+0x21e/0x840 kernel/fork.c:2609
__do_sys_clone kernel/fork.c:2750 [inline]
__se_sys_clone kernel/fork.c:2734 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2734
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 8066:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2547 [inline]
slab_free mm/slub.c:6642 [inline]
kfree+0x19a/0x6d0 mm/slub.c:6849
ops_free_list net/core/net_namespace.c:215 [inline]
ops_undo_list+0x856/0x990 net/core/net_namespace.c:256
setup_net+0x2e8/0x330 net/core/net_namespace.c:462
copy_net_ns+0x34e/0x560 net/core/net_namespace.c:581
create_new_namespaces+0x3d3/0x710 kernel/nsproxy.c:111
copy_namespaces+0x438/0x4b0 kernel/nsproxy.c:176
copy_process+0x168f/0x3930 kernel/fork.c:2183
kernel_clone+0x21e/0x840 kernel/fork.c:2609
__do_sys_clone kernel/fork.c:2750 [inline]
__se_sys_clone kernel/fork.c:2734 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2734
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88805dabbc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 511 bytes to the right of
allocated 512-byte region [ffff88805dabbc00, ffff88805dabbe00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5dab8
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe26c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fe26c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000176ae01 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6023, tgid 6023 (syz-executor), ts 111772496494, free_ts 103111430979
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5209
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3063 [inline]
allocate_slab+0x96/0x350 mm/slub.c:3236
new_slab mm/slub.c:3290 [inline]
___slab_alloc+0xf56/0x1990 mm/slub.c:4659
__slab_alloc+0x65/0x100 mm/slub.c:4782
__slab_alloc_node mm/slub.c:4858 [inline]
slab_alloc_node mm/slub.c:5280 [inline]
__do_kmalloc_node mm/slub.c:5653 [inline]
__kmalloc_noprof+0x47d/0x800 mm/slub.c:5666
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+0x887/0x1080 net/ipv6/addrconf.c:3694
notifier_call_chain+0x1b6/0x3e0 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:9794
page last free pid 6006 tgid 6006 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:2948
__slab_free+0x2e7/0x390 mm/slub.c:5974
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4982 [inline]
slab_alloc_node mm/slub.c:5292 [inline]
kmem_cache_alloc_noprof+0x37d/0x700 mm/slub.c:5299
taskstats_tgid_alloc kernel/taskstats.c:576 [inline]
taskstats_exit+0x14a/0xa30 kernel/taskstats.c:615
do_exit+0x630/0x2300 kernel/exit.c:940
do_group_exit+0x21c/0x2d0 kernel/exit.c:1111
__do_sys_exit_group kernel/exit.c:1122 [inline]
__se_sys_exit_group kernel/exit.c:1120 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1120
__pfx_syscall_get_nr+0x0/0x10 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88805dabbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805dabbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805dabbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88805dabc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88805dabc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 56 push %rsi
1: 41 55 push %r13
3: 41 54 push %r12
5: 53 push %rbx
6: 48 81 ec 98 00 00 00 sub $0x98,%rsp
d: 49 89 fe mov %rdi,%r14
10: 48 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%rbp
17: fc ff df
1a: 48 8d 5f 48 lea 0x48(%rdi),%rbx
1e: 48 89 d8 mov %rbx,%rax
21: 48 c1 e8 03 shr $0x3,%rax
25: 48 89 44 24 30 mov %rax,0x30(%rsp)
* 2a: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 48 89 df mov %rbx,%rdi
33: e8 b0 db b3 00 call 0xb3dbe8
38: 48 89 5c 24 18 mov %rbx,0x18(%rsp)
3d: 49 rex.WB
3e: 8b .byte 0x8b
3f: 5e pop %rsi