linux/drivers/message/fusion
Tomas Henzl 2485b6afad scsi: mptscsih: Fix read sense data size
[ Upstream commit afe89f115e ]

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: Stanislav Saner <ssaner@redhat.com>
Signed-off-by: Stanislav Saner <ssaner@redhat.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-16 08:16:36 +02:00
..
lsi scsi: message: fusion: fix a few trivial spelling mistakes 2018-09-11 21:18:06 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mptbase.c scsi: message: fusion: Use kmemdup instead of memcpy and kmalloc 2019-06-18 19:46:24 -04:00
mptbase.h fusion: remove dead MTRR code 2015-06-13 08:44:14 -07:00
mptctl.c scsi: mptfusion: Fix double fetch bug in ioctl 2020-01-23 08:22:35 +01:00
mptctl.h
mptdebug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mptfc.c scsi: flip the default on use_clustering 2018-12-18 23:13:12 -05:00
mptlan.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mptlan.h scsi: mptlan: Remove linux/miscdevice.h from mptlan.h 2017-01-05 00:21:12 -05:00
mptsas.c scsi: mptfusion: fix indentation issues 2019-03-19 17:17:08 -04:00
mptsas.h mptfusion: combine fw_event_work and its event_data 2014-07-25 17:16:58 -04:00
mptscsih.c scsi: mptscsih: Fix read sense data size 2020-07-16 08:16:36 +02:00
mptscsih.h scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
mptspi.c scsi: mptfusion: remove set, but not used, variables 2019-03-19 17:19:36 -04:00