]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix oops due to overrun when reading SLI3 data
authorDick Kennedy <dick.kennedy@broadcom.com>
Tue, 30 Jun 2020 21:49:52 +0000 (14:49 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Jul 2020 03:06:36 +0000 (23:06 -0400)
commit59da697bf95e46a762ebdf886bb41832c0071683
tree3de8e2316eac1b5f779e4b83a77c9b1ef4442d16
parenteab85d30f79a558bae6b68e8ce3849d71acc6083
scsi: lpfc: Fix oops due to overrun when reading SLI3 data

When using DUMP on SLI3 to read VPD and Port status data (config region
23), the adapter is overruning the kmalloc'd buffer causing havoc on other
consumers of the allocation pools.

Rework the loops processing the dump data and validate/size memory lengths
before performing bcopy.

Link: https://lore.kernel.org/r/20200630215001.70793-6-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c