diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-10-29 10:20:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 17:23:57 -0800 |
commit | 9638b67ba25b4a008767fca3b6f52d24400a8d1d (patch) | |
tree | 64b97208e939b96f83ef2409a5687d3d95be4697 /drivers/staging/sep | |
parent | 23226977e9421434a2e7e384219477199ca5f0ec (diff) | |
download | linux-9638b67ba25b4a008767fca3b6f52d24400a8d1d.tar.gz linux-9638b67ba25b4a008767fca3b6f52d24400a8d1d.tar.bz2 linux-9638b67ba25b4a008767fca3b6f52d24400a8d1d.zip |
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: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep')
-rw-r--r-- | drivers/staging/sep/sep_driver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 8ac3faea2d2f..e624e2874902 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -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 - |