syzbot


UBSAN: shift-out-of-bounds in dbDiscardAG

Status: upstream: reported on 2024/08/11 07:51
Reported-by: syzbot+44479088a2c9bdc8e2a7@syzkaller.appspotmail.com
First crash: 40d, last: 38d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 UBSAN: shift-out-of-bounds in dbDiscardAG 1 540d 540d 0/3 auto-obsoleted due to no activity on 2023/07/28 02:34
upstream UBSAN: shift-out-of-bounds in dbDiscardAG jfs C unreliable 5 76d 91d 27/28 fixed on 2024/08/14 03:44
linux-6.1 UBSAN: shift-out-of-bounds in dbDiscardAG (2) origin:lts-only C 5 33d 38d 0/3 upstream: reported C repro on 2024/08/13 22:03

Sample crash report:
loop4: detected capacity change from 0 to 32768
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:1697:18
shift exponent -1 is negative
CPU: 0 PID: 19749 Comm: syz.4.5904 Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
 dbDiscardAG+0x5a3/0xa10 fs/jfs/jfs_dmap.c:1697
 jfs_ioc_trim+0x42f/0x660 fs/jfs/jfs_discard.c:100
 jfs_ioctl+0x2ac/0x3a0 fs/jfs/ioctl.c:132
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe2ccc3a9f9
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:00007fe2cb0b7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe2ccdd6f80 RCX: 00007fe2ccc3a9f9
RDX: 0000000020000180 RSI: 00000000c0185879 RDI: 0000000000000004
RBP: 00007fe2ccca88ee R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe2ccdd6f80 R15: 00007ffe01328f78
 </TASK>
================================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/13 21:31 linux-5.15.y 7e89efd3ae1c f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in dbDiscardAG
2024/08/13 21:31 linux-5.15.y 7e89efd3ae1c f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in dbDiscardAG
2024/08/11 07:50 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in dbDiscardAG
* Struck through repros no longer work on HEAD.