From: Jeongjun Park <aha310510@gmail.com>
To: syzbot+13e8cd4926977f8337b6@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [jfs?] UBSAN: shift-out-of-bounds in extAlloc (2)
Date: Sat, 1 Jun 2024 12:00:28 +0900 [thread overview]
Message-ID: <20240601030028.22250-1-aha310510@gmail.com> (raw)
In-Reply-To: <0000000000002e9eb506178cdd71@google.com>
please test shift-out-of-bounds in extAlloc
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
fs/jfs/jfs_extent.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c
index 63d21822d309..3d1273d35b13 100644
--- a/fs/jfs/jfs_extent.c
+++ b/fs/jfs/jfs_extent.c
@@ -316,6 +316,9 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
if (bmp->db_maxfreebud == -1)
return -ENOSPC;
+ if (bmp->db_maxfreebud >= sizeof(s64) * 8 - 1)
+ return -EINVAL;
+
max = (s64) 1 << bmp->db_maxfreebud;
if (*nblocks >= max && *nblocks > nbperpage)
nb = nblks = (max > nbperpage) ? max : nbperpage;
--
2.34.1
next prev parent reply other threads:[~2024-06-01 3:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 13:40 [syzbot] [jfs?] UBSAN: shift-out-of-bounds in extAlloc (2) syzbot
2024-05-31 11:06 ` Jeongjun Park
2024-05-31 18:18 ` syzbot
2024-06-01 0:29 ` Changheon LEE
2024-06-01 2:56 ` Jeongjun Park
2024-06-01 3:00 ` Jeongjun Park [this message]
2024-06-01 3:31 ` syzbot
2025-09-28 2:54 ` Forwarded: " syzbot
[not found] <87zfafi8w9.fsf@gmail.com>
2025-09-28 3:16 ` 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=20240601030028.22250-1-aha310510@gmail.com \
--to=aha310510@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+13e8cd4926977f8337b6@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