syzbot


UBSAN: shift-out-of-bounds in dbAlloc (2)

Status: fixed on 2023/12/21 03:45
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+debee9ab7ae2b34b0307@syzkaller.appspotmail.com
Fix commit: 525b861a0081 fs/jfs: Add check for negative db_l2nbperpage
First crash: 455d, last: 455d
Discussions (11)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 4.14 3/9] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:54
[PATCH AUTOSEL 4.19 03/11] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:54
[PATCH AUTOSEL 5.4 03/12] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:53
[PATCH AUTOSEL 5.10 04/16] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:52
[PATCH AUTOSEL 5.15 06/22] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:51
[PATCH AUTOSEL 6.1 09/30] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:49
[PATCH AUTOSEL 6.5 10/34] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:47
[PATCH AUTOSEL 6.6 12/36] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/11/07 15:45
[PATCH v2] fs/jfs: Add check for negative db_l2nbperpage 4 (4) 2023/10/03 23:27
[PATCH] fs/jfs: Add check for negative db_l2nbperpage 1 (1) 2023/10/02 09:45
[syzbot] [jfs?] UBSAN: shift-out-of-bounds in dbAlloc (2) 0 (1) 2023/09/18 18:15
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in dbAlloc jfs C error error 111 670d 808d 0/28 auto-obsoleted due to no activity on 2023/06/12 03:31

Sample crash report:
loop3: detected capacity change from 0 to 32768
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12
shift exponent -16777216 is negative
CPU: 1 PID: 16087 Comm: syz-executor.3 Not tainted 6.6.0-rc1-syzkaller-00072-gaed8aee11130 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_shift_out_of_bounds+0x27a/0x600 lib/ubsan.c:387
 dbAlloc.cold+0x33/0x38 fs/jfs/jfs_dmap.c:799
 diNewExt+0x736/0x1a70 fs/jfs/jfs_imap.c:2252
 diAllocExt fs/jfs/jfs_imap.c:1946 [inline]
 diAllocAG+0x1707/0x2330 fs/jfs/jfs_imap.c:1663
 diAlloc+0x893/0x1a00 fs/jfs/jfs_imap.c:1584
 ialloc+0x8e/0xa70 fs/jfs/jfs_inode.c:56
 jfs_mkdir+0x240/0xb00 fs/jfs/namei.c:225
 vfs_mkdir+0x532/0x7e0 fs/namei.c:4120
 do_mkdirat+0x2a9/0x330 fs/namei.c:4143
 __do_sys_mkdirat fs/namei.c:4158 [inline]
 __se_sys_mkdirat fs/namei.c:4156 [inline]
 __x64_sys_mkdirat+0x115/0x170 fs/namei.c:4156
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe9b047b5e7
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe9b124eee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe9b047b5e7
RDX: 00000000000001ff RSI: 00000000200016c0 RDI: 00000000ffffff9c
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200016c0
R13: 00007fe9b124ef40 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
================================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/14 18:11 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in dbAlloc
* Struck through repros no longer work on HEAD.