UBSAN: shift-out-of-bounds in verity_ctr

Status: premoderation: reported C repro on 2026/11/09 00:19
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+f928844b96ef14c4532d@syzkaller.appspotmail.com
First crash: 5d19h, last: 5d19h
▶ ▼ Bug presence (2)
Date Name Commit Repro Result
2026/11/11 lts (merge base) 6d15a1029d42 C [report] UBSAN: shift-out-of-bounds in verity_ctr
2026/11/11 upstream (ToT) 067c5c24cef2 C [report] UBSAN: shift-out-of-bounds in verity_ctr

Sample crash report:
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/md/dm-verity-target.c:1758:38
shift exponent 66 is too large for 64-bit type 'sector_t' (aka 'unsigned long long')
CPU: 1 UID: 0 PID: 313 Comm: syz-executor208 Not tainted syzkaller #0 ff996278633adec6fd25d1632b496761701c4fe9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 dump_stack+0x19/0x20 lib/dump_stack.c:129
 ubsan_epilogue+0xe/0x40 lib/ubsan.c:231
 __ubsan_handle_shift_out_of_bounds+0x36d/0x400 lib/ubsan.c:468
 verity_ctr+0x124c/0x1d00 drivers/md/dm-verity-target.c:1758
 dm_table_add_target+0x59f/0xcb0 drivers/md/dm-table.c:760
 populate_table drivers/md/dm-ioctl.c:1494 [inline]
 table_load+0x2eb/0x7d0 drivers/md/dm-ioctl.c:1536
 ctl_ioctl drivers/md/dm-ioctl.c:2107 [inline]
 dm_ctl_ioctl+0x8f3/0xde0 drivers/md/dm-ioctl.c:2129
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0x123/0x1b0 fs/ioctl.c:892
 __x64_sys_ioctl+0x7f/0xa0 fs/ioctl.c:892
 x64_sys_call+0x1878/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f69cb0c2179
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:00007ffd5baf5b78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f69cb128023 RCX: 00007f69cb0c2179
RDX: 0000200000000900 RSI: 00000000c138fd09 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000011 R09: 00007ffd5baf5ca8
R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffd5baf5c98
R13: 0000000000000002 R14: 00007f69cb152ca0 R15: 0000000000000002
 </TASK>
---[ end trace ]---
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/md/dm-verity-target.c:1759:6
shift exponent 66 is too large for 64-bit type 'sector_t' (aka 'unsigned long long')
CPU: 0 UID: 0 PID: 313 Comm: syz-executor208 Not tainted syzkaller #0 ff996278633adec6fd25d1632b496761701c4fe9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 dump_stack+0x19/0x20 lib/dump_stack.c:129
 ubsan_epilogue+0xe/0x40 lib/ubsan.c:231
 __ubsan_handle_shift_out_of_bounds+0x36d/0x400 lib/ubsan.c:468
 verity_ctr+0x128b/0x1d00 drivers/md/dm-verity-target.c:1759
 dm_table_add_target+0x59f/0xcb0 drivers/md/dm-table.c:760
 populate_table drivers/md/dm-ioctl.c:1494 [inline]
 table_load+0x2eb/0x7d0 drivers/md/dm-ioctl.c:1536
 ctl_ioctl drivers/md/dm-ioctl.c:2107 [inline]
 dm_ctl_ioctl+0x8f3/0xde0 drivers/md/dm-ioctl.c:2129
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0x123/0x1b0 fs/ioctl.c:892
 __x64_sys_ioctl+0x7f/0xa0 fs/ioctl.c:892
 x64_sys_call+0x1878/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f69cb0c2179
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:00007ffd5baf5b78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f69cb128023 RCX: 00007f69cb0c2179
RDX: 0000200000000900 RSI: 00000000c138fd09 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000011 R09: 00007ffd5baf5ca8
R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffd5baf5c98
R13: 0000000000000002 R14: 00007f69cb152ca0 R15: 0000000000000002
 </TASK>
---[ end trace ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/09 00:19 android16-6.12 3962e99d7c73 5cecaf1f .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust UBSAN: shift-out-of-bounds in verity_ctr
* Struck through repros no longer work on HEAD.