From: Justin Tee <justintee8345@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: jsmart833426@gmail.com, justin.tee@broadcom.com,
Justin Tee <justintee8345@gmail.com>
Subject: [PATCH v2 01/14] lpfc: Fix use-after-free in lpfc_cmpl_ct_cmd_vmid
Date: Fri, 5 Jun 2026 11:23:23 -0700 [thread overview]
Message-ID: <20260605182336.134919-2-justintee8345@gmail.com> (raw)
In-Reply-To: <20260605182336.134919-1-justintee8345@gmail.com>
In lpfc_cmpl_ct_cmd_vmid, there is an early call to lpfc_ct_free_iocb when
cmd is SLI_CTAS_DALLAPP_ID. Within lpfc_ct_free_iocb the
cmdiocb->rsp_dmabuf will be freed. This means any ctrsp ptr dereference
for SLI_CT_RESPONSE_FS_RJT or even ctrsp->ReasonCode and ctrsp->Explanation
when handling a CT LS_RJT response is a use-after-free.
Remove the early lpfc_ct_free_iocb call for SLI_CTAS_DALLAPP_ID. There
already is a free_res label that calls lpfc_ct_free_iocb so there doesn't
need to be an early lpfc_ct_free_iocb at the start of
lpfc_cmpl_ct_cmd_vmid.
Signed-off-by: Justin Tee <justintee8345@gmail.com>
---
drivers/scsi/lpfc/lpfc_ct.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index c7853e7fe071..e14170550e69 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -3595,8 +3595,6 @@ lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
int i;
cmd = be16_to_cpu(ctcmd->CommandResponse.bits.CmdRsp);
- if (cmd == SLI_CTAS_DALLAPP_ID)
- lpfc_ct_free_iocb(phba, cmdiocb);
if (lpfc_els_chk_latt(vport) || get_job_ulpstatus(phba, rspiocb)) {
if (cmd != SLI_CTAS_DALLAPP_ID)
--
2.38.0
next prev parent reply other threads:[~2026-06-05 17:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 18:23 [PATCH v2 00/14] Update lpfc to revision 15.0.0.1 Justin Tee
2026-06-05 18:23 ` Justin Tee [this message]
2026-06-05 18:23 ` [PATCH v2 02/14] lpfc: Early return out of lpfc_els_abort when HBA_SETUP flag is not set Justin Tee
2026-06-08 15:14 ` Ewan Milne
2026-06-05 18:23 ` [PATCH v2 03/14] lpfc: Fix kernel oops when unmapping scsi dma buffers for an aborted cmd Justin Tee
2026-06-05 18:23 ` [PATCH v2 04/14] lpfc: Check fc4_xpt_flags before decrementing ndlp kref on FDISC error Justin Tee
2026-06-05 18:23 ` [PATCH v2 05/14] lpfc: Add handling for when PLOGI or PRLI is dropped during link failure Justin Tee
2026-06-05 18:23 ` [PATCH v2 06/14] lpfc: Fix ndlp use-after-free during repeated RSCN and rediscovery sequence Justin Tee
2026-06-05 18:23 ` [PATCH v2 07/14] lpfc: Rework I/O flush ordering when unloading driver Justin Tee
2026-06-05 18:23 ` [PATCH v2 08/14] lpfc: Improve PLOGI retry handling for large SAN configurations Justin Tee
2026-06-05 18:23 ` [PATCH v2 09/14] lpfc: Send inhibited ABORT_WQE when PLOGI CQE SEQUENCE_TMO is received Justin Tee
2026-06-05 18:23 ` [PATCH v2 10/14] lpfc: Remove slowpath cqe process limiter in slow ring event handler Justin Tee
2026-06-05 18:23 ` [PATCH v2 11/14] lpfc: Put iocbq on phba->txq when ELS WQ is full or ELS SGL unavailable Justin Tee
2026-06-05 18:23 ` [PATCH v2 12/14] lpfc: Update ELS ACC logging for diagnostic troubleshooting Justin Tee
2026-06-05 18:23 ` [PATCH v2 13/14] lpfc: Refactor calls on fc_disctmo to lpfc_set_disctmo in RSCN handler Justin Tee
2026-06-05 18:23 ` [PATCH v2 14/14] lpfc: Update lpfc version to 15.0.0.1 Justin Tee
2026-07-12 1:24 ` [PATCH v2 00/14] Update lpfc to revision 15.0.0.1 Ewan Milne
2026-07-12 18:05 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260605182336.134919-2-justintee8345@gmail.com \
--to=justintee8345@gmail.com \
--cc=jsmart833426@gmail.com \
--cc=justin.tee@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.