From: Mike Christie <michael.christie@oracle.com>
To: Yehyeong Lee <yhlee@isslab.korea.ac.kr>,
lduncan@suse.com, cleech@redhat.com,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com
Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH] scsi: libiscsi: validate the ITT reflected in a Reject PDU
Date: Tue, 6 Oct 2026 19:00:48 -0500 [thread overview]
Message-ID: <55388f95-80e5-4b44-a939-5b1ec16f8432@oracle.com> (raw)
In-Reply-To: <20260803104149.2114414-1-yhlee@isslab.korea.ac.kr>
On 8/3/26 5:41 AM, Yehyeong Lee wrote:
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 160f02f2f51d..d881f4dc47b4 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -1147,8 +1147,11 @@ static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
> * Our nop as ping got dropped. We know the target
> * and transport are ok so just clean up
> */
> - task = iscsi_itt_to_task(conn, rejected_pdu.itt);
> - if (!task) {
> + task = NULL;
Just do this a couple lines before the comment when we declare the variable.
> + if (!iscsi_verify_itt(conn, rejected_pdu.itt))
> + task = iscsi_itt_to_task(conn, rejected_pdu.itt);
> + if (!task || task->state == ISCSI_TASK_FREE ||
> + task->sc) {
> iscsi_conn_printk(KERN_ERR, conn,
> "Invalid pdu reject. Could "
> "not lookup rejected task.\n");
> --
> 2.43.0
>
prev parent reply other threads:[~2026-10-07 0:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 10:41 Yehyeong Lee
2026-10-07 0:00 ` Mike Christie [this message]
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=55388f95-80e5-4b44-a939-5b1ec16f8432@oracle.com \
--to=michael.christie@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=James.Bottomley@suse.de \
--cc=cleech@redhat.com \
--cc=lduncan@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=open-iscsi@googlegroups.com \
--cc=stable@vger.kernel.org \
--cc=yhlee@isslab.korea.ac.kr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®