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 v5 1/3] RDMA/srpt: bound the indirect descriptor table to the IU
Date: Sun, 25 Oct 2026 02:04:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-183974@kernel.org> (raw)
In-Reply-To: <20261025013748.3755639-2-yhlee@isslab.korea.ac.kr>

> srpt_get_desc_tbl() takes the number of INDIRECT descriptors from
> idb->table_desc.len, which the initiator controls, and checks it only
> against data_out_desc_cnt + data_in_desc_cnt, two more initiator fields.
> Both are u8, so the pair admits up to 510 descriptors, and nothing
> compares the table against the receive IU it has to live in.
> srpt_alloc_rw_ctxs() then walks idb->desc_list for that many entries.
> 
> With the default srp_max_req_size of 8276 the table fits as long as the
> additional CDB is short, but ADDITIONAL CDB LENGTH is an initiator field
> too, and at its maximum of 252 bytes 510 descriptors end at
> 48 + 252 + 20 + 510 * 16 = 8480, which is past the end of the object.
> 
>   BUG: KASAN: slab-out-of-bounds in srpt_alloc_rw_ctxs+0x631/0x870
>   Read of size 4 at addr ffff888002d6a05c by task kunit_try_catch/43
> 
> [ ... ]
> offset and covers the header as well.
> 
> 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/20261025013748.3755639-1-yhlee@isslab.korea.ac.kr?part=1


  reply	other threads:[~2026-10-25  2:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25  1:37 [PATCH v5 0/3] RDMA/srpt: fix the descriptor table checks and the context counters Yehyeong Lee
2026-10-25  1:37 ` [PATCH v5 1/3] RDMA/srpt: bound the indirect descriptor table to the IU Yehyeong Lee
2026-10-25  2:04   ` sashiko-bot [this message]
2026-10-25  1:37 ` [PATCH v5 2/3] RDMA/srpt: reject zero-length buffer descriptors Yehyeong Lee
2026-10-25  1:58   ` sashiko-bot
2026-10-25  1:37 ` [PATCH v5 3/3] RDMA/srpt: widen the indirect RDMA context counters Yehyeong Lee
2026-10-25  1:58   ` sashiko-bot
2026-10-25 14:25 ` [PATCH v5 0/3] RDMA/srpt: fix the descriptor table checks and the " 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-183974@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.