Linux RDMA and InfiniBand development
 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] RDMA/srpt: bound the indirect descriptor table and widen the counters
Date: Wed, 21 Oct 2026 00:23:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-179634@kernel.org> (raw)
In-Reply-To: <20261021001854.2343027-1-yhlee@isslab.korea.ac.kr>

> srpt_get_desc_tbl() bounds the number of indirect data buffer descriptors
> by the two counts the initiator put in the SRP_CMD, and both are u8, so it
> admits an nbufs of up to 510:
> 
> 	if (nbufs >
> 	    (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) {
> 		...
> 		return -EINVAL;
> 	}
> 
> Nothing checks that the header and those nbufs entries are inside the
> information unit that was received.  srpt_alloc_rw_ctxs() walks
> idb->desc_list for nbufs entries ending at
> 
> 	sizeof(struct srp_cmd) + (srp_cmd->add_cdb_len & ~3) +
> [ ... ]
> that fit the IU are accepted with every context freed again.
> 
> Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
> 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/20261021001854.2343027-1-yhlee@isslab.korea.ac.kr?part=1


  reply	other threads:[~2026-10-21  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  0:18 [PATCH v2] RDMA/srpt: bound the indirect descriptor table and widen the counters Yehyeong Lee
2026-10-21  0:23 ` sashiko-bot [this message]
2026-10-21 16:58 ` Bart Van Assche

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-179634@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox