==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852
Read of size 1 at addr ffff8880207dbfff by task kworker/u8:15/6021
CPU: 0 UID: 0 PID: 6021 Comm: kworker/u8:15 Not tainted 6.15.0-rc6-syzkaller-00188-gfee3e843b309 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events_unbound fsnotify_mark_destroy_workfn
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xb4/0x290 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852
__hid_input_report drivers/hid/hid-core.c:2117 [inline]
hid_input_report+0x40a/0x520 drivers/hid/hid-core.c:2144
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x41a/0x690 drivers/usb/core/hcd.c:1650
dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1994
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
handle_softirqs+0x283/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202
Code: 90 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 2a 65 45 f6 48 89 df e8 52 fc 45 f6 e8 5d 84 6e f6 fb bf 01 00 00 00 62 06 38 f6 65 8b 05 cb a4 1c 07 85 c0 74 07 5b c3 cc cc cc cc
RSP: 0018:ffffc9000b157b10 EFLAGS: 00000282
RAX: d8e4b236499b2500 RBX: ffff88801a0a0000 RCX: d8e4b236499b2500
RDX: 0000000000000000 RSI: ffffffff8d74c705 RDI: 0000000000000001
RBP: ffffc9000b157d10 R08: ffffffff8f7efc77 R09: 1ffffffff1efdf8e
R10: dffffc0000000000 R11: fffffbfff1efdf8f R12: ffff88801a0a0000
R13: ffffffff8e09e960 R14: dffffc0000000000 R15: 0000000002000010
process_one_work kernel/workqueue.c:3207 [inline]
process_scheduled_works+0x8ce/0x17a0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff8880207dbc00
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 [ffff8880207dbc00, ffff8880207dbe00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x207d8
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 ffff88801a041c80 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a041c80 dead000000000122 0000000000000000
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000081f601 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 7544, tgid 7544 (udevd), ts 259243923700, free_ts 258677560142
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab+0x8a/0x3b0 mm/slub.c:2618
new_slab mm/slub.c:2672 [inline]
___slab_alloc+0xbfc/0x1480 mm/slub.c:3858
__slab_alloc mm/slub.c:3948 [inline]
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4353
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
kernfs_fop_open+0x397/0xca0 fs/kernfs/file.c:623
do_dentry_open+0xdf0/0x1970 fs/open.c:956
vfs_open+0x3b/0x340 fs/open.c:1086
do_open fs/namei.c:3880 [inline]
path_openat+0x2ee5/0x3830 fs/namei.c:4039
do_filp_open+0x1fa/0x410 fs/namei.c:4066
do_sys_openat2+0x121/0x1c0 fs/open.c:1429
do_sys_open fs/open.c:1444 [inline]
__do_sys_openat fs/open.c:1460 [inline]
__se_sys_openat fs/open.c:1455 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1455
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 7921 tgid 7921 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0xb0e/0xcd0 mm/page_alloc.c:2725
discard_slab mm/slub.c:2716 [inline]
__put_partials+0x161/0x1c0 mm/slub.c:3185
put_cpu_partial+0x17c/0x250 mm/slub.c:3260
__slab_free+0x2f7/0x400 mm/slub.c:4512
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9a/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:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4147 [inline]
slab_alloc_node mm/slub.c:4196 [inline]
kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203
vm_area_dup+0x2b/0x5c0 kernel/fork.c:488
dup_mmap kernel/fork.c:672 [inline]
dup_mm kernel/fork.c:1734 [inline]
copy_mm+0xbe1/0x2100 kernel/fork.c:1786
copy_process+0x16d3/0x3b80 kernel/fork.c:2429
kernel_clone+0x21e/0x870 kernel/fork.c:2844
__do_sys_clone kernel/fork.c:2987 [inline]
__se_sys_clone kernel/fork.c:2971 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2971
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880207dbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880207dbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880207dbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8880207dc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880207dc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 90 nop
1: f3 0f 1e fa endbr64
5: 53 push %rbx
6: 48 89 fb mov %rdi,%rbx
9: 48 83 c7 18 add $0x18,%rdi
d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
12: e8 2a 65 45 f6 call 0xf6456541
17: 48 89 df mov %rbx,%rdi
1a: e8 52 fc 45 f6 call 0xf645fc71
1f: e8 5d 84 6e f6 call 0xf66e8481
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 62 06 38 f6 call 0xf6380691 <-- trapping instruction
2f: 65 8b 05 cb a4 1c 07 mov %gs:0x71ca4cb(%rip),%eax # 0x71ca501
36: 85 c0 test %eax,%eax
38: 74 07 je 0x41
3a: 5b pop %rbx
3b: c3 ret
3c: cc int3
3d: cc int3
3e: cc int3
3f: cc int3