From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+dca05492eff41f604890@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbSplit
Date: Sat, 27 Jul 2024 09:08:11 +0800 [thread overview]
Message-ID: <tencent_2D67C43CF3361A96A4367A4BA874E776DB09@qq.com> (raw)
In-Reply-To: <00000000000064c7a0061e2004d6@google.com>
check dmt_leafidx < 0
#syz test: upstream 7846b618e0a4
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index cb3cda1390ad..516bac758053 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2976,6 +2976,8 @@ static int dbFindLeaf(dmtree_t *tp, int l2nb, int *leafidx, bool is_ctl)
*/
assert(n < 4);
}
+ if (le32_to_cpu(tp->dmt_leafidx) > LPERDMAP)
+ return -ENOSPC;
/* set the return to the leftmost leaf describing sufficient
* free space.
next prev parent reply other threads:[~2024-07-27 1:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 5:45 syzbot
2024-07-26 13:40 ` Edward Adam Davis
2024-07-26 17:18 ` syzbot
2024-07-26 14:22 ` [PATCH] jfs: check if dmt_leafidx is less than zero Edward Adam Davis
2024-07-26 14:52 ` [Jfs-discussion] " Dave Kleikamp
2024-07-27 1:42 ` [PATCH V2] jfs: check if leafidx greater than num leaves per dmap tree Edward Adam Davis
2024-08-23 18:30 ` Dave Kleikamp
2024-08-24 1:25 ` [PATCH V3] " Edward Adam Davis
2024-08-27 16:23 ` Dave Kleikamp
2024-07-27 1:08 ` Edward Adam Davis [this message]
2024-07-27 1:32 ` [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbSplit 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=tencent_2D67C43CF3361A96A4367A4BA874E776DB09@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+dca05492eff41f604890@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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®