]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:33 +0000 (11:18 +0200)
commitfa1649b0dc0f72d589dfcf40e49256965c6d0bf0
treebc9aa029e4a57e12b49dc954af234e71ab00a3f3
parent745365ad50a1ae2560b1c207a7bd2c8f2a857266
scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input

[ Upstream commit 65b05d5d35a42f06bd3fac96799d01b84d5842d4 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_debugfs.c