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-30 11:37:26 -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-26 12:32:41 -07:00
2022-05-13 13:19:01 +02:00
2022-05-31 09:56:54 -07:00
2022-05-15 18:31:28 -06:00
2022-05-27 18:06:49 -07:00
2022-05-29 11:38:27 -07:00
2022-05-26 10:50:30 -07:00
2022-05-30 15:33:42 +02:00
2022-05-23 19:18:51 +02:00
2022-05-28 11:27:17 -07:00
2022-05-20 12:30:53 -07:00
2022-05-16 13:37:59 -07:00
2022-05-19 19:32:19 +02:00
2022-05-29 11:38:27 -07:00
2022-05-25 16:18:27 -07:00
2022-05-23 19:32:59 -07:00
2022-05-23 07:48:27 +02:00
2022-05-26 12:32:41 -07:00
2022-05-28 11:15:54 -07:00
2022-06-01 13:49:15 -07:00
2022-05-25 16:18:27 -07:00
2022-05-26 10:04:57 +00:00
2022-05-22 12:25:55 -07:00
2022-06-02 08:40:56 -07:00
2022-05-17 22:34:42 +02:00
2022-05-24 16:19:30 -07:00
2022-05-26 21:08:40 -07:00
2022-05-28 14:05:54 -07:00
2022-05-31 09:56:54 -07:00
2022-05-26 14:51:38 -07:00
2022-05-24 22:08:10 +02:00
2022-05-22 15:58:30 +10:00
2022-05-24 08:08:24 -05:00
2022-06-01 14:25:04 -07:00
2022-05-25 12:22:58 -07:00
2022-05-30 11:37:26 -07:00
2022-05-23 15:08:04 +01: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-19 17:54:02 -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-06-01 10:25:06 -07:00
2022-05-23 21:06:11 -07:00
2022-05-28 11:15:54 -07:00
2022-05-30 11:01:50 -07:00
2022-05-22 23:03:29 +02:00
2022-05-23 19:18:51 +02:00
2022-05-24 11:39:54 -07:00
2022-05-20 16:40:01 +02:00
2022-05-25 14:38:29 +02: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-05-30 11:37:26 -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-30 11:34:13 -07:00
2022-05-31 09:56:54 -07:00
2022-05-27 11:22:03 -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-18 12:33:51 -04:00
2022-05-30 12:46:49 -07:00
2022-05-25 13:56:57 -07:00
2022-05-13 07:20:13 -07:00
2022-05-21 10:09:31 +02:00
2022-05-25 19:18:36 -07:00