提交 9638b67b 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: sep: potential buffer overflow in ioctl

tail_size is determined by several variables that come from the user
so we should verify that it's not too large.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 23226977
......@@ -2120,6 +2120,8 @@ static int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep,
}
}
if (tail_size) {
if (tail_size > sizeof(dcb_table_ptr->tail_data))
return -EINVAL;
if (is_kva == true) {
memcpy(dcb_table_ptr->tail_data,
(void *)(app_in_address + data_in_size -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册