SCSI: megaraid: missing bounds check in mimd_to_kioc()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 30 Oct 2013 17:13:51 +0000 (20:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 May 2014 04:52:11 +0000 (21:52 -0700)
commit8d6b283d97db2d4d8fb6d1b8cfc630906f883f2f
tree59dcc5524f81101a5f4be1636faf19386b0fc1b7
parente623c2cdb5b9151e1ca8c846e2814977ba4dfcac
SCSI: megaraid: missing bounds check in mimd_to_kioc()

commit 3de2260140417759c669d391613d583baf03b0cf upstream.

pthru32->dataxferlen comes from the user so we need to check that it's
not too large so we don't overflow the buffer.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/megaraid/megaraid_mm.c