==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88807e0b3fff by task syz.8.4374/23739
CPU: 0 UID: 0 PID: 23739 Comm: syz.8.4374 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:__sanitizer_cov_trace_pc+0x0/0x70 kernel/kcov.c:210
Code: b6 d7 55 00 48 89 df 5b e9 3d 5f 5b 00 be 03 00 00 00 5b e9 f2 64 28 03 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 48 8b 34 24 65 48 8b 15 38 55 1b 12 65 8b 05 49 55 1b
RSP: 0018:ffffc90004b57e70 EFLAGS: 00000282
RAX: 0000000000000000 RBX: 1ffff9200096afd2 RCX: ffffffff81c380af
RDX: 0000000000000000 RSI: ffffffff8de52fc1 RDI: ffffffff8c163380
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90ab7697 R11: 0000000000000000 R12: ffff888030b94880
R13: 0000000000000000 R14: ffffc90004b57eb0 R15: ffffffff8bb04150
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1384 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1376 [inline]
__x64_sys_clock_nanosleep+0x35e/0x4a0 kernel/time/posix-timers.c:1376
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f53423c1785
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 54 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f 55 ff ff 48 8b 04 24 48 83 c4 28 f7 d8
RSP: 002b:00007ffdb319af00 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 00007f53425e5fa0 RCX: 00007f53423c1785
RDX: 00007ffdb319af40 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f53425e7da0 R08: 0000000000000000 R09: 00007f53432af000
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000001b0799
R13: 00007ffdb319b060 R14: ffffffffffffffff R15: 00007ffdb319b080
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807e0b3a80 pfn:0x7e0b0
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: f8(unknown)
raw: 00fff00000000040 0000000000000000 dead000000000122 0000000000000000
raw: ffff88807e0b3a80 0000000000000000 00000000f8000000 0000000000000000
head: 00fff00000000040 0000000000000000 dead000000000122 0000000000000000
head: ffff88807e0b3a80 0000000000000000 00000000f8000000 0000000000000000
head: 00fff00000000002 ffffea0001f82c01 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 0x140dc0(GFP_USER|__GFP_ZERO|__GFP_COMP), pid 20527, tgid 20527 (syz-executor), ts 1502748799237, free_ts 1502739882611
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
___kmalloc_large_node+0xed/0x160 mm/slub.c:4317
__kmalloc_large_noprof+0x1c/0x70 mm/slub.c:4338
kmalloc_noprof include/linux/slab.h:902 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
geneve_socket_create drivers/net/geneve.c:597 [inline]
geneve_sock_add+0x572/0x930 drivers/net/geneve.c:688
geneve_open+0xe2/0x1c0 drivers/net/geneve.c:724
__dev_open+0x2e7/0x7c0 net/core/dev.c:1682
__dev_change_flags+0x55d/0x720 net/core/dev.c:9549
netif_change_flags+0x8d/0x160 net/core/dev.c:9612
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
page last free pid 12968 tgid 12968 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
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:340
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4191 [inline]
slab_alloc_node mm/slub.c:4240 [inline]
__kmalloc_cache_noprof+0x1f1/0x3e0 mm/slub.c:4402
kmalloc_noprof include/linux/slab.h:905 [inline]
usb_control_msg+0xbc/0x4a0 drivers/usb/core/message.c:144
usb_clear_port_feature drivers/usb/core/hub.c:460 [inline]
hub_activate+0xabf/0x1d60 drivers/usb/core/hub.c:1238
hub_resume+0xa8/0x3f0 drivers/usb/core/hub.c:4050
usb_resume_interface.constprop.0.isra.0+0x2c5/0x3e0 drivers/usb/core/driver.c:1374
usb_resume_both+0x273/0x800 drivers/usb/core/driver.c:1534
__rpm_callback+0xc5/0x610 drivers/base/power/runtime.c:406
rpm_callback+0x1b7/0x200 drivers/base/power/runtime.c:460
rpm_resume+0xd0a/0x1310 drivers/base/power/runtime.c:934
__pm_runtime_resume+0xb6/0x170 drivers/base/power/runtime.c:1192
pm_runtime_resume_and_get include/linux/pm_runtime.h:526 [inline]
usb_autoresume_device+0x23/0xe0 drivers/usb/core/driver.c:1722
usb_remote_wakeup+0x8d/0xe0 drivers/usb/core/hub.c:3888
Memory state around the buggy address:
ffff88807e0b3e80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
ffff88807e0b3f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff88807e0b3f80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
^
ffff88807e0b4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807e0b4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: b6 d7 mov $0xd7,%dh
2: 55 push %rbp
3: 00 48 89 add %cl,-0x77(%rax)
6: df 5b e9 fistps -0x17(%rbx)
9: 3d 5f 5b 00 be cmp $0xbe005b5f,%eax
e: 03 00 add (%rax),%eax
10: 00 00 add %al,(%rax)
12: 5b pop %rbx
13: e9 f2 64 28 03 jmp 0x328650a
18: 66 90 xchg %ax,%ax
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: 48 8b 34 24 mov (%rsp),%rsi
32: 65 48 8b 15 38 55 1b mov %gs:0x121b5538(%rip),%rdx # 0x121b5572
39: 12
3a: 65 gs
3b: 8b .byte 0x8b
3c: 05 .byte 0x5
3d: 49 55 rex.WB push %r13
3f: 1b .byte 0x1b