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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Sep 2016 13:58:25 +0000 (09:58 -0400)
commit7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
treee075d49871cb515e0d967fb11c39440309ae8d8e
parent38247feb60512a52c4f847933f8f931284dc21f4
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()

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

Cc: <stable@vger.kernel.org>
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>
drivers/scsi/arcmsr/arcmsr_hba.c