summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2020-01-27 16:23:07 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:14:33 +0200
commitb4ba41c88d2cf52c97e3defd13ea6b909646a310 (patch)
tree4cf3fd0eb647e03f0b3187c2c4218d66cba5750d /drivers/gpu
parent1ae009aa225732321223bd96d656e07ecf42bf16 (diff)
scsi: lpfc: Fix coverity errors in fmdi attribute handling
[ Upstream commit 4cb9e1ddaa145be9ed67b6a7de98ca705a43f998 ] Coverity reported a memory corruption error for the fdmi attributes routines: CID 15768 [Memory Corruption] Out-of-bounds access on FDMI Sloppy coding of the fmdi structures. In both the lpfc_fdmi_attr_def and lpfc_fdmi_reg_port_list structures, a field was placed at the start of payload that may have variable content. The field was given an arbitrary type (uint32_t). The code then uses the field name to derive an address, which it used in things such as memset and memcpy. The memset sizes or memcpy lengths were larger than the arbitrary type, thus coverity reported an error. Fix by replacing the arbitrary fields with the real field structures describing the payload. Link: https://lore.kernel.org/r/20200128002312.16346-8-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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions