scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 15 Sep 2016 13:44:56 +0000 (16:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Oct 2016 10:26:55 +0000 (12:26 +0200)
commit24040922827859d1d69597c3bc0c31fad523fd21
tree9e278ad9f6b703ad5a702c9bb9f3727574c2d7cd
parentffb3c7a99a15a7644c2fc632d6474a1e4c0c800c
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()

commit 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 upstream.

We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.

Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/arcmsr/arcmsr_hba.c