syzbot


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

Status: upstream: reported C repro on 2025/04/23 20:21
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
First crash: 4d22h, last: 4d22h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] jfs: upper bound check of tree index in dbAllocAG 1 (1) 2025/04/23 22:13
[syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG 1 (3) 2025/04/23 22:10
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in dbAllocAG jfs 2 330d 356d 0/28 auto-obsoleted due to no activity on 2024/09/06 03:29
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/04/23 21:47 21m contact@arnaud-lcm.com patch upstream OK log

Sample crash report:
loop0: detected capacity change from 0 to 32768
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:1397:14
index 65877 is out of range for type 's8[1365]' (aka 'signed char[1365]')
CPU: 0 UID: 0 PID: 5308 Comm: syz-executor181 Not tainted 6.15.0-rc2-syzkaller-00404-g8560697b23dc #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 ubsan_epilogue lib/ubsan.c:231 [inline]
 __ubsan_handle_out_of_bounds+0x121/0x150 lib/ubsan.c:453
 dbAllocAG+0x704/0x1130 fs/jfs/jfs_dmap.c:1397
 dbAlloc+0x65c/0xcb0 fs/jfs/jfs_dmap.c:873
 xtSplitUp+0x554/0x21c0 fs/jfs/jfs_xtree.c:745
 xtInsert+0x5ba/0x11a0 fs/jfs/jfs_xtree.c:593
 extAlloc+0xae7/0x10a0 fs/jfs/jfs_extent.c:150
 jfs_get_block+0x41d/0xe60 fs/jfs/inode.c:248
 get_more_blocks fs/direct-io.c:648 [inline]
 do_direct_IO fs/direct-io.c:936 [inline]
 __blockdev_direct_IO+0x1add/0x4540 fs/direct-io.c:1243
 blockdev_direct_IO include/linux/fs.h:3422 [inline]
 jfs_direct_IO+0xf7/0x1e0 fs/jfs/inode.c:331
 generic_file_direct_write+0x1e8/0x400 mm/filemap.c:4037
 __generic_file_write_iter+0x126/0x230 mm/filemap.c:4206
 generic_file_write_iter+0x10e/0x5e0 mm/filemap.c:4246
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x70f/0xd10 fs/read_write.c:684
 ksys_write+0x19d/0x2d0 fs/read_write.c:736
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2346650b59
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007fffd3c588a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0073746e6576652e RCX: 00007f2346650b59
RDX: 00000000fffffdaf RSI: 0000200000000000 RDI: 0000000000000005
RBP: 652e79726f6d656d R08: 00005555682c24c0 R09: 00005555682c24c0
R10: 00005555682c24c0 R11: 0000000000000206 R12: 00007fffd3c588d0
R13: 00007fffd3c58af8 R14: 431bde82d7b634db R15: 00007f234669903b
 </TASK>
---[ end trace ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/19 20:12 upstream 8560697b23dc 2a20f901 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root UBSAN: array-index-out-of-bounds in dbAllocAG
* Struck through repros no longer work on HEAD.