Re: [PATCH] i2c: amd-asf: Validate firmware-reported length

From: Andi Shyti

Date: Wed Jun 17 2026 - 19:38:39 EST


Hi Paritosh,

On Fri, Jun 12, 2026 at 10:18:15AM +0000, Paritosh Potukuchi wrote:
> The firmware may sometimes return a length greater than the
> allocated buffer size, which can lead to out-of-bounds access
> and a kernel panic.
>
> Currently, the driver does not validate the length read from
> firmware.
>
> Add a check to ensure the firmware-reported length stays within
> the bounds of the data buffer.
>
> Fix indentation issues reported by checkpatch.
>
> Signed-off-by: Paritosh Potukuchi <paritosh.potukuchi@xxxxxxx>

merged to i2c/i2c-for-7.2

Thanks,
Andi