Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andrew Stellman" <astellman@stellman-greene.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/siw: Reject opcodes a user send queue may not use
Date: Fri, 20 Nov 2026 00:07:54 +0000	[thread overview]
Message-ID: <sashiko-outbox-224230@kernel.org> (raw)
In-Reply-To: <20261120000211.63217-1-astellman@stellman-greene.com>

> A user QP's send queue is mapped into the process, and
> siw_activate_tx_from_sq() only checks that an SQE's opcode is below
> SIW_NUM_OPCODES. siw-abi.h marks SIW_OP_INVAL_STAG and SIW_OP_REG_MR as
> valid for in-kernel clients only, but a user process can still post
> them. For SIW_OP_REG_MR, siw_fastreg_mr() then uses the user supplied
> base_mr value as a kernel pointer to a struct ib_mr.
> 
> The uverbs device is mode 0666, so once an administrator has created a
> siw device any local user can trigger this. With an unmapped base_mr,
> as an unprivileged user under KASAN:
> 
>   Oops: general protection fault, probably for non-canonical address 0xe000042828282002: 0000 [#1] SMP KASAN NOPTI
>   KASAN: probably user-memory-access in range [0x0000414141410010-0x0000414141410017]
>   RIP: 0010:siw_qp_sq_process+0x38b/0x3c10
>   Call Trace:
> [ ... ]
> The fix and this changelog were drafted with the same tool and reviewed
> by me.
> 
> Fixes: f29dd55b0236 ("rdma/siw: queue pair methods")
> Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120000211.63217-1-astellman@stellman-greene.com?part=1


      reply	other threads:[~2026-11-20  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  0:02 [PATCH rdma-rc] RDMA/siw: Reject opcodes a user send queue may not use Andrew Stellman
2026-11-20  0:07 ` sashiko-bot [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=sashiko-outbox-224230@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=astellman@stellman-greene.com \
    --cc=linux-rdma@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox