Hello,
syzbot found the following issue on:
HEAD commit: 0a805b6ea8cd Linux 6.6.116
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=12ac9658580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link:
https://syzkaller.appspot.com/bug?extid=efbf3074a9bd9a22b326
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/13874446b4b2/disk-0a805b6e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/69a5e59e1ade/vmlinux-0a805b6e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/322c0711f976/bzImage-0a805b6e.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+efbf30...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: stack-out-of-bounds in cp2112_write_req drivers/hid/hid-cp2112.c:483 [inline]
BUG: KASAN: stack-out-of-bounds in cp2112_xfer+0x714/0xf00 drivers/hid/hid-cp2112.c:698
Read of size 42 at addr ffffc9000ba47d41 by task syz.0.8746/27249
CPU: 0 PID: 27249 Comm: syz.0.8746 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x288/0x290 mm/kasan/generic.c:187
__asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
cp2112_write_req drivers/hid/hid-cp2112.c:483 [inline]
cp2112_xfer+0x714/0xf00 drivers/hid/hid-cp2112.c:698
__i2c_smbus_xfer+0x888/0x1d90 drivers/i2c/i2c-core-smbus.c:590
i2c_smbus_xfer+0x267/0x3a0 drivers/i2c/i2c-core-smbus.c:545
i2cdev_ioctl_smbus+0x423/0x670 drivers/i2c/i2c-dev.c:381
i2cdev_ioctl+0x5d1/0x7e0 drivers/i2c/i2c-dev.c:467
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f7be218f6c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7be300f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f7be23e5fa0 RCX: 00007f7be218f6c9
RDX: 0000200000000200 RSI: 0000000000000720 RDI: 0000000000000004
RBP: 00007f7be2211f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7be23e6038 R14: 00007f7be23e5fa0 R15: 00007ffde03fd7c8
</TASK>
The buggy address belongs to stack of task syz.0.8746/27249
and is located at offset 33 in frame:
i2cdev_ioctl_smbus+0x0/0x670
This frame has 1 object:
[32, 66) 'temp'
The buggy address belongs to a 8-page vmalloc region starting at 0xffffc9000ba40000 allocated at copy_process+0x549/0x3d70 kernel/fork.c:2331
The buggy address belongs to the physical page:
page:ffffea000188f7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x623df
memcg:ffff88802e8a6502
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802e8a6502
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 27153, tgid 27153 (syz.0.8703), ts 1502369946820, free_ts 1478239683310
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
vm_area_alloc_pages mm/vmalloc.c:3089 [inline]
__vmalloc_area_node mm/vmalloc.c:3158 [inline]
__vmalloc_node_range+0x96b/0x1320 mm/vmalloc.c:3339
alloc_thread_stack_node kernel/fork.c:310 [inline]
dup_task_struct+0x3d0/0x7c0 kernel/fork.c:1124
copy_process+0x549/0x3d70 kernel/fork.c:2331
kernel_clone+0x21b/0x840 kernel/fork.c:2914
__do_sys_clone3 kernel/fork.c:3215 [inline]
__se_sys_clone3+0x252/0x2c0 kernel/fork.c:3199
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2475
release_pages+0x1fa0/0x2220 mm/swap.c:1022
tlb_batch_pages_flush mm/mmu_gather.c:98 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:293 [inline]
tlb_flush_mmu+0x368/0x4f0 mm/mmu_gather.c:300
tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:392
exit_mmap+0x3f0/0xb50 mm/mmap.c:3315
__mmput+0x118/0x3c0 kernel/fork.c:1355
exit_mm+0x1da/0x2c0 kernel/exit.c:569
do_exit+0x88e/0x23c0 kernel/exit.c:870
do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
get_signal+0x12fc/0x1400 kernel/signal.c:2902
arch_do_signal_or_restart+0x9c/0x7b0 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xf6/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
Memory state around the buggy address:
ffffc9000ba47c00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3
ffffc9000ba47c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000ba47d00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 02 f3 f3 f3
^
ffffc9000ba47d80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000ba47e00: f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 f3 f3 f3 f3
==================================================================
---