Skip to content
Commit e720e0c4 authored by Tomas Henzl's avatar Tomas Henzl Committed by Paul Gortmaker
Browse files

scsi: mptscsih: Fix read sense data size

commit afe89f11 upstream.

The sense data buffer in sense_buf_pool is allocated with size of
MPT_SENSE_BUFFER_ALLOC(64) (multiplied by req_depth) while SNS_LEN(sc)(96)
is used when reading the data.  That may lead to a read from unallocated
area, sometimes from another (unallocated) page.  To fix this, limit the
read size to MPT_SENSE_BUFFER_ALLOC.

Link: https://lore.kernel.org/r/20200616150446.4840-1-thenzl@redhat.com


Co-developed-by: default avatarStanislav Saner <ssaner@redhat.com>
Signed-off-by: default avatarStanislav Saner <ssaner@redhat.com>
Signed-off-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent b2ebdb18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment