* [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG
@ 2025-04-23 20:21 syzbot
2025-04-23 21:47 ` syztest Arnaud Lecomte
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2025-04-23 20:21 UTC (permalink / raw)
To: jfs-discussion, linux-kernel, shaggy, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 8560697b23dc Merge tag '6.15-rc2-smb3-client-fixes' of git..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=133fbbac580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a31f7155996562
dashboard link: https://syzkaller.appspot.com/bug?extid=cffd18309153948f3c3e
compiler: Debian clang version 15.0.6, Debian LLD 15.0.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14708c70580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=115dd204580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-8560697b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2acea3e6b668/vmlinux-8560697b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d2542a0d2bcd/bzImage-8560697b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2b4250dbd0ba/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=10708c70580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
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 ]---
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 3+ messages in thread
* syztest
2025-04-23 20:21 [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG syzbot
@ 2025-04-23 21:47 ` Arnaud Lecomte
2025-04-23 22:10 ` [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG syzbot
0 siblings, 1 reply; 3+ messages in thread
From: Arnaud Lecomte @ 2025-04-23 21:47 UTC (permalink / raw)
To: syzbot+cffd18309153948f3c3e
Cc: jfs-discussion, linux-kernel, shaggy, syzkaller-bugs
#syz test
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1385,6 +1385,12 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results)
(1 << (L2LPERCTL - (bmp->db_agheight << 1))) / bmp->db_agwidth;
ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1));
+ if (ti >= le32_to_cpu(dcp->nleafs)) {
+ jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmapctl page: ti out of bounds\n");
+ release_metapage(mp);
+ return -EIO;
+ }
+
/* dmap control page trees fan-out by 4 and a single allocation
* group may be described by 1 or 2 subtrees within the ag level
* dmap control page, depending upon the ag size. examine the ag's
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG
2025-04-23 21:47 ` syztest Arnaud Lecomte
@ 2025-04-23 22:10 ` syzbot
0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2025-04-23 22:10 UTC (permalink / raw)
To: contact, jfs-discussion, linux-kernel, shaggy, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
Tested-by: syzbot+cffd18309153948f3c3e@syzkaller.appspotmail.com
Tested on:
commit: a79be02b Fix mis-uses of 'cc-option' for warning disab..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=120ae574580000
kernel config: https://syzkaller.appspot.com/x/.config?x=45c3bf6fd4cb6a10
dashboard link: https://syzkaller.appspot.com/bug?extid=cffd18309153948f3c3e
compiler: Debian clang version 15.0.6, Debian LLD 15.0.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=1252e574580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-23 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-23 20:21 [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG syzbot
2025-04-23 21:47 ` syztest Arnaud Lecomte
2025-04-23 22:10 ` [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome