[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230809212340.25242-1-magnani@ieee.org>
Date: Wed, 9 Aug 2023 16:23:40 -0500
From: Steve Magnani <magnani@...e.org>
To: Nilesh Javali <njavali@...vell.com>,
Quinn Tran <qutran@...vell.com>
Cc: linux-kernel@...r.kernel.org,
GR-QLogic-Storage-Upstream@...vell.com,
Himanshu Madhani <himanshu.madhani@...cle.com>,
linux-scsi@...r.kernel.org, "Steven J. Magnani" <magnani@...e.org>
Subject: [PATCH] scsi: qla2xxx: Fix overrun of PLOGI ELS template
From: "Steven J. Magnani" <magnani@...e.org>
The code to save off values retrieved from the card firmware copies one
dword too many.
This patch depends on reversion of b68710a8094:
https://lore.kernel.org/linux-scsi/20230807120958.3730-10-njavali@marvell.com/
Fixes: 44f5a37d1e3e ("scsi: qla2xxx: Fix buffer-buffer credit extraction error")
Signed-off-by: "Steven J. Magnani" <magnani@...e.org>
---
--- a/drivers/scsi/qla2xxx/qla_init.c 2023-08-07 03:46:21.727114453 -0500
+++ b/drivers/scsi/qla2xxx/qla_init.c 2023-08-09 15:18:46.475286995 -0500
@@ -5549,7 +5549,7 @@ qla_get_login_template(scsi_qla_host_t *vha)
__be32 *q;
memset(ha->init_cb, 0, ha->init_cb_size);
- sz = min_t(int, sizeof(struct fc_els_flogi), ha->init_cb_size);
+ sz = min_t(int, LOGIN_TEMPLATE_SIZE, ha->init_cb_size);
rval = qla24xx_get_port_login_templ(vha, ha->init_cb_dma,
ha->init_cb, sz);
if (rval != QLA_SUCCESS) {
------------------------------------------------------------------------
Steven J. Magnani "I claim this network for MARS!
Earthling, return my space modulator!"
#include <standard.disclaimer>
Powered by blists - more mailing lists