From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Manas Ghandat <ghandatmanas@gmail.com>, liushixin2@huawei.com
Cc: jfs-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Linux-kernel-mentees@lists.linuxfoundation.org,
syzbot+91ad2b52815a08caf4ea@syzkaller.appspotmail.com
Subject: Re: [PATCH] jfs : fix shift-out-of-bounds in dbUpdatePMap
Date: Tue, 29 Aug 2023 12:49:42 -0500 [thread overview]
Message-ID: <edf10660-2e8a-4f5b-8eb5-16038f8adbcf@oracle.com> (raw)
In-Reply-To: <20230827050513.364567-1-ghandatmanas@gmail.com>
On 8/27/23 12:05AM, Manas Ghandat wrote:
> Currently there is no bound check for number of logical blocks per
> page (bmp->db_l2nbperpage). Added the required bound check for the
> calculation of dmap.
This should already be fixed by 11509910c599 ("jfs: jfs_dmap: Validate
db_l2nbperpage while mounting")
Can you please verify if this problem still exists in v6.5?
Shaggy
>
> Reported-by: syzbot+91ad2b52815a08caf4ea@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=91ad2b52815a08caf4ea
> Fixes: 4d81715fc5df ("[PATCH] fs/jfs: Conversion to generic boolean")
> Signed-off-by: Manas Ghandat <ghandatmanas@gmail.com>
> ---
> fs/jfs/jfs_dmap.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
> index a3eb1e826947..6a5df296fdc8 100644
> --- a/fs/jfs/jfs_dmap.c
> +++ b/fs/jfs/jfs_dmap.c
> @@ -467,6 +467,10 @@ dbUpdatePMap(struct inode *ipbmap,
> lastlblkno = 0;
> for (rem = nblocks; rem > 0; rem -= nblks, blkno += nblks) {
> /* get the buffer for the current dmap. */
> +
> + if (bmp->db_l2nbperpage > L2BPERDMAP)
> + return -EIO;
> +
> lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage);
> if (lblkno != lastlblkno) {
> if (mp) {
next prev parent reply other threads:[~2023-08-29 17:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 5:05 Manas Ghandat
2023-08-29 17:49 ` Dave Kleikamp [this message]
2023-08-30 16:58 ` Manas Ghandat
2023-08-30 20:20 ` Dave Kleikamp
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=edf10660-2e8a-4f5b-8eb5-16038f8adbcf@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=Linux-kernel-mentees@lists.linuxfoundation.org \
--cc=ghandatmanas@gmail.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=liushixin2@huawei.com \
--cc=syzbot+91ad2b52815a08caf4ea@syzkaller.appspotmail.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®