================================================================== 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 ffffc90003807d41 by task syz.0.17/6686 CPU: 0 PID: 6686 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: 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:0x7f48de78f749 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:00007f48df71a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f48de9e5fa0 RCX: 00007f48de78f749 RDX: 0000200000000200 RSI: 0000000000000720 RDI: 0000000000000004 RBP: 00007f48de813f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f48de9e6038 R14: 00007f48de9e5fa0 R15: 00007ffddcc2e908 The buggy address belongs to stack of task syz.0.17/6686 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 0xffffc90003800000 allocated at copy_process+0x549/0x3d70 kernel/fork.c:2331 The buggy address belongs to the physical page: page:ffffea0001dd8f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7763c memcg:ffff8880750c7b02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff8880750c7b02 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 6685, tgid 6685 (syz.0.17), ts 127371092214, free_ts 127186142138 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 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033 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 Memory state around the buggy address: ffffc90003807c00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 ffffc90003807c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003807d00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 02 f3 f3 f3 ^ ffffc90003807d80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003807e00: f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 f3 f3 f3 f3 ==================================================================