From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Weiming Shi <bestswngs@gmail.com>
Cc: Xiang Mei <xmei5@asu.edu>,
linux-i2c@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] i2c: smbus: reject oversized block transfers in the common path
Date: Mon, 4 May 2026 14:02:43 +0200 [thread overview]
Message-ID: <afiK49_aMEZYDQAg@ninjato> (raw)
In-Reply-To: <20260330042622.2608889-1-bestswngs@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
Hi,
thank you for fixing this issue!
> + if (data && (protocol == I2C_SMBUS_BLOCK_DATA ||
> + protocol == I2C_SMBUS_BLOCK_PROC_CALL ||
> + protocol == I2C_SMBUS_I2C_BLOCK_DATA) &&
> + data->block[0] > I2C_SMBUS_BLOCK_MAX)
> + return -EINVAL;
Like with your other patch, we should also reject if the length is 0.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-05-04 12:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 4:26 [PATCH v2] i2c: smbus: reject oversized block transfers in the common path Weiming Shi
2026-05-04 12:02 ` Wolfram Sang [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=afiK49_aMEZYDQAg@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=bestswngs@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xmei5@asu.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.