mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Chris Leech <cleech@redhat.com>,
	Mike Christie <michael.christie@oracle.com>,
	Lee Duncan <lduncan@suse.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	HyeongJun An <sammiee5311@gmail.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi: libiscsi_tcp: bound SCSI Response data segment to the connection buffer
Date: Tue, 28 Jul 2026 22:56:16 -0400	[thread overview]
Message-ID: <178529373834.132455.4134024360463248995.b4-ty@oracle.com> (raw)
In-Reply-To: <20260716065848.1653431-1-sammiee5311@gmail.com>

On Thu, 16 Jul 2026 15:58:48 +0900, HyeongJun An wrote:

> iscsi_tcp_hdr_dissect() receives the data segment of several PDU types
> into the fixed-size conn->data buffer, which is allocated for
> ISCSI_DEF_MAX_RECV_SEG_LEN (8192) bytes.  For the LOGIN_RSP, TEXT_RSP,
> REJECT and ASYNC_EVENT opcodes the dissect path already rejects a PDU
> whose DataSegmentLength exceeds that buffer.
> 
> The SCSI Command Response (ISCSI_OP_SCSI_CMD_RSP) path also copies its
> data segment (sense/response data) into conn->data via
> iscsi_tcp_data_recv_prep(), but it does so without the same check.  The
> only upstream bound on in.datalen is conn->max_recv_dlength, the
> initiator's advertised MaxRecvDataSegmentLength, which is commonly
> negotiated well above 8192 (open-iscsi defaults to 262144).  A target
> that returns a SCSI Response with a DataSegmentLength between 8193 and
> max_recv_dlength therefore overflows the 8192-byte conn->data buffer.
> 
> [...]

Applied to 7.2/scsi-fixes, thanks!

[1/1] scsi: libiscsi_tcp: bound SCSI Response data segment to the connection buffer
      https://git.kernel.org/mkp/scsi/c/c1dea15f819c

-- 
Martin K. Petersen

      parent reply	other threads:[~2026-07-29  2:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10  5:06 [PATCH] " HyeongJun An
2026-07-16  6:26 ` Chris Leech
2026-07-16  6:58 ` [PATCH v2] " HyeongJun An
2026-07-16 13:50   ` Chris Leech
2026-07-29  2:56   ` Martin K. Petersen [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=178529373834.132455.4134024360463248995.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=cleech@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michael.christie@oracle.com \
    --cc=open-iscsi@googlegroups.com \
    --cc=sammiee5311@gmail.com \
    /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®