From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.147 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796473960; b=rVgiWhBgJB+sTB483s2iFQxZHLx1EsL8na2DNGK0Z/3a2X6/N2JhiM7YID6cM51CpF+P tx7fSC6CHk8zDVxIetIsqhv8xulClzCNrCNufS2Zt1vu9hZjkofTNPS0rNQJpSHMZo9ug n7uPtV4dKUO6GFiRvJxYE57IMJgj4FcTBMNBuJ2CYeqWDglYeg+sL7Au99OZkhd/YMNSC z52dW9oH+5DSgWWsayli/8uxX0SqLNcLqmVlNfFwVjlqiwzrW3wcE623J/koE+OTWPPO8 RSWjOQCyhwOCIGyX/DLiGEbMqosO2yDpEbLVl1SxV3r1Jsy9kK62Q3ucaGNsF2ZMCLg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796473960; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=hepONRYSqTfKirjp+JrpLsm7rUmRgHlllvk+KhQHLjk=; b=iFyzs0B05X3LEDCrkia8KHBBw2Wp70b0kx7srLS1WEhpkN68hSGaybBg5AL+8TaDtUo1 TiulK+pOvtMg9W2184PUYuGRmuoSWm5a49ZGVm1LlTexDJFt1uOB4OcMP9WOIvHnnEF1d xzcy/EpIz5UkkY+mtEAIjjaW9WyHTAOQHYEcEB/CwMKDgijJ630z8EmL3GlSIZU+NKAze FE9uert9o2ZY+RRqAftyfJVEyn9FyHnXMiZs2K53yBrhx31wvHntqlmbMCzeQf2P99mNS OFZDMt2ZjqTIntijAco06y/qGW0vQdGlOI3dl6lgN0OVLFtFc6TLKleFRz0NOtc1RiA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.remote-ip=91.218.175.147 Received: from mta0.migadu.com (out-147.mta0.migadu.com [91.218.175.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3299606A32F for ; Sat, 5 Dec 2026 12:32:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D3299606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: linux-rdma@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=DiM+g3qNWDB9uhg6u1P3+mHdYQCahJ7priOjXBngeVM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796473946; v=1; x=1797078746; b=QzKq2A1aLGY/3N/ePvqtra6XXrSSb54I4pQdYc/Mu6WiX4jwZLnZluIxBpXqnWqg3GwhIS6b 23D0pAJR+IGa+YlAhV45edgbGB1xTRD1th0n73wEMn0RjOzw6QR6htcXC4rCUcH23a4MdSxKcPV 9lkB3u/oCDfqt2F1pKNr8NNY= X-Envelope-To: linux-rdma@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 6e6d3f8247cd31ea; Sat, 05 Dec 2026 12:32:26 +0000 X-Mizu-Trace-ID: 6e6d3f8247cd31ea X-Migadu-Flow: FLOW_OUT Message-ID: <56da6164-38ba-4e4d-9f8b-a3fda693cec6@linux.dev> Date: Sat, 5 Dec 2026 13:32:25 +0100 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RDMA/siw: avoid exposing kernel addresses in Read requests To: Jiwoong Wi Cc: Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, bobtobabz@gmail.com, stable@vger.kernel.org References: <20261130061347.50309-1-dwdnlzj@gmail.com> <20261203064152.16095-1-dwdnlzj@gmail.com> From: Bernard Metzler In-Reply-To: <20261203064152.16095-1-dwdnlzj@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.