syzbot


UBSAN: shift-out-of-bounds in s32ton

Status: upstream: reported C repro on 2025/12/08 23:28
Bug presence: origin:lts
[Documentation on labels]
Reported-by: syzbot+a0875f420b07dcb98b5d@syzkaller.appspotmail.com
First crash: 12d, last: 12d
Bug presence (2)
Date Name Commit Repro Result
2025/12/09 lts (merge base) cc5ec8769306 C [report] UBSAN: shift-out-of-bounds in s32ton
2025/12/08 upstream (ToT) a110f942672c C Didn't crash
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in s32ton input usb -1 18 300d 405d 0/29 auto-obsoleted due to no activity on 2025/05/23 12:14
upstream UBSAN: shift-out-of-bounds in s32ton (2) input usb -1 C 4 153d 160d 29/29 fixed on 2025/09/04 16:57
android-6-12 UBSAN: shift-out-of-bounds in s32ton origin:upstream -1 C 3 43d 160d 0/1 premoderation: reported C repro on 2025/07/14 11:42
android-6-1 UBSAN: shift-out-of-bounds in s32ton origin:lts -1 C 3 29d 43d 0/2 upstream: reported C repro on 2025/11/08 09:31

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in drivers/hid/hid-core.c:1346:16
shift exponent 4294967295 is too large for 32-bit type '__s32' (aka 'int')
CPU: 0 PID: 371 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
 dump_stack+0x15/0x20 lib/dump_stack.c:113
 ubsan_epilogue+0xe/0x40 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds+0x37c/0x400 lib/ubsan.c:321
 s32ton+0xe8/0x150 drivers/hid/hid-core.c:1346
 hid_output_field drivers/hid/hid-core.c:1615 [inline]
 hid_output_report+0x423/0x780 drivers/hid/hid-core.c:1647
 __usbhid_submit_report drivers/hid/usbhid/hid-core.c:591 [inline]
 usbhid_submit_report+0x45b/0xa80 drivers/hid/usbhid/hid-core.c:636
 usbhid_request+0x50/0x60 drivers/hid/usbhid/hid-core.c:-1
 hid_hw_request include/linux/hid.h:1100 [inline]
 hiddev_ioctl+0xfd5/0x1630 drivers/hid/usbhid/hiddev.c:726
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 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:0x7f443d807749
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:00007ffe6eab2198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f443da5dfa0 RCX: 00007f443d807749
RDX: 0000200000000240 RSI: 00000000400c4808 RDI: 0000000000000004
RBP: 00007f443d88bf91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f443da5dfa0 R14: 00007f443da5dfa0 R15: 0000000000000003
 </TASK>
================================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/09 01:21 android13-5.15-lts 057fdbf6d3c7 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in s32ton
2025/12/09 00:46 android13-5.15-lts 057fdbf6d3c7 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in s32ton
2025/12/09 00:08 android13-5.15-lts 057fdbf6d3c7 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in s32ton
2025/12/08 23:26 android13-5.15-lts 057fdbf6d3c7 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in s32ton
2025/12/08 22:28 android13-5.15-lts 057fdbf6d3c7 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in s32ton
* Struck through repros no longer work on HEAD.