All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yehyeong Lee" <yhlee@isslab.korea.ac.kr>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2 3/4] IB/isert: finish a Reject the target core allocated itself
Date: Wed, 18 Nov 2026 11:54:13 +0000	[thread overview]
Message-ID: <sashiko-outbox-220849@kernel.org> (raw)
In-Reply-To: <20261118113905.2361969-4-yhlee@isslab.korea.ac.kr>

> iscsit_add_reject() builds the Reject from a command of its own, with
> iscsit_allocate_cmd(), and iscsit_allocate_cmd() zeroes sizeof(struct
> iscsit_cmd) plus the transport's priv_size.  For iSER that zeroes struct
> isert_cmd too, so conn, iscsit_cmd and rx_desc are all NULL where
> isert_allocate_cmd() would have filled them in.  The command then reaches
> the tx thread like any other, and two things go wrong with it.
> 
> isert_put_reject() hands the NULL descriptor to isert_post_recv(), which
> dereferences it.  One PDU after login is enough:
> iscsit_check_dataout_hdr() answers a Data-Out whose DataSegmentLength
> exceeds conn_ops->MaxXmitDataSegmentLength that way, and it does so
> before it looks the ITT up, so there is no SCSI command involved.  With
> TargetRecvDataSegmentLength negotiated down to 512 and one Data-Out
> declaring and carrying 1024 bytes, 5 boots out of 5:
> 
> [ ... ]
> 
> Link: https://lore.kernel.org/all/20220311175713.2344960-2-djeffery@redhat.com/
> Fixes: 4366b19ca5eb ("iser-target: Change the recv buffers posting logic")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118113905.2361969-1-yhlee@isslab.korea.ac.kr?part=3


  reply	other threads:[~2026-11-18 11:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 11:39 [PATCH v2 0/4] isert: the commands the target core allocates itself Yehyeong Lee
2026-11-18 11:39 ` [PATCH v2 1/4] scsi: target: iscsi: match a NOP-In by opcode as well as by tag Yehyeong Lee
2026-11-18 12:07   ` sashiko-bot
2026-11-18 11:39 ` [PATCH v2 2/4] scsi: target: iscsi: do not arm the nopin timer on an iSER connection Yehyeong Lee
2026-11-18 12:01   ` sashiko-bot
2026-11-18 11:39 ` [PATCH v2 3/4] IB/isert: finish a Reject the target core allocated itself Yehyeong Lee
2026-11-18 11:54   ` sashiko-bot [this message]
2026-11-18 11:39 ` [PATCH v2 4/4] IB/isert: do not leak the receive descriptor of a dropped Data-Out Yehyeong Lee
2026-11-18 11:46   ` sashiko-bot
2026-11-18 21:16 ` [PATCH v2 0/4] isert: the commands the target core allocates itself Yehyeong Lee

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=sashiko-outbox-220849@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 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.