All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernard Metzler <bernard.metzler@linux.dev>
To: Jiwoong Wi <dwdnlzj@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	linux-rdma@vger.kernel.org, bobtobabz@gmail.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] RDMA/siw: avoid exposing kernel addresses in Read requests
Date: Sat, 5 Dec 2026 13:32:25 +0100	[thread overview]
Message-ID: <56da6164-38ba-4e4d-9f8b-a3fda693cec6@linux.dev> (raw)
In-Reply-To: <20261203064152.16095-1-dwdnlzj@gmail.com>

On 03.12.2026 07:41, Jiwoong Wi wrote:
> Resending as plain text; the previous copy was rejected by the mailing
> lists because it contained an HTML part.
> 
> Hi Bernard,
> 
> No validation is bypassed. In this case, the RPC-over-RDMA server
> initiates the RDMA Read, and the client supplies the data. To
> reconstruct an RPC Call containing a Read chunk, svc_rdma_recvfrom()
> invokes svc_rdma_process_read_list(), which posts the RDMA Read before
> the complete RPC Call can reach svc_authenticate().
> 
> Without this patch, SIW constructs the RREQUEST with the local sink SGE
> address in SinkTO, so the peer sees that address in the request. The
> peer returns the same SinkTO in the RRESPONSE, and
> siw_rresp_check_ntoh() accepts it normally. The address is therefore
> visible in the RREQUEST itself; no validation needs to be bypassed.
> 
> By "unauthenticated", I meant only that RPC authentication had not yet
> run. I agree with Leon that SIW is used for controlled testing, so this
> does not establish a practical untrusted-peer threat. My original
> description overstated the security impact.
> 
> The patch was intended only as hardening to avoid placing a kernel
> virtual address on the wire, not as a fix for a practical
> untrusted-peer attack. If this is not considered useful for SIW, I am
> happy to withdraw it.
> 
> Thanks,
> Jiwoong

Hi Jiwoong, I now understand your issue.

Implementing the RFC 5040 suite, siw intentionally aims at exposing
all memory addresses at the wire. It was built with the intent of
having a test RDMA provider enabling easy debugging of communication
patterns, including buffer addresses.

You are right that in a typical client/server setting, the server side
uses READs to limit its exposure to client side (avoiding client
WRITEs which would need sink addresses at server side to be exposed
to the client).

RFC5040 leaves it open, if the RREQ/RRESP target offset represents a
plain buffer address or an byte offset from the start of a registered
buffer. Using an offset and not a plain address is a sensible option.
Nailing that offset to 0 is simply wrong, since the initiator of that
READ may want to receive the RRESP to somewhere else within its buffer
than its start.

Thanks,
Bernard.

      reply	other threads:[~2026-12-05 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  6:13 [PATCH] RDMA/siw: avoid exposing kernel addresses in Read requests Jiwoong Wi
2026-11-30  6:24 ` sashiko-bot
2026-12-02  8:16 ` Leon Romanovsky
2026-12-02 14:49 ` Bernard Metzler
2026-12-03  6:41   ` Jiwoong Wi
2026-12-05 12:32     ` Bernard Metzler [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=56da6164-38ba-4e4d-9f8b-a3fda693cec6@linux.dev \
    --to=bernard.metzler@linux.dev \
    --cc=bobtobabz@gmail.com \
    --cc=dwdnlzj@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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.