From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Manas Ghandat <ghandatmanas@gmail.com>,
dan.carpenter@linaro.org, shaggy@kernel.org
Cc: Linux-kernel-mentees@lists.linuxfoundation.org,
jfs-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, lkp@intel.com,
oe-kbuild-all@lists.linux.dev, oe-kbuild@lists.linux.dev
Subject: Re: [PATCH-v2] jfs: fix slab-out-of-bounds Read in dtSearch
Date: Wed, 1 Nov 2023 10:20:40 -0500 [thread overview]
Message-ID: <e1ec475e-1c98-4437-8152-66487e1ef29b@oracle.com> (raw)
In-Reply-To: <20231025060907.115675-1-ghandatmanas@gmail.com>
On 10/25/23 1:09AM, Manas Ghandat wrote:
> Currently while searching for current page in the sorted entry table
> of the page there is a out of bound access. Added a bound check to fix
> the error.
Looks good. I made the small change of setting rc = -EIO in that case,
so we know there is something wrong with the file system.
Thanks,
Shaggy
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202310241724.Ed02yUz9-lkp@intel.com/
> Signed-off-by: Manas Ghandat <ghandatmanas@gmail.com>
> ---
> V1 -> V2 : Removed redundant check on stbl
>
> fs/jfs/jfs_dtree.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
> index 92b7c533407c..cf67d32d5b7f 100644
> --- a/fs/jfs/jfs_dtree.c
> +++ b/fs/jfs/jfs_dtree.c
> @@ -633,6 +633,9 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
> for (base = 0, lim = p->header.nextindex; lim; lim >>= 1) {
> index = base + (lim >> 1);
>
> + if (stbl[index] < 0)
> + goto out;
> +
> if (p->header.flag & BT_LEAF) {
> /* uppercase leaf name to compare */
> cmp =
prev parent reply other threads:[~2023-11-01 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 6:09 Manas Ghandat
2023-11-01 15:20 ` Dave Kleikamp [this message]
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=e1ec475e-1c98-4437-8152-66487e1ef29b@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=Linux-kernel-mentees@lists.linuxfoundation.org \
--cc=dan.carpenter@linaro.org \
--cc=ghandatmanas@gmail.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=shaggy@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®