Dan Carpenter 690b2549b1 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>
2022-06-02 08:40:56 -07:00
..
2022-05-31 09:56:54 -07:00
2022-05-23 14:14:50 -07:00
2022-05-31 09:56:54 -07:00
2022-05-31 09:56:54 -07:00
2022-05-15 18:31:28 -06:00
2022-05-29 11:38:27 -07:00
2022-05-26 10:50:30 -07:00
2022-05-28 11:27:17 -07:00
2022-05-29 11:38:27 -07:00
2022-05-25 16:18:27 -07:00
2022-06-01 13:49:15 -07:00
2022-05-25 16:18:27 -07:00
2022-05-24 16:19:30 -07:00
2022-05-26 21:08:40 -07:00
2022-05-31 09:56:54 -07:00
2022-05-26 14:51:38 -07:00
2022-05-25 12:22:58 -07:00
2022-05-28 11:27:17 -07:00
2022-05-30 10:56:18 -07:00
2022-05-24 15:13:30 -07:00
2022-06-01 13:49:15 -07:00
2022-05-27 21:24:19 -07:00
2022-05-26 21:08:40 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-05-31 09:56:54 -07:00
2022-05-23 21:06:11 -07:00
2022-05-30 11:01:50 -07:00
2022-05-22 23:03:29 +02:00
2022-05-24 11:39:54 -07:00
2022-06-01 14:48:13 -07:00
2022-06-01 13:49:15 -07:00
2022-05-28 11:39:01 -07:00
2022-06-01 10:30:18 -07:00
2022-05-25 16:55:16 -07:00
2022-05-25 19:09:48 -07:00
2022-05-26 10:32:47 -07:00
2022-05-31 09:56:54 -07:00
2022-05-30 11:30:16 -07:00
2022-05-18 12:31:31 -04:00
2022-06-01 13:49:15 -07:00
2022-05-25 13:56:57 -07:00
2022-05-25 19:18:36 -07:00