All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: liuyong <pkfxxxing@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v4] RDMA/srpt: Prevent uninitialized read buffer disclosure
Date: Thu, 12 Nov 2026 10:07:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-210923@kernel.org> (raw)
In-Reply-To: <20261112094138.1390409-1-pkfxxxing@gmail.com>

> From: Yong Liu <pkfxxxing@gmail.com>
> 
> SRPT allocates read buffers and creates RDMA contexts from the
> initiator's descriptors before parsing the CDB. When target core reduces
> cmd->data_length, a backend such as rd_mcp fills only the shorter
> length, but the prebuilt RDMA transfer still sends the full buffer.
> Control CDB handlers can also leave bytes within cmd->data_length
> unwritten, while target core only clears the first SG entry of these
> preallocated buffers. Both cases can disclose stale target kernel memory
> to a remote initiator with access to the LUN.
> 
> Reject indirect descriptor tables whose direct descriptor lengths do not
> sum to the advertised total before allocating RDMA contexts. Also
> initialize commands rejected during descriptor parsing so the BUSY
> response path has valid callbacks and a command reference.
> 
> Save the original buffer length and zero the entire control read buffer
> before command execution. For data READs, zero any tail beyond
> cmd->data_length before posting the existing RDMA transfers. Synchronize
> each mapped SG list for device access in the response path.
> 
> The issue was discovered by Qihoo 360's Tulongfeng multi-agent system.
> 
> Fixes: b99f8e4d7bcd ("IB/srpt: convert to the generic RDMA READ/WRITE API")
> Fixes: 8b8807b9e982 ("scsi: RDMA/srpt: Fix handling of command / TMF submission failure")
> Cc: stable@vger.kernel.org
> Suggested-by: Bart Van Assche <bvanassche@acm.org>
> Signed-off-by: Yong Liu <pkfxxxing@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112094138.1390409-1-pkfxxxing@gmail.com?part=1


  reply	other threads:[~2026-11-12 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  3:08 [PATCH 0/1] RDMA/srpt: Fix read underflow information disclosure liuyong
2026-11-10  3:08 ` [PATCH 1/1] RDMA/srpt: Limit read data transfers to the command length liuyong
2026-11-10  3:33   ` sashiko-bot
2026-11-10  5:28   ` [PATCH v2] " liuyong
2026-11-10  5:48     ` sashiko-bot
2026-11-11  0:54     ` Bart Van Assche
2026-11-11  6:28       ` liuyong
2026-11-11  6:53     ` [PATCH v3] RDMA/srpt: Prevent uninitialized read buffer disclosure liuyong
2026-11-11  7:27       ` sashiko-bot
2026-11-12  9:41       ` [PATCH v4] " liuyong
2026-11-12 10:07         ` sashiko-bot [this message]
2026-11-12 21:33         ` 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-210923@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=pkfxxxing@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.