]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit65b05d5d35a42f06bd3fac96799d01b84d5842d4
treecd7347571fe23bb83e1be6fec87c5d7ad54d6d90
parent5812e81ed870d65d82b5af18f0f8833324a9b0bc
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