syzbot


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

Status: upstream: reported C repro on 2025/11/13 01:43
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+9c7c53be91054ae17acf@syzkaller.appspotmail.com
First crash: 23d, last: 3d05h
Bug presence (2)
Date Name Commit Repro Result
2025/11/16 linux-5.15.y (ToT) cc5ec8769306 C [report] KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/16 upstream (ToT) 7254a2b52279 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 52d 81d 29/29 fixed on 2025/11/18 08:45
linux-6.6 KASAN: stack-out-of-bounds Read in cp2112_xfer origin:lts-only 17 C inconclusive 3 14d 17d 0/2 upstream: reported C repro on 2025/11/19 05:27
linux-6.1 KASAN: stack-out-of-bounds Read in cp2112_xfer origin:lts-only 17 C 5 2d00h 23d 0/3 upstream: reported C repro on 2025/11/13 02:45
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/12/03 05:08 12m retest repro linux-5.15.y report log
2025/12/03 05:08 12m retest repro linux-5.15.y report log
2025/12/03 05:08 12m retest repro linux-5.15.y report log

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in cp2112_write_req drivers/hid/hid-cp2112.c:481 [inline]
BUG: KASAN: stack-out-of-bounds in cp2112_xfer+0x87c/0xe00 drivers/hid/hid-cp2112.c:698
Read of size 42 at addr ffffc9000328fd41 by task syz.0.17/4510

CPU: 0 PID: 4510 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+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
 memcpy+0x25/0x60 mm/kasan/shadow.c:65
 cp2112_write_req drivers/hid/hid-cp2112.c:481 [inline]
 cp2112_xfer+0x87c/0xe00 drivers/hid/hid-cp2112.c:698
 __i2c_smbus_xfer+0x733/0x1d50 drivers/i2c/i2c-core-smbus.c:590
 i2c_smbus_xfer+0x263/0x3a0 drivers/i2c/i2c-core-smbus.c:545
 i2cdev_ioctl_smbus+0x3e3/0x650 drivers/i2c/i2c-dev.c:381
 i2cdev_ioctl+0x545/0x750 drivers/i2c/i2c-dev.c:467
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f9f353746c9
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:00007fff15c5a6d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9f355cafa0 RCX: 00007f9f353746c9
RDX: 0000200000000200 RSI: 0000000000000720 RDI: 0000000000000004
RBP: 00007f9f353f6f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9f355cafa0 R14: 00007f9f355cafa0 R15: 0000000000000003
 </TASK>


addr ffffc9000328fd41 is located in stack of task syz.0.17/4510 at offset 33 in frame:
 i2cdev_ioctl_smbus+0x0/0x650

this frame has 1 object:
 [32, 66) 'temp'

Memory state around the buggy address:
 ffffc9000328fc00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3
 ffffc9000328fc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000328fd00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 02 f3 f3 f3
                                                       ^
 ffffc9000328fd80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc9000328fe00: f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 f3 f3 f3 f3
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/13 08:14 linux-5.15.y cc5ec8769306 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 07:25 linux-5.15.y cc5ec8769306 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 06:33 linux-5.15.y cc5ec8769306 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 05:46 linux-5.15.y cc5ec8769306 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 01:44 linux-5.15.y cc5ec8769306 07e030de .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 01:44 linux-5.15.y cc5ec8769306 07e030de .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
2025/11/13 01:42 linux-5.15.y cc5ec8769306 07e030de .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: stack-out-of-bounds Read in cp2112_xfer
* Struck through repros no longer work on HEAD.