UBSAN: shift-out-of-bounds in verity_ctr

Status: upstream: reported C repro on 2026/12/01 05:59
Reported-by: syzbot+8628ce144ace1613e0dc@syzkaller.appspotmail.com
First crash: 2d19h, last: 2d19h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-12 UBSAN: shift-out-of-bounds in verity_ctr origin:upstream -1 syz, C 2 10d 25d 0/1 premoderation: reported C repro on 2026/11/09 00:19
upstream UBSAN: shift-out-of-bounds in verity_ctr prio:low dm -1 syz, C done 6 23h07m 10d 2/30 upstream: reported C repro on 2026/11/23 19:05

Sample crash report:
device-mapper: verity: sha512 using implementation "sha512-avx2"
================================================================================
UBSAN: shift-out-of-bounds in drivers/md/dm-verity-target.c:1266:38
shift exponent 66 is too large for 64-bit type 'sector_t' (aka 'unsigned long long')
CPU: 0 PID: 306 Comm: syz-executor669 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 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+0x364/0x3f0 lib/ubsan.c:321
 verity_ctr+0x16ae/0x1e90 drivers/md/dm-verity-target.c:1266
 dm_table_add_target+0x605/0xc30 drivers/md/dm-table.c:723
 populate_table drivers/md/dm-ioctl.c:1433 [inline]
 table_load+0x2ce/0x750 drivers/md/dm-ioctl.c:1475
 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline]
 dm_ctl_ioctl+0x8ee/0xca0 drivers/md/dm-ioctl.c:2054
 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:0x7fb770602179
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd198cdbc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb770668023 RCX: 00007fb770602179
RDX: 0000200000000900 RSI: 00000000c138fd09 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000011 R09: 00007ffd198cdcf8
R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffd198cdce8
R13: 0000000000000002 R14: 00007fb770692ca0 R15: 0000000000000002
 </TASK>
================================================================================
================================================================================
UBSAN: shift-out-of-bounds in drivers/md/dm-verity-target.c:1267:6
shift exponent 66 is too large for 64-bit type 'sector_t' (aka 'unsigned long long')
CPU: 0 PID: 306 Comm: syz-executor669 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 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+0x364/0x3f0 lib/ubsan.c:321
 verity_ctr+0x16e9/0x1e90 drivers/md/dm-verity-target.c:1267
 dm_table_add_target+0x605/0xc30 drivers/md/dm-table.c:723
 populate_table drivers/md/dm-ioctl.c:1433 [inline]
 table_load+0x2ce/0x750 drivers/md/dm-ioctl.c:1475
 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline]
 dm_ctl_ioctl+0x8ee/0xca0 drivers/md/dm-ioctl.c:2054
 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:0x7fb770602179
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd198cdbc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb770668023 RCX: 00007fb770602179
RDX: 0000200000000900 RSI: 00000000c138fd09 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000011 R09: 00007ffd198cdcf8
R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffd198cdce8
R13: 0000000000000002 R14: 00007fb770692ca0 R15: 0000000000000002
 </TASK>
================================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/12/01 05:57 android13-5.15-lts 52f96c99c39e ba8e13b2 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in verity_ctr
* Struck through repros no longer work on HEAD.