mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-13 07:31:07 +00:00
i2c: amd-asf: Validate firmware-reported length
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. Signed-off-by: Paritosh Potukuchi <paritosh.potukuchi@amd.com> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260612101815.4124804-1-paritosh.potukuchi@amd.com
This commit is contained in:
parent
3ca8d1ec9a
commit
b2f4816a37
1 changed files with 4 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue