From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Ghanshyam Agrawal <ghanshyam1898@gmail.com>,
osmtendev@gmail.com, ghandatmanas@gmail.com, eadavis@qq.com
Cc: jfs-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
syzbot+5f7f0caf9979e9d09ff8@syzkaller.appspotmail.com
Subject: Re: [PATCH] jfs: fix array-index-out-of-bounds in dtInsertEntry
Date: Tue, 29 Oct 2024 18:03:44 -0500 [thread overview]
Message-ID: <fa5dd074-0045-4f37-894f-861081f4cfdd@oracle.com> (raw)
In-Reply-To: <20241010134351.1884580-1-ghanshyam1898@gmail.com>
On 10/10/24 8:43AM, Ghanshyam Agrawal wrote:
> The value of p->header.freelist can be less than zero which
> causes an error in dtInsertEntry. Added a check in dtInsert
> to address it.
>
> Reported-by: syzbot+5f7f0caf9979e9d09ff8@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=5f7f0caf9979e9d09ff8
> Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Looks good. I'll apply this one.
> ---
> 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 5d3127ca68a4..51bb3e14551b 100644
> --- a/fs/jfs/jfs_dtree.c
> +++ b/fs/jfs/jfs_dtree.c
> @@ -834,7 +834,7 @@ int dtInsert(tid_t tid, struct inode *ip,
> * the full page.
> */
> DT_GETSEARCH(ip, btstack->top, bn, mp, p, index);
> - if (p->header.freelist == 0)
> + if (p->header.freelist <= 0)
> return -EINVAL;
>
> /*
next prev parent reply other threads:[~2024-10-29 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 13:43 Ghanshyam Agrawal
2024-10-29 23:03 ` Dave Kleikamp [this message]
2024-10-30 21:39 ` Dave Kleikamp
2024-10-31 1:58 ` Ghanshyam Agrawal
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=fa5dd074-0045-4f37-894f-861081f4cfdd@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=eadavis@qq.com \
--cc=ghandatmanas@gmail.com \
--cc=ghanshyam1898@gmail.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=osmtendev@gmail.com \
--cc=syzbot+5f7f0caf9979e9d09ff8@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®