scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input
authorJames Smart <jsmart2021@gmail.com>
Fri, 1 Jul 2022 21:14:15 +0000 (14:14 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jul 2022 21:21:43 +0000 (17:21 -0400)
commitf8191d40aa612981ce897e66cda6a88db8df17bb
treecd7347571fe23bb83e1be6fec87c5d7ad54d6d90
parent4ecc9b0271a7623deabcbe8fcb39f065701d8f74
scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input

Malformed user input to debugfs results in buffer overflow crashes.  Adapt
input string lengths to fit within internal buffers, leaving space for NULL
terminators.

Link: https://lore.kernel.org/r/20220701211425.2708-3-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_debugfs.c