From: syzbot <syzbot+1afe7ef2d0062e19eeb3@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: [PATCH] UBSAN: array-index-out-of-bounds in dbFindLeaf (2)
Date: Mon, 14 Sep 2026 05:18:31 -0700 [thread overview]
Message-ID: <6aa7e617.f81106d8.2ab401.004e.GAE@google.com> (raw)
In-Reply-To: <695faa63.050a0220.1c677c.039a.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] UBSAN: array-index-out-of-bounds in dbFindLeaf (2)
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
Reported-by: syzbot+1afe7ef2d0062e19eeb3@syzkaller.appspotmail.com
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index cdfa699cd..53642b1ec 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2971,7 +2971,11 @@ static int dbFindLeaf(dmtree_t *tp, int l2nb, int *leafidx, bool is_ctl)
/* sufficient free space found. move to the next
* level (or quit if this is the last level).
*/
- if (x + n > max_size)
+ /* stree[] holds max_size entries, so max_size is
+ * already one past the last valid index. Use >=
+ * to reject it and avoid an out-of-bounds read.
+ */
+ if (x + n >= max_size)
return -ENOSPC;
if (l2nb <= tp->dmt_stree[x + n])
break;
next prev parent reply other threads:[~2026-09-14 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 13:00 [syzbot] [jfs?] " syzbot
2026-01-08 14:45 ` [PATCH] jfs: fix oob in dbFindLeaf Edward Adam Davis
2026-04-17 10:11 ` Forwarded: [PATCH] jfs: fix off-by-one in dbFindLeaf tree bounds check syzbot
2026-04-17 16:19 ` Forwarded: Re: [syzbot] UBSAN: array-index-out-of-bounds in dbFindLeaf syzbot
2026-09-14 12:18 ` syzbot [this message]
2026-09-15 1:38 ` Forwarded: [PATCH] UBSAN: array-index-out-of-bounds in dbFindLeaf (2) syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6aa7e617.f81106d8.2ab401.004e.GAE@google.com \
--to=syzbot+1afe7ef2d0062e19eeb3@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®