syzbot


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

Status: upstream: reported C repro on 2024/12/09 11:51
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+615942eeb2884c9896c4@syzkaller.appspotmail.com
First crash: 12d, last: 9d19h
Bug presence (2)
Date Name Commit Repro Result
2024/12/10 linux-6.1.y (ToT) e4d90d63d385 C [report] UBSAN: array-index-out-of-bounds in dbAdjTree
2024/12/10 upstream (ToT) 7cb1b4663150 C Didn't crash
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: array-index-out-of-bounds in dbAdjTree jfs C error error 41 340d 817d 25/28 fixed on 2024/01/30 15:47
linux-5.15 UBSAN: array-index-out-of-bounds in dbAdjTree origin:lts-only C 7 8d16h 47d 0/3 upstream: reported C repro on 2024/11/04 07:07
upstream UBSAN: array-index-out-of-bounds in dbAdjTree (2) jfs C inconclusive 77 32d 217d 28/28 fixed on 2024/12/16 09:50
linux-4.14 KASAN: slab-out-of-bounds Read in dbAdjTree C 3 664d 811d 0/1 upstream: reported C repro on 2022/10/03 00:17
linux-4.19 KASAN: use-after-free Read in dbAdjTree C error 5 665d 782d 0/1 upstream: reported C repro on 2022/10/31 14:16

Sample crash report:
loop0: detected capacity change from 0 to 32768
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2902:18
index -3 is out of range for type 's8[1365]' (aka 'signed char[1365]')
CPU: 1 PID: 4246 Comm: syz-executor465 Not tainted 6.1.119-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_out_of_bounds+0x118/0x140 lib/ubsan.c:282
 dbAdjTree+0x377/0x520 fs/jfs/jfs_dmap.c:2902
 dbAllocBits+0x4e5/0x9a0 fs/jfs/jfs_dmap.c:2193
 dbAllocDmap+0x6d/0x150 fs/jfs/jfs_dmap.c:2034
 dbAlloc+0x505/0xc90 fs/jfs/jfs_dmap.c:816
 extBalloc fs/jfs/jfs_extent.c:326 [inline]
 extAlloc+0x4f4/0x1000 fs/jfs/jfs_extent.c:122
 jfs_get_block+0x417/0xe50 fs/jfs/inode.c:248
 __block_write_begin_int+0x544/0x1a30 fs/buffer.c:1991
 __block_write_begin fs/buffer.c:2041 [inline]
 block_write_begin+0x98/0x1f0 fs/buffer.c:2102
 jfs_write_begin+0x2d/0x60 fs/jfs/inode.c:304
 generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3845
 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3973
 generic_file_write_iter+0xab/0x310 mm/filemap.c:4005
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x857/0xbc0 fs/read_write.c:584
 ksys_write+0x19c/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1b721cf9f9
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:00007ffd1f697cb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffd1f697e88 RCX: 00007f1b721cf9f9
RDX: 00000000fffffcf8 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 00007f1b72252610 R08: 000000002001a240 R09: 00007ffd1f697e88
R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd1f697e78 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
================================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/09 23:28 linux-6.1.y e4d90d63d385 9ac0fdc6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in dbAdjTree
2024/12/12 05:33 linux-6.1.y e4d90d63d385 6f1b0fa8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in dbAdjTree
2024/12/09 22:52 linux-6.1.y e4d90d63d385 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in dbAdjTree
2024/12/09 11:50 linux-6.1.y e4d90d63d385 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in dbAdjTree
* Struck through repros no longer work on HEAD.