Robin Gong
bd73dfabdd
dmaengine: imx-sdma: fix size check for sdma script_number
...
Illegal memory will be touch if SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3
(41) exceed the size of structure sdma_script_start_addrs(40),
thus cause memory corrupt such as slob block header so that kernel
trap into while() loop forever in slob_free(). Please refer to below
code piece in imx-sdma.c:
for (i = 0; i < sdma->script_number; i++)
if (addr_arr[i] > 0)
saddr_arr[i] = addr_arr[i]; /* memory corrupt here */
That issue was brought by commit a572460be9cf ("dmaengine: imx-sdma: Add
support for version 3 firmware") because SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3
(38->41 3 scripts added) not align with script number added in
sdma_script_start_addrs(2 scripts).
Fixes: a572460be9cf ("dmaengine: imx-sdma: Add support for version 3 firmware")
Cc: stable@vger.kernel
Link: https://www.spinics.net/lists/arm-kernel/msg754895.html
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reported-by: Jurgen Lambrecht <J.Lambrecht@TELEVIC.com>
Link: https://lore.kernel.org/r/1569347584-3478-1-git-send-email-yibin.gong@nxp.com
[vkoul: update the patch title]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2019-10-14 13:33:44 +05:30
..
2019-05-30 11:26:28 -07:00
2019-07-09 09:47:22 -07:00
2019-06-19 17:09:55 +02:00
2019-09-09 21:19:22 +03:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:25:18 -07:00
2019-05-24 17:36:45 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:29:22 -07:00
2019-05-24 17:36:47 +02:00
2019-05-21 11:28:46 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:08 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-19 17:09:55 +02:00
2019-09-12 16:20:54 +02:00
2019-09-23 19:37:49 -07:00
2019-09-02 11:33:42 +01:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:30:29 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-10-14 13:33:44 +05:30
2019-07-17 09:55:43 -07:00
2019-08-14 15:36:22 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:07 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-09-12 10:07:44 +01:00
2019-07-09 09:07:00 -07:00
2019-06-05 17:37:15 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:16 +02:00
2019-07-15 21:10:39 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:19 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:53 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-08-09 17:37:09 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:12 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:36:45 +02:00
2019-05-21 11:28:39 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-03 23:55:47 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-08-05 11:08:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:41 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-07-31 14:13:13 -06:00
2019-06-05 17:37:18 +02:00
2019-05-21 11:28:39 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-09-04 14:34:31 +02:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:07 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:36:45 +02:00
2019-05-02 10:37:59 +09:00
2019-07-04 17:35:07 +01:00
2019-05-30 11:29:19 -07:00
2019-05-21 11:28:45 +02:00
2019-05-30 11:29:19 -07:00
2019-06-19 17:09:55 +02:00
2019-08-26 08:33:24 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:26:37 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 10:14:50 +02:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:26:41 -07:00
2019-05-23 09:33:57 -07:00
2019-05-09 16:39:27 -07:00
2019-06-05 17:36:37 +02:00