Re: [syzbot] Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dtDelete

From: syzbot
Date: Thu Apr 17 2025 - 23:26:05 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.

***

Subject: Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dtDelete
Author: richard120310@xxxxxxxxx

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e3a854b577cb

Signed-off-by: I Hsin Cheng <richard120310@xxxxxxxxx>
---
fs/jfs/jfs_dtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 8f85177f284b..0a209b30686a 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -2130,7 +2130,7 @@ int dtDelete(tid_t tid,
stbl = DT_GETSTBL(np);
ldtentry =
(struct ldtentry *) & np->
- slot[stbl[0]];
+ slot[stbl[0] % np->header.maxslot];
next_index =
le32_to_cpu(ldtentry->index);
DT_PUTPAGE(nmp);
--
2.43.0