[PATCH] i2c: s3c24xx: check the size of the SMBUS message before using it
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Thu Mar 26 01:39:07 PDT 2026
On Wed, Mar 25, 2026 at 06:17:58PM +0100, Andi Shyti wrote:
> Hi Greg,
>
> On Mon, Feb 23, 2026 at 06:05:15PM +0100, Greg Kroah-Hartman wrote:
> > The first byte of an i2c SMBUS message is the size, and it should be
> > verified to ensure that it is in the range of 0..I2C_SMBUS_BLOCK_MAX
> > before processing it.
> >
> > This is the same logic that was added in commit a6e04f05ce0b ("i2c:
> > tegra: check msg length in SMBUS block read") to the i2c tegra driver.
> >
> > Cc: Krzysztof Kozlowski <krzk at kernel.org>
> > Cc: Alim Akhtar <alim.akhtar at samsung.com>
> > Cc: Andi Shyti <andi.shyti at kernel.org>
> > Cc: stable <stable at kernel.org>
> > Assisted-by: gkh_clanker_2000
> > Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
>
> merged to i2c/i2c-host.
Thanks!
More information about the linux-arm-kernel
mailing list