syzbot


UBSAN: shift-out-of-bounds in dbSplit

Status: fixed on 2024/02/09 18:10
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+8c777e17f74c66068ffa@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 801d, last: 345d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] UBSAN: shift-out-of-bounds in dbSplit 1 (3) 2024/02/06 10:16
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 UBSAN: shift-out-of-bounds in dbSplit origin:upstream C 18 23d 240d 0/3 upstream: reported C repro on 2024/04/15 22:11
upstream UBSAN: shift-out-of-bounds in dbSplit (2) jfs C error 403 9d06h 254d 27/28 upstream: reported C repro on 2024/04/01 18:17
linux-5.15 UBSAN: shift-out-of-bounds in dbSplit origin:upstream C error 36 1d09h 240d 0/3 upstream: reported C repro on 2024/04/15 22:09
Last patch testing requests (13)
Created Duration User Patch Repo Result
2024/02/05 17:41 17m retest repro upstream OK log
2024/01/15 21:02 16m retest repro upstream OK log
2024/01/15 16:58 26m retest repro upstream OK log
2024/01/01 15:38 14m retest repro upstream report log
2024/01/01 15:38 14m retest repro upstream report log
2023/11/27 13:40 39m retest repro upstream report log
2023/10/31 01:48 14m retest repro upstream report log
2023/10/13 19:46 36m mushi.shar@gmail.com patch upstream OK log
2023/10/13 19:30 7m mushi.shar@gmail.com patch upstream error
2023/10/10 06:39 14m retest repro upstream report log
2023/09/22 09:15 10m ghandatmanas@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2023/09/18 12:55 12m retest repro upstream report log
2023/08/22 00:08 26m retest repro upstream report log
Fix bisection attempts (9)
Created Duration User Patch Repo Result
2024/02/06 03:45 5h44m bisect fix upstream OK (1) job log
2023/07/31 10:07 1h35m bisect fix upstream OK (0) job log log
2023/06/24 05:38 25m bisect fix upstream OK (0) job log log
2023/05/24 23:08 21m bisect fix upstream OK (0) job log log
2023/04/24 21:29 39m bisect fix upstream OK (0) job log log
2023/03/25 20:54 34m bisect fix upstream OK (0) job log log
2023/02/23 10:40 46m bisect fix upstream OK (0) job log log
2023/01/23 22:23 47m bisect fix upstream OK (0) job log log
2022/11/07 13:46 35m bisect fix upstream OK (0) job log log

Sample crash report:
loop0: detected capacity change from 0 to 32768
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:2639:11
shift exponent 121 is too large for 32-bit type 'int'
CPU: 1 PID: 5063 Comm: syz-executor173 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/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+0x2a6/0x480 lib/ubsan.c:387
 dbSplit.cold+0x19/0x1e fs/jfs/jfs_dmap.c:2639
 dbAllocBits+0x146/0x630 fs/jfs/jfs_dmap.c:2191
 dbAllocDmap+0x5c/0x100 fs/jfs/jfs_dmap.c:2032
 dbAllocDmapLev+0x17a/0x2f0 fs/jfs/jfs_dmap.c:1986
 dbAllocCtl+0x12c/0x7b0 fs/jfs/jfs_dmap.c:1823
 dbAllocAG+0x8c5/0xd20 fs/jfs/jfs_dmap.c:1364
 dbAlloc+0x415/0xaa0 fs/jfs/jfs_dmap.c:888
 dtSplitUp+0x3f3/0x5850 fs/jfs/jfs_dtree.c:974
 dtInsert+0x872/0xb00 fs/jfs/jfs_dtree.c:863
 jfs_create+0x63c/0xb40 fs/jfs/namei.c:137
 lookup_open.isra.0+0x1095/0x13b0 fs/namei.c:3477
 open_last_lookups fs/namei.c:3546 [inline]
 path_openat+0x922/0x2c50 fs/namei.c:3776
 do_filp_open+0x1de/0x430 fs/namei.c:3809
 do_sys_openat2+0x176/0x1e0 fs/open.c:1440
 do_sys_open fs/open.c:1455 [inline]
 __do_sys_open fs/open.c:1463 [inline]
 __se_sys_open fs/open.c:1459 [inline]
 __x64_sys_open+0x154/0x1e0 fs/open.c:1459
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f4cc51b09b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc3c5e0fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007ffc3c5e11c8 RCX: 00007f4cc51b09b9
RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000020000400
RBP: 00007f4cc5229610 R08: 00000000000060cc R09: 0000000000000000
R10: 00007ffc3c5e0eb0 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc3c5e11b8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
================================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/05 21:24 upstream bee0e7762ad2 f819d6f7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in dbSplit
2022/10/08 06:31 upstream 4c86114194e6 0de35f24 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in dbSplit
2023/12/18 15:31 upstream ceb6a6f023fd 3222d10c .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root UBSAN: shift-out-of-bounds in dbSplit
2023/09/04 12:38 upstream 708283abf896 696ea0d2 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in dbSplit
2022/10/02 17:40 upstream b357fd1c2afc feb56351 .config strace log report syz C [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in dbSplit
2023/09/04 12:18 upstream 708283abf896 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in dbSplit
2023/02/23 20:54 linux-next 0222aa9800b2 9e2ebb3c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in dbSplit
* Struck through repros no longer work on HEAD.