public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Alex Guo <alexguo1023@gmail.com>
Cc: andi.shyti@kernel.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: i801: Fix out-of-bounds bug
Date: Mon, 16 Jun 2025 10:46:44 +0200	[thread overview]
Message-ID: <20250616104644.2066693e@endymion> (raw)
In-Reply-To: <20250615232857.491602-1-alexguo1023@gmail.com>

Hi Alex,

On Sun, 15 Jun 2025 19:28:57 -0400, Alex Guo wrote:
> The data->block[0] variable comes from user. Without proper check,
> the variable may be very large to cause an out-of-bounds bug.
> 
> Fix this bug by checking the value of data->block[0] first.

This check is already present in i801_smbus_block_transaction(), which
is the only place where i801_block_transaction_by_block() is being
called. So the out-of-bounds bug you describe does not exist.

-- 
Jean Delvare
SUSE L3 Support

      reply	other threads:[~2025-06-16  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-15 23:28 [PATCH] i2c: i801: Fix out-of-bounds bug Alex Guo
2025-06-16  8:46 ` Jean Delvare [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=20250616104644.2066693e@endymion \
    --to=jdelvare@suse.de \
    --cc=alexguo1023@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@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