summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorHaitam Lazaar <haitam@lazaarsec.com>2026-10-11 11:55:57 +0000
committerLeon Romanovsky <leon@kernel.org>2026-10-13 07:24:57 -0400
commitf74eac4fc6c56274fb96c2c44ffad8f01c325f17 (patch)
tree08cad0cf936ba192a285155b95445234293d159f /tools/lib/python
parenta0ab2bb269e7fd8523f87950b91a42a36c7f8f2a (diff)
RDMA/siw: Enforce IB_ACCESS_REMOTE_READ for read responses
When generating an RDMA READ response (SIW_OP_READ_RESPONSE), siw_check_sgl_tx() unconditionally passes 0 as the required permission mask: /* Reference memory to be tx'd w/o checking access for LOCAL_READ */ rv = siw_check_sgl_tx(qp->pd, wqe, 0); Because perms is 0, siw_check_mem()'s authorization test: if ((mem->perms & perms) < perms) evaluates to (mem->perms & 0) < 0, which is always false. Consequently, an untrusted remote peer can issue an RDMA Read targeting any valid STag in the Protection Domain, even if the memory was registered strictly as write-only (IB_ACCESS_REMOTE_WRITE) without IB_ACCESS_REMOTE_READ. Enforce that the target memory region was granted IB_ACCESS_REMOTE_READ when answering SIW_OP_READ_RESPONSE work queue entries, while preserving perms = 0 for standard local sends. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Signed-off-by: Haitam Lazaar <haitam@lazaarsec.com> Link: https://patch.msgid.link/1a12ad1d83f.19cd98924357428.7073029566232810804@lazaarsec.com Acked-by: Bernard Metzler <bernard.metzler@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions