Commit 0711f19
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: c72be4b ("scsi: mpt3sas: Add support for MCTP Passthrough commands")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 8a9b76b commit 0711f19
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3017 | 3017 | | |
3018 | 3018 | | |
3019 | 3019 | | |
3020 | | - | |
| 3020 | + | |
3021 | 3021 | | |
3022 | 3022 | | |
3023 | 3023 | | |
| |||
0 commit comments