All of lore.kernel.org
 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 v2] RDMA/siw: Reject opcodes a user send queue may not use
Date: Fri, 20 Nov 2026 14:11:30 +0000	[thread overview]
Message-ID: <sashiko-outbox-225335@kernel.org> (raw)
In-Reply-To: <20261120140605.62810-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]
>   CPU: 1 UID: 65534 PID: 116 Comm: siw003 Not tainted 7.4.0-rc3-gaebb72744764 #16 PREEMPT(lazy)
>   Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> [ ... ]
> 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/20261120140605.62810-1-astellman@stellman-greene.com?part=1


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 14:06 [PATCH rdma-rc v2] RDMA/siw: Reject opcodes a user send queue may not use Andrew Stellman
2026-11-20 14:11 ` 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-225335@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 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.