syzbot


KASAN: stack-out-of-bounds Read in cp2112_xfer

Status: upstream: reported C repro on 2025/11/19 05:27
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+efbf3074a9bd9a22b326@syzkaller.appspotmail.com
First crash: 78d, last: 20d
Bug presence (2)
Date Name Commit Repro Result
2025/11/22 linux-6.6.y (ToT) 0a805b6ea8cd C [report] KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/22 upstream (ToT) 2eba5e05d9bc C Didn't crash
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Read in cp2112_xfer input 17 C error 8 113d 142d 29/29 fixed on 2025/11/18 08:45
linux-5.15 KASAN: stack-out-of-bounds Read in cp2112_xfer origin:lts-only 17 C error 16 3d23h 84d 0/3 upstream: reported C repro on 2025/11/13 01:43
linux-6.1 KASAN: stack-out-of-bounds Read in cp2112_xfer origin:lts-only 17 C error 15 15d 84d 0/3 upstream: reported C repro on 2025/11/13 02:45
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/12/05 12:21 2h22m fix candidate upstream OK (0) job log

Sample crash report:
==================================================================
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 ffffc90003267d41 by task syz.0.17/5948

CPU: 1 PID: 5948 Comm: syz.0.17 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:0x7fee68f8f749
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:00007ffe1934d5f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fee691e5fa0 RCX: 00007fee68f8f749
RDX: 0000200000000200 RSI: 0000000000000720 RDI: 0000000000000004
RBP: 00007fee69013f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fee691e5fa0 R14: 00007fee691e5fa0 R15: 0000000000000003
 </TASK>

The buggy address belongs to stack of task syz.0.17/5948
 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 0xffffc90003260000 allocated at copy_process+0x549/0x3d70 kernel/fork.c:2331
The buggy address belongs to the physical page:
page:ffffea000071d500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c754
memcg:ffff88807331f382
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88807331f382
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 2, tgid 2 (kthreadd), ts 72338514479, free_ts 72294243818
 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
 kernel_thread+0x10d/0x160 kernel/fork.c:2976
 create_kthread kernel/kthread.c:411 [inline]
 kthreadd+0x560/0x730 kernel/kthread.c:766
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
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+0x32/0x2e0 mm/page_alloc.c:2429
 __slab_free+0x35e/0x410 mm/slub.c:3736
 qlink_free mm/kasan/quarantine.c:166 [inline]
 qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
 slab_alloc_node mm/slub.c:3495 [inline]
 kmem_cache_alloc_node+0x150/0x330 mm/slub.c:3540
 __alloc_skb+0x108/0x2c0 net/core/skbuff.c:640
 alloc_skb include/linux/skbuff.h:1284 [inline]
 nlmsg_new include/net/netlink.h:1010 [inline]
 inet_netconf_notify_devconf+0x173/0x230 net/ipv4/devinet.c:2149
 __devinet_sysctl_unregister net/ipv4/devinet.c:2660 [inline]
 devinet_sysctl_unregister net/ipv4/devinet.c:2684 [inline]
 inetdev_event+0xf0f/0x15c0 net/ipv4/devinet.c:1644
 notifier_call_chain+0x197/0x390 kernel/notifier.c:93
 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
 call_netdevice_notifiers net/core/dev.c:2078 [inline]
 dev_change_name+0x5d4/0x8a0 net/core/dev.c:1300
 do_setlink+0xa15/0x3fb0 net/core/rtnetlink.c:2885
 __rtnl_newlink net/core/rtnetlink.c:3703 [inline]
 rtnl_newlink+0x175b/0x2020 net/core/rtnetlink.c:3750
 rtnetlink_rcv_msg+0x7c7/0xf10 net/core/rtnetlink.c:6472

Memory state around the buggy address:
 ffffc90003267c00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3
 ffffc90003267c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003267d00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 02 f3 f3 f3
                                                       ^
 ffffc90003267d80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90003267e00: f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 f3 f3 f3 f3
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/21 06:11 linux-6.6.y 0a805b6ea8cd 2cc4c24a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2026/01/16 16:32 linux-6.6.y c596736dadab d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2026/01/16 14:15 linux-6.6.y c596736dadab d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2026/01/16 06:29 linux-6.6.y c596736dadab d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2026/01/16 06:29 linux-6.6.y c596736dadab d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2026/01/12 23:21 linux-6.6.y c596736dadab d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/12/29 15:39 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/12/29 01:08 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/19 05:26 linux-6.6.y 0a805b6ea8cd ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/19 05:26 linux-6.6.y 0a805b6ea8cd ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
* Struck through repros no longer work on HEAD.