Files
linux/drivers
Dan Carpenter 24c6fc6e74 i2c: ismt: prevent memory corruption in ismt_access()
commit 690b2549b1 upstream.

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: 5e9a97b1f4 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06 08:43:37 +02:00
..
2022-05-25 09:57:36 +02:00
2022-05-09 09:14:44 +02:00
2021-11-18 19:16:08 +01:00
2022-06-06 08:43:36 +02:00
2022-03-08 19:12:41 +01:00
2022-04-13 20:59:11 +02:00
2022-04-13 20:59:01 +02:00
2021-12-22 09:32:39 +01:00