================================================================== BUG: KASAN: stack-out-of-bounds in cp2112_write_req drivers/hid/hid-cp2112.c:477 [inline] BUG: KASAN: stack-out-of-bounds in cp2112_xfer+0x713/0xf10 drivers/hid/hid-cp2112.c:692 Read of size 34 at addr ffffc90003967d21 by task syz.0.17/6050 CPU: 1 UID: 0 PID: 6050 Comm: syz.0.17 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 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 cp2112_write_req drivers/hid/hid-cp2112.c:477 [inline] cp2112_xfer+0x713/0xf10 drivers/hid/hid-cp2112.c:692 __i2c_smbus_xfer+0x5b6/0x1e50 drivers/i2c/i2c-core-smbus.c:591 i2c_smbus_xfer+0x275/0x3c0 drivers/i2c/i2c-core-smbus.c:546 i2cdev_ioctl_smbus+0x43d/0x6d0 drivers/i2c/i2c-dev.c:389 i2cdev_ioctl+0x5d3/0x7f0 drivers/i2c/i2c-dev.c:478 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f975b78eba9 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:00007fffe2e6c958 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f975b9d5fa0 RCX: 00007f975b78eba9 RDX: 0000200000000040 RSI: 0000000000000720 RDI: 0000000000000004 RBP: 00007f975b811e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f975b9d5fa0 R14: 00007f975b9d5fa0 R15: 0000000000000003 The buggy address belongs to stack of task syz.0.17/6050 and is located at offset 33 in frame: i2cdev_ioctl_smbus+0x0/0x6d0 drivers/i2c/i2c-dev.c:317 This frame has 1 object: [32, 66) 'temp' The buggy address belongs to a 8-page vmalloc region starting at 0xffffc90003960000 allocated at copy_process+0x54b/0x3c00 kernel/fork.c:2004 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807567ec80 pfn:0x7567e memcg:ffff888077b7cd82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88807567ec80 0000000000000000 00000001ffffffff ffff888077b7cd82 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 5981, tgid 5981 (syz-executor), ts 107463971620, free_ts 107242006531 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x97d/0x12f0 mm/vmalloc.c:3893 __vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:3956 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct+0x3e7/0x860 kernel/fork.c:881 copy_process+0x54b/0x3c00 kernel/fork.c:2004 kernel_clone+0x21e/0x840 kernel/fork.c:2605 __do_sys_clone kernel/fork.c:2748 [inline] __se_sys_clone kernel/fork.c:2732 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2732 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6044 tgid 6044 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 discard_slab mm/slub.c:2758 [inline] __put_partials+0x156/0x1a0 mm/slub.c:3223 put_cpu_partial+0x17c/0x250 mm/slub.c:3298 __slab_free+0x2d5/0x3c0 mm/slub.c:4565 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/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:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4247 vm_area_alloc+0x24/0x140 mm/vma_init.c:31 __mmap_new_vma mm/vma.c:2461 [inline] __mmap_region mm/vma.c:2669 [inline] mmap_region+0xdc7/0x20c0 mm/vma.c:2739 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc90003967c00: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 ffffc90003967c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003967d00: f1 f1 f1 f1 00 00 00 00 02 f3 f3 f3 f3 f3 f3 f3 ^ ffffc90003967d80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc90003967e00: 04 f2 00 00 f2 f2 00 00 f3 f3 f3 f3 00 00 00 00 ==================================================================