Message ID | 20230809212340.25242-1-magnani@ieee.org |
---|---|
State | New |
Headers | show |
Series | scsi: qla2xxx: Fix overrun of PLOGI ELS template | expand |
--- 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) {