==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
Read of size 1 at addr ffff8881358c7fff by task syz.4.472/7169
CPU: 1 UID: 0 PID: 7169 Comm: syz.4.472 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175
hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023
__run_hrtimer kernel/time/hrtimer.c:2074 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:check_preemption_disabled+0x4/0xe0 lib/smp_processor_id.c:13
Code: 8b 05 24 de 9a 05 85 c0 74 04 90 0f 0b 90 e9 53 fc ff ff 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 54 55 53 <48> 83 ec 08 65 8b 15 49 9e 9a 05 65 8b 2d 52 9e 9a 05 85 d2 74 0f
RSP: 0018:ffffc900154b7278 EFLAGS: 00000283
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffffffff87d2bd00 RDI: ffffffff87d2bd40
RBP: ffffffff898e6f20 R08: 0000000000000000 R09: 0000000000000000
R10: 00007fbbe8a4e000 R11: 0000000000000001 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline]
rcu_is_watching+0x13/0xc0 kernel/rcu/tree.c:753
trace_lock_acquire include/trace/events/lock.h:23 [inline]
lock_acquire+0x31e/0x380 kernel/locking/lockdep.c:5905
rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
rcu_read_lock include/linux/rcupdate.h:849 [inline]
class_rcu_constructor include/linux/rcupdate.h:1216 [inline]
is_module_text_address+0x33/0x220 kernel/module/main.c:3938
kernel_text_address kernel/extable.c:119 [inline]
kernel_text_address+0x81/0x100 kernel/extable.c:94
__kernel_text_address+0xd/0x30 kernel/extable.c:79
unwind_get_return_address+0x59/0xa0 arch/x86/kernel/unwind_orc.c:385
arch_stack_walk+0xa6/0xf0 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6509 [inline]
kmem_cache_free+0x108/0x650 mm/slub.c:6636
anon_vma_chain_free mm/rmap.c:147 [inline]
unlink_anon_vmas+0x4b2/0x8d0 mm/rmap.c:543
free_pgtables+0x299/0xd80 mm/memory.c:401
exit_mmap+0x44c/0xa00 mm/mmap.c:1327
__mmput kernel/fork.c:1193 [inline]
mmput+0xe0/0x430 kernel/fork.c:1216
exit_mm kernel/exit.c:592 [inline]
do_exit+0x83b/0x2a50 kernel/exit.c:974
do_group_exit+0xd5/0x2a0 kernel/exit.c:1129
get_signal+0x1ec7/0x21e0 kernel/signal.c:3112
arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0xd2/0x530 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x55a/0x710 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbbe8a4e1d9
Code: Unable to access opcode bytes at 0x7fbbe8a4e1af.
RSP: 002b:00007fbbe74a70e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fbbe8cd5fa8 RCX: 00007fbbe8a4e1d9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fbbe8cd5fa8
RBP: 00007fbbe8cd5fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbbe8cd6038 R14: 00007ffe36f00520 R15: 00007ffe36f00608
Allocated by task 2872:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5414 [inline]
__kvmalloc_node_noprof+0x341/0x950 mm/slub.c:7015
seq_buf_alloc fs/seq_file.c:39 [inline]
seq_read_iter+0x819/0x1270 fs/seq_file.c:211
kernfs_fop_read_iter+0x46c/0x610 fs/kernfs/file.c:290
new_sync_read fs/read_write.c:493 [inline]
vfs_read+0x82e/0xb40 fs/read_write.c:574
ksys_read+0x12a/0x250 fs/read_write.c:716
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 2872:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6509 [inline]
kfree+0x20c/0x650 mm/slub.c:6802
seq_release+0x4b/0x80 fs/seq_file.c:356
kernfs_fop_release+0xf4/0x1f0 fs/kernfs/file.c:777
__fput+0x3ff/0xb50 fs/file_table.c:512
fput_close_sync+0x118/0x250 fs/file_table.c:617
__do_sys_close fs/open.c:1560 [inline]
__se_sys_close fs/open.c:1545 [inline]
__x64_sys_close+0x8b/0x120 fs/open.c:1545
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8881358c6000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 4095 bytes to the right of
allocated 4096-byte region [ffff8881358c6000, ffff8881358c7000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1358c0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff8881358c1011
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff88810004b500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000300040004 00000000f5000000 ffff8881358c1011
head: 0200000000000040 ffff88810004b500 dead000000000100 dead000000000122
head: 0000000000000000 0000000300040004 00000000f5000000 ffff8881358c1011
head: 0200000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffff8881358c1280 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6562, tgid 6562 (udevd), ts 282124756304
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab mm/slub.c:3462 [inline]
new_slab+0xa9/0x6e0 mm/slub.c:3513
refill_objects+0xe3/0x410 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
__do_kmalloc_node mm/slub.c:5413 [inline]
__kvmalloc_node_noprof+0x71a/0x950 mm/slub.c:7015
seq_buf_alloc fs/seq_file.c:39 [inline]
seq_read_iter+0x819/0x1270 fs/seq_file.c:211
kernfs_fop_read_iter+0x46c/0x610 fs/kernfs/file.c:290
new_sync_read fs/read_write.c:493 [inline]
vfs_read+0x82e/0xb40 fs/read_write.c:574
ksys_read+0x12a/0x250 fs/read_write.c:716
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5216 tgid 5216 ts 145447347023 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:361
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4683 [inline]
slab_alloc_node mm/slub.c:4996 [inline]
kmem_cache_alloc_noprof+0x264/0x650 mm/slub.c:5010
alloc_filename fs/namei.c:147 [inline]
do_getname+0x35/0x390 fs/namei.c:187
class_filename_flags_constructor include/linux/fs.h:2586 [inline]
do_sys_openat2+0xc7/0x1e0 fs/open.c:1416
do_sys_open fs/open.c:1423 [inline]
__do_sys_openat fs/open.c:1439 [inline]
__se_sys_openat fs/open.c:1434 [inline]
__x64_sys_openat+0x12d/0x210 fs/open.c:1434
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8881358c7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881358c7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881358c7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8881358c8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881358c8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 8b 05 24 de 9a 05 mov 0x59ade24(%rip),%eax # 0x59ade2a
6: 85 c0 test %eax,%eax
8: 74 04 je 0xe
a: 90 nop
b: 0f 0b ud2
d: 90 nop
e: e9 53 fc ff ff jmp 0xfffffc66
13: 0f 1f 00 nopl (%rax)
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
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: 41 54 push %r12
28: 55 push %rbp
29: 53 push %rbx
* 2a: 48 83 ec 08 sub $0x8,%rsp <-- trapping instruction
2e: 65 8b 15 49 9e 9a 05 mov %gs:0x59a9e49(%rip),%edx # 0x59a9e7e
35: 65 8b 2d 52 9e 9a 05 mov %gs:0x59a9e52(%rip),%ebp # 0x59a9e8e
3c: 85 d2 test %edx,%edx
3e: 74 0f je 0x4f