From: Andi Shyti <andi.shyti@kernel.org>
To: Wei Chen <harperchen1110@gmail.com>
Cc: andi.shyti@kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3] i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer()
Date: Tue, 14 Mar 2023 17:45:06 +0100 [thread overview]
Message-ID: <20230314164506.mp5himopvx6zzt7n@intel.intel> (raw)
In-Reply-To: <20230314160416.2813398-1-harperchen1110@gmail.com>
Hi Wei,
On Tue, Mar 14, 2023 at 04:04:16PM +0000, Wei Chen wrote:
> The data->block[0] variable comes from user and is a number between
> 0-255. Without proper check, the variable may be very large to cause
> an out-of-bounds when performing memcpy in slimpro_i2c_blkwr.
>
> Fix this bug by checking the value of writelen.
>
> Fixes: f6505fbabc42 ("i2c: add SLIMpro I2C device driver on APM X-Gene platform")
> Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
PS Remember the Cc: tag
prev parent reply other threads:[~2023-03-14 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 16:04 [PATCH v3] i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() Wei Chen
2023-03-14 16:45 ` Andi Shyti [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=20230314164506.mp5himopvx6zzt7n@intel.intel \
--to=andi.shyti@kernel.org \
--cc=harperchen1110@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.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