==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88806df6bfff by task modprobe/6147
CPU: 1 UID: 0 PID: 6147 Comm: modprobe Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
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:2130 [inline]
hid_input_report+0x40a/0x520 drivers/hid/hid-core.c:2157
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+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x529/0xc60 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
handle_softirqs+0x286/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: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:check_region_inline mm/kasan/generic.c:182 [inline]
RIP: 0010:kasan_check_range+0x10/0x2c0 mm/kasan/generic.c:200
Code: cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 b0 01 <48> 85 f6 0f 84 ba 01 00 00 4c 8d 04 37 49 39 f8 0f 82 82 02 00 00
RSP: 0018:ffffc900049c7558 EFLAGS: 00000246
RAX: 1ffffffff33f2a01 RBX: 000000000000e12b RCX: ffffffff822f114b
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88801b1e5db8
RBP: ffff88801b1e5d70 R08: 0000000000000000 R09: ffffffff822f1017
R10: dffffc0000000000 R11: fffff94000070959 R12: 0000000000000000
R13: 0000000000000001 R14: ffffffff822f1017 R15: ffff88801b1e5db8
instrument_atomic_read include/linux/instrumented.h:68 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
page_table_check_clear+0x2bb/0x700 mm/page_table_check.c:85
ptep_get_and_clear_full arch/x86/include/asm/jump_label.h:-1 [inline]
get_and_clear_full_ptes include/linux/pgtable.h:725 [inline]
zap_present_folio_ptes mm/memory.c:1627 [inline]
zap_present_ptes mm/memory.c:1709 [inline]
do_zap_pte_range mm/memory.c:1810 [inline]
zap_pte_range mm/memory.c:1854 [inline]
zap_pmd_range mm/memory.c:1946 [inline]
zap_pud_range mm/memory.c:1975 [inline]
zap_p4d_range mm/memory.c:1996 [inline]
unmap_page_range+0x344b/0x4370 mm/memory.c:2017
unmap_single_vma mm/memory.c:2060 [inline]
unmap_vmas+0x399/0x580 mm/memory.c:2104
exit_mmap+0x240/0xb40 mm/mmap.c:1280
__mmput+0x118/0x430 kernel/fork.c:1148
exit_mm+0x1da/0x2c0 kernel/exit.c:582
do_exit+0x648/0x2300 kernel/exit.c:954
do_group_exit+0x21c/0x2d0 kernel/exit.c:1107
__do_sys_exit_group kernel/exit.c:1118 [inline]
__se_sys_exit_group kernel/exit.c:1116 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1116
x64_sys_call+0x21f7/0x2200 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
RIP: 0033:0x7f643cd256c5
Code: Unable to access opcode bytes at 0x7f643cd2569b.
RSP: 002b:00007fffc9407978 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f643ce26fe8 RCX: 00007f643cd256c5
RDX: 00000000000000e7 RSI: ffffffffffffff88 RDI: 0000000000000001
RBP: 0000000000000001 R08: 00007fffc9407908 R09: 0000000000000000
R10: 00007fffc94077a0 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f643ce25680 R15: 00007f643ce27000
Allocated by task 60:
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:260 [inline]
__kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5397
kmalloc_noprof include/linux/slab.h:956 [inline]
kzalloc_noprof include/linux/slab.h:1090 [inline]
mca_alloc net/ipv6/mcast.c:871 [inline]
__ipv6_dev_mc_inc+0x44f/0xa50 net/ipv6/mcast.c:961
addrconf_join_solict net/ipv6/addrconf.c:2246 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4099 [inline]
addrconf_dad_work+0x3d0/0x14b0 net/ipv6/addrconf.c:4227
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x47c/0x820 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff88806df6bc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 735 bytes to the right of
allocated 288-byte region [ffff88806df6bc00, ffff88806df6bd20)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6df68
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 ffff88801a841c80 0000000000000000 0000000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a841c80 0000000000000000 0000000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0001b7da01 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 5868, tgid 5868 (udevd), ts 93602493609, free_ts 84905324293
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3854
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5144
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2996 [inline]
allocate_slab+0x8a/0x330 mm/slub.c:3164
new_slab mm/slub.c:3218 [inline]
___slab_alloc+0xbd1/0x13f0 mm/slub.c:4420
__slab_alloc+0x55/0xa0 mm/slub.c:4511
__slab_alloc_node mm/slub.c:4586 [inline]
slab_alloc_node mm/slub.c:4996 [inline]
__kmalloc_cache_noprof+0x411/0x6f0 mm/slub.c:5392
kmalloc_noprof include/linux/slab.h:956 [inline]
kzalloc_noprof include/linux/slab.h:1090 [inline]
kernfs_fop_open+0x397/0xca0 fs/kernfs/file.c:641
do_dentry_open+0x953/0x13f0 fs/open.c:965
vfs_open+0x3b/0x340 fs/open.c:1095
do_open fs/namei.c:3895 [inline]
path_openat+0x2ee5/0x3830 fs/namei.c:4054
do_filp_open+0x1fa/0x410 fs/namei.c:4081
do_sys_openat2+0x121/0x1c0 fs/open.c:1435
do_sys_open fs/open.c:1450 [inline]
__do_sys_openat fs/open.c:1466 [inline]
__se_sys_openat fs/open.c:1461 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1461
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
page last free pid 5858 tgid 5858 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:2948
folios_put_refs+0x584/0x670 mm/swap.c:1002
free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:264
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:397 [inline]
tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404
tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497
vms_clear_ptes+0x42c/0x540 mm/vma.c:1235
vms_complete_munmap_vmas+0x206/0x8a0 mm/vma.c:1277
do_vmi_align_munmap+0x364/0x440 mm/vma.c:1536
do_vmi_munmap+0x253/0x2e0 mm/vma.c:1584
__vm_munmap+0x207/0x380 mm/vma.c:3156
__do_sys_munmap mm/mmap.c:1080 [inline]
__se_sys_munmap mm/mmap.c:1077 [inline]
__x64_sys_munmap+0x60/0x70 mm/mmap.c:1077
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:
ffff88806df6be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88806df6bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88806df6bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88806df6c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88806df6c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: cc int3
1: cc int3
2: cc int3
3: cc int3
4: cc int3
5: cc int3
6: cc int3
7: cc int3
8: cc int3
9: cc int3
a: 90 nop
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 66 0f 1f 00 nopw (%rax)
1e: 55 push %rbp
1f: 41 57 push %r15
21: 41 56 push %r14
23: 41 55 push %r13
25: 41 54 push %r12
27: 53 push %rbx
28: b0 01 mov $0x1,%al
* 2a: 48 85 f6 test %rsi,%rsi <-- trapping instruction
2d: 0f 84 ba 01 00 00 je 0x1ed
33: 4c 8d 04 37 lea (%rdi,%rsi,1),%r8
37: 49 39 f8 cmp %rdi,%r8
3a: 0f 82 82 02 00 00 jb 0x2c2