syzbot


UBSAN: array-index-out-of-bounds in dbAllocDmapLev

Status: fixed on 2023/10/12 12:48
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+853a6f4dfa3cf37d3aea@syzkaller.appspotmail.com
Fix commit: 4e302336d5ca fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
First crash: 452d, last: 278d
Cause bisection: failed (error log, bisect log)
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.15 20/23] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev 1 (1) 2023/07/24 01:23
[PATCH AUTOSEL 6.1 38/41] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev 1 (1) 2023/07/24 01:21
[PATCH AUTOSEL 6.4 55/58] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev 1 (1) 2023/07/24 01:13
[PATCH] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev 2 (2) 2023/06/22 15:59
[syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocDmapLev 0 (1) 2022/12/23 10:23
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in dbAllocDmapLev jfs C 1 380d 444d 0/1 upstream: reported C repro on 2022/12/30 09:33
linux-4.19 KASAN: slab-out-of-bounds Read in dbAllocDmapLev jfs C error 1 441d 441d 0/1 upstream: reported C repro on 2023/01/02 11:38
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/06/21 17:13 19m yogi.kernel@gmail.com patch upstream OK log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2023/06/02 17:38 49m bisect fix upstream job log (0) log
2023/05/03 13:57 1h04m bisect fix upstream job log (0) log
2023/04/02 17:35 41m bisect fix upstream job log (0) log
2023/03/03 16:49 45m bisect fix upstream job log (0) log
2023/02/01 10:24 51m bisect fix upstream job log (0) log

Sample crash report:
loop0: detected capacity change from 0 to 32768
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:1965:6
index -84 is out of range for type 's8[341]' (aka 'signed char[341]')
CPU: 1 PID: 4995 Comm: syz-executor146 Not tainted 6.4.0-rc6-syzkaller-00037-gb6dad5178cea #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_out_of_bounds+0x11c/0x150 lib/ubsan.c:348
 dbAllocDmapLev+0x3e5/0x430 fs/jfs/jfs_dmap.c:1965
 dbAllocCtl+0x113/0x920 fs/jfs/jfs_dmap.c:1809
 dbAllocAG+0x28f/0x10b0 fs/jfs/jfs_dmap.c:1350
 dbAlloc+0x658/0xca0 fs/jfs/jfs_dmap.c:874
 dtSplitUp fs/jfs/jfs_dtree.c:974 [inline]
 dtInsert+0xda7/0x6b00 fs/jfs/jfs_dtree.c:863
 jfs_create+0x7b6/0xbb0 fs/jfs/namei.c:137
 lookup_open fs/namei.c:3492 [inline]
 open_last_lookups fs/namei.c:3560 [inline]
 path_openat+0x13df/0x3170 fs/namei.c:3788
 do_filp_open+0x234/0x490 fs/namei.c:3818
 do_sys_openat2+0x13f/0x500 fs/open.c:1356
 do_sys_open fs/open.c:1372 [inline]
 __do_sys_openat fs/open.c:1388 [inline]
 __se_sys_openat fs/open.c:1383 [inline]
 __x64_sys_openat+0x247/0x290 fs/open.c:1383
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1f4e33f7e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc21129578 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1f4e33f7e9
RDX: 000000000000275a RSI: 0000000020000040 RDI: 00000000ffffff9c
RBP: 00007f1f4e2ff080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1f4e2ff110
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
================================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/14 17:27 upstream b6dad5178cea d2ee9228 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dbAllocDmapLev
2022/12/22 20:35 upstream 0a924817d2ed 9da18ae8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbAllocDmapLev
* Struck through repros no longer work on HEAD.