Home
last modified time | relevance | path

Searched hist:"690 b2549" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/i2c/busses/
H A Di2c-ismt.c690b2549 Thu Jun 02 06:02:18 CDT 2022 Dan Carpenter <dan.carpenter@oracle.com> i2c: ismt: prevent memory corruption in ismt_access()

The "data->block[0]" variable comes from the user and is a number
between 0-255. It needs to be capped to prevent writing beyond the end
of dma_buffer[].

Fixes: 5e9a97b1f449 ("i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL")
Reported-and-tested-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>