==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88804bf9ffff by task syz.4.792/9581
CPU: 1 UID: 0 PID: 9581 Comm: syz.4.792 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
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+0x311/0x450 drivers/hid/hid-core.c:2130
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x388/0x610 drivers/usb/core/hcd.c:1661
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745
dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842
handle_softirqs+0x219/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__rcu_read_unlock+0x0/0x550 kernel/rcu/tree_plugin.h:431
Code: f8 e8 04 4b ff ff 48 89 df 5b e9 eb de ff ff e8 e6 05 80 00 eb e7 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 41 56 41 55 41 54 55 65 48 8b 2d 95 c6 34 12 53 48 8d
RSP: 0018:ffffc90004597818 EFLAGS: 00000286
RAX: 0000000000000000 RBX: ffff88804aa38d00 RCX: ffffc900045977dc
RDX: 0000000000000001 RSI: ffffffff8de2cdc0 RDI: ffffffff8c162d80
RBP: dffffc0000000000 R08: fb2a6942fd522942 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000000 R12: ffff88805b5da040
R13: ffffed100b6bb52a R14: ffffffff822a6140 R15: ffff8880356c0800
get_mem_cgroup_from_mm+0x12a/0x600 mm/memcontrol.c:940
__mem_cgroup_charge+0x1a/0x1e0 mm/memcontrol.c:4718
mem_cgroup_charge include/linux/memcontrol.h:654 [inline]
folio_prealloc mm/memory.c:1068 [inline]
alloc_anon_folio mm/memory.c:4997 [inline]
do_anonymous_page mm/memory.c:5054 [inline]
do_pte_missing+0x2258/0x3ba0 mm/memory.c:4232
handle_pte_fault mm/memory.c:6052 [inline]
__handle_mm_fault+0x152a/0x2a50 mm/memory.c:6195
handle_mm_fault+0x589/0xd10 mm/memory.c:6364
faultin_page mm/gup.c:1144 [inline]
__get_user_pages+0x551/0x34a0 mm/gup.c:1446
populate_vma_page_range+0x267/0x3f0 mm/gup.c:1880
__mm_populate+0x1d8/0x380 mm/gup.c:1983
do_mlock+0x448/0x810 mm/mlock.c:653
__do_sys_mlock mm/mlock.c:661 [inline]
__se_sys_mlock mm/mlock.c:659 [inline]
__x64_sys_mlock+0x59/0x80 mm/mlock.c:659
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f47b978eba9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f47ba5e9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000095
RAX: ffffffffffffffda RBX: 00007f47b99d6180 RCX: 00007f47b978eba9
RDX: 0000000000000000 RSI: 0000000000800000 RDI: 0000200000000000
RBP: 00007f47b9811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f47b99d6218 R14: 00007f47b99d6180 R15: 00007ffd435a3298
Allocated by task 5855:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4376 [inline]
__kmalloc_noprof+0x223/0x510 mm/slub.c:4388
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3811
ip6_route_add.part.0+0x22/0x1d0 net/ipv6/route.c:3940
ip6_route_add+0x45/0x60 net/ipv6/route.c:3937
addrconf_prefix_route+0x2fd/0x510 net/ipv6/addrconf.c:2488
fixup_permanent_addr net/ipv6/addrconf.c:3598 [inline]
addrconf_permanent_addr net/ipv6/addrconf.c:3622 [inline]
addrconf_notify+0x12c6/0x19e0 net/ipv6/addrconf.c:3694
notifier_call_chain+0xb9/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
call_netdevice_notifiers net/core/dev.c:2281 [inline]
__dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9588
netif_change_flags+0x108/0x160 net/core/dev.c:9617
do_setlink.constprop.0+0xb53/0x4380 net/core/rtnetlink.c:3143
rtnl_changelink net/core/rtnetlink.c:3761 [inline]
__rtnl_newlink net/core/rtnetlink.c:3920 [inline]
rtnl_newlink+0x1446/0x2000 net/core/rtnetlink.c:4057
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6946
netlink_rcv_skb+0x155/0x420 net/netlink/af_netlink.c:2552
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:714 [inline]
__sock_sendmsg net/socket.c:729 [inline]
__sys_sendto+0x4a0/0x520 net/socket.c:2228
__do_sys_sendto net/socket.c:2235 [inline]
__se_sys_sendto net/socket.c:2231 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2231
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88804bf9fc00
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 [ffff88804bf9fc00, ffff88804bf9fd30)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4bf9c
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 ffff88801b841c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b841c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00012fe701 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 64, tgid 64 (kworker/u8:4), ts 77080428508, free_ts 19722136072
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2492 [inline]
allocate_slab mm/slub.c:2660 [inline]
new_slab+0x247/0x330 mm/slub.c:2714
___slab_alloc+0xcf2/0x1750 mm/slub.c:3901
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992
__slab_alloc_node mm/slub.c:4067 [inline]
slab_alloc_node mm/slub.c:4228 [inline]
__do_kmalloc_node mm/slub.c:4375 [inline]
__kmalloc_noprof+0x2f2/0x510 mm/slub.c:4388
kmalloc_noprof include/linux/slab.h:909 [inline]
switchdev_deferred_enqueue+0x2b/0x2a0 net/switchdev/switchdev.c:117
switchdev_port_attr_set_defer net/switchdev/switchdev.c:183 [inline]
switchdev_port_attr_set+0xb5/0x120 net/switchdev/switchdev.c:202
__set_ageing_time+0xc2/0x140 net/bridge/br_stp.c:614
br_init_port+0x18b/0x250 net/bridge/br_stp_if.c:43
br_stp_enable_port+0x15/0x50 net/bridge/br_stp_if.c:93
br_port_carrier_check+0x264/0x4c0 net/bridge/br_if.c:89
br_device_event+0x6a6/0xa00 net/bridge/br.c:96
notifier_call_chain+0xb9/0x410 kernel/notifier.c:85
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+0x7d5/0x10f0 mm/page_alloc.c:2895
__free_pages mm/page_alloc.c:5260 [inline]
free_contig_range+0x183/0x4b0 mm/page_alloc.c:7091
destroy_args+0x794/0xc10 mm/debug_vm_pgtable.c:958
debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345
do_one_initcall+0x120/0x6e0 init/main.c:1269
do_initcall_level init/main.c:1331 [inline]
do_initcalls init/main.c:1347 [inline]
do_basic_setup init/main.c:1366 [inline]
kernel_init_freeable+0x5c2/0x910 init/main.c:1579
kernel_init+0x1c/0x2b0 init/main.c:1469
ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff88804bf9fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88804bf9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88804bf9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88804bfa0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88804bfa0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f8 clc
1: e8 04 4b ff ff call 0xffff4b0a
6: 48 89 df mov %rbx,%rdi
9: 5b pop %rbx
a: e9 eb de ff ff jmp 0xffffdefa
f: e8 e6 05 80 00 call 0x8005fa
14: eb e7 jmp 0xfffffffd
16: 0f 1f 40 00 nopl 0x0(%rax)
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
29: 90 nop
* 2a: f3 0f 1e fa endbr64 <-- trapping instruction
2e: 41 56 push %r14
30: 41 55 push %r13
32: 41 54 push %r12
34: 55 push %rbp
35: 65 48 8b 2d 95 c6 34 mov %gs:0x1234c695(%rip),%rbp # 0x1234c6d2
3c: 12
3d: 53 push %rbx
3e: 48 rex.W
3f: 8d .byte 0x8d