==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950
Read of size 1 at addr ffff888034407fff by task syz.3.27/6614
CPU: 1 UID: 0 PID: 6614 Comm: syz.3.27 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/27/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+0x156/0x4c9 mm/kasan/report.c:482
kasan_report+0xdf/0x1e0 mm/kasan/report.c:595
mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139
hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1785 [inline]
__hrtimer_run_queues+0x50e/0xa70 kernel/time/hrtimer.c:1849
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1866
handle_softirqs+0x1eb/0x9e0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xef/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:trace_lock_release include/trace/events/lock.h:69 [inline]
RIP: 0010:lock_release+0x40/0x320 kernel/locking/lockdep.c:5879
Code: 2d 6d c8 28 12 48 89 6c 24 10 48 89 f5 0f 1f 44 00 00 65 8b 05 85 c8 28 12 83 f8 07 0f 87 1d 02 00 00 48 0f a3 05 50 a5 f4 0e <0f> 82 18 02 00 00 44 8b 05 37 d9 f4 0e 45 85 c0 0f 84 48 01 00 00
RSP: 0018:ffffc90003e56c00 EFLAGS: 00000297
RAX: 0000000000000001 RBX: ffffffff8e7e75a0 RCX: ffffffff91853a01
RDX: 0000000000000000 RSI: ffffffff81b8019e RDI: ffffffff8e7e75a0
RBP: ffffffff81b8019e R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000015b76 R12: ffffc90003e56d08
R13: ffffc90003e56cb8 R14: ffffc90003e57a80 R15: ffffc90003e56cec
rcu_lock_release include/linux/rcupdate.h:322 [inline]
rcu_read_unlock include/linux/rcupdate.h:881 [inline]
class_rcu_destructor include/linux/rcupdate.h:1193 [inline]
unwind_next_frame+0x3c3/0x1ea0 arch/x86/kernel/unwind_orc.c:495
arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
save_stack+0x162/0x1e0 mm/page_owner.c:165
__set_page_owner+0x8c/0x540 mm/page_owner.c:341
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5250
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2484
folio_alloc_mpol_noprof+0x36/0x340 mm/mempolicy.c:2503
shmem_alloc_folio+0x135/0x160 mm/shmem.c:1930
shmem_alloc_and_add_folio+0x371/0xd40 mm/shmem.c:1972
shmem_get_folio_gfp+0x6ab/0x1900 mm/shmem.c:2567
shmem_fault+0x1f9/0xa20 mm/shmem.c:2768
__do_fault+0x10d/0x550 mm/memory.c:5364
do_read_fault mm/memory.c:5799 [inline]
do_fault+0xabb/0x1990 mm/memory.c:5933
do_pte_missing mm/memory.c:4477 [inline]
handle_pte_fault mm/memory.c:6317 [inline]
__handle_mm_fault+0x180f/0x2b60 mm/memory.c:6455
handle_mm_fault+0x36d/0xa20 mm/memory.c:6624
faultin_page mm/gup.c:1126 [inline]
__get_user_pages+0xf9c/0x34d0 mm/gup.c:1428
populate_vma_page_range+0x267/0x3f0 mm/gup.c:1860
__mm_populate+0x107/0x3a0 mm/gup.c:1963
mm_populate include/linux/mm.h:3894 [inline]
vm_mmap_pgoff+0x37f/0x470 mm/util.c:586
ksys_mmap_pgoff+0xe1/0x650 mm/mmap.c:605
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline]
__x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc04019a539
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc041040028 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007fc040405fa0 RCX: 00007fc04019a539
RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000200000000000
RBP: 00007fc04022dee0 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc040406038 R14: 00007fc040405fa0 R15: 00007ffc625cf848
Allocated by task 6244:
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:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5263 [inline]
__kmalloc_noprof+0x301/0x850 mm/slub.c:5275
kmalloc_noprof include/linux/slab.h:954 [inline]
tomoyo_realpath_from_path+0xb6/0x690 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x276/0x460 security/tomoyo/file.c:827
security_inode_getattr+0x116/0x280 security/security.c:1869
vfs_getattr fs/stat.c:259 [inline]
vfs_statx_path fs/stat.c:299 [inline]
vfs_statx+0x11f/0x3f0 fs/stat.c:356
vfs_fstatat+0x77/0xe0 fs/stat.c:373
__do_sys_newfstatat+0x9d/0x120 fs/stat.c:538
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6244:
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:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2692 [inline]
slab_free mm/slub.c:6168 [inline]
kfree+0x1f6/0x6b0 mm/slub.c:6486
tomoyo_realpath_from_path+0x19c/0x690 security/tomoyo/realpath.c:286
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x276/0x460 security/tomoyo/file.c:827
security_inode_getattr+0x116/0x280 security/security.c:1869
vfs_getattr fs/stat.c:259 [inline]
vfs_statx_path fs/stat.c:299 [inline]
vfs_statx+0x11f/0x3f0 fs/stat.c:356
vfs_fstatat+0x77/0xe0 fs/stat.c:373
__do_sys_newfstatat+0x9d/0x120 fs/stat.c:538
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888034406000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 4095 bytes to the right of
allocated 4096-byte region [ffff888034406000, ffff888034407000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x34400
head: order:3 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 ffff88813fe40140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fe40140 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea0000d10001 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 1, tgid 1 (swapper/0), ts 14481197186, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5250
alloc_slab_page mm/slub.c:3296 [inline]
allocate_slab mm/slub.c:3485 [inline]
new_slab+0xa6/0x6c0 mm/slub.c:3543
refill_objects+0x26b/0x400 mm/slub.c:7178
refill_sheaf mm/slub.c:2818 [inline]
alloc_full_sheaf mm/slub.c:2839 [inline]
__pcs_replace_empty_main+0x1ab/0x600 mm/slub.c:4629
alloc_from_pcs mm/slub.c:4720 [inline]
slab_alloc_node mm/slub.c:4854 [inline]
__kmalloc_cache_noprof+0x493/0x6f0 mm/slub.c:5378
kmalloc_noprof include/linux/slab.h:950 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
kobject_uevent_env+0x263/0x18b0 lib/kobject_uevent.c:540
version_sysfs_builtin kernel/params.c:872 [inline]
param_sysfs_builtin_init+0x100/0x3f0 kernel/params.c:980
do_one_initcall+0x11d/0x760 init/main.c:1382
do_initcall_level init/main.c:1444 [inline]
do_initcalls init/main.c:1460 [inline]
do_basic_setup init/main.c:1479 [inline]
kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692
kernel_init+0x1f/0x1e0 init/main.c:1582
ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page_owner free stack trace missing
Memory state around the buggy address:
ffff888034407e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888034407f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888034407f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888034408000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888034408080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 2d 6d c8 28 12 sub $0x1228c86d,%eax
5: 48 89 6c 24 10 mov %rbp,0x10(%rsp)
a: 48 89 f5 mov %rsi,%rbp
d: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
12: 65 8b 05 85 c8 28 12 mov %gs:0x1228c885(%rip),%eax # 0x1228c89e
19: 83 f8 07 cmp $0x7,%eax
1c: 0f 87 1d 02 00 00 ja 0x23f
22: 48 0f a3 05 50 a5 f4 bt %rax,0xef4a550(%rip) # 0xef4a57a
29: 0e
* 2a: 0f 82 18 02 00 00 jb 0x248 <-- trapping instruction
30: 44 8b 05 37 d9 f4 0e mov 0xef4d937(%rip),%r8d # 0xef4d96e
37: 45 85 c0 test %r8d,%r8d
3a: 0f 84 48 01 00 00 je 0x188