Commit 0711f196 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

scsi: mpt3sas: Fix buffer overflow in mpt3sas_send_mctp_passthru_req()



The "sz" argument in mpt3sas_check_cmd_timeout() is the number of u32, not
the number of bytes.  We dump that many u32 values to dmesg.  Passing the
number of bytes will lead to a read overflow.  Divide by 4 to get the
correct value.

Fixes: c72be4b5 ("scsi: mpt3sas: Add support for MCTP Passthrough commands")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/02b0d4ff-961c-49ae-921a-5cc469edf93c@stanley.mountain


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8a9b76b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment