From: sashiko-bot@kernel.org
To: "Andrew Stellman" <astellman@stellman-greene.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/rxe: Fix NULL dereference when invalidating an unbound MW
Date: Thu, 19 Nov 2026 15:19:17 +0000 [thread overview]
Message-ID: <sashiko-outbox-223362@kernel.org> (raw)
In-Reply-To: <20261119151327.95446-1-astellman@stellman-greene.com>
> A type 2 memory window has no QP or MR attached while it is in
> RXE_MW_STATE_FREE, which is its state after it is allocated and again
> after it is invalidated. rxe_check_invalidate_mw() rejects
> RXE_MW_STATE_INVALID but not RXE_MW_STATE_FREE, so invalidating a FREE
> window reaches rxe_do_invalidate_mw(), which dereferences the NULL
> mw->qp and mw->mr.
>
> An IB_WR_LOCAL_INV for the rkey of a type 2 MW that was never bound
> panics the kernel. So does a second IB_WR_LOCAL_INV for the same rkey
> after a bind and an invalidate, and a received SEND with Invalidate
> naming a never-bound window's rkey.
>
> The first case, run by an unprivileged user under KASAN:
>
> BUG: KASAN: null-ptr-deref in rxe_invalidate_mw+0x156/0x310
> [ ... ]
> The fix and this changelog were drafted with the same tool and reviewed
> by me.
>
> Fixes: 3902b429ca14 ("RDMA/rxe: Implement invalidate MW operations")
> 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/20261119151327.95446-1-astellman@stellman-greene.com?part=1
prev parent reply other threads:[~2026-11-19 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 15:13 [PATCH rdma-next] RDMA/rxe: Fix NULL dereference when invalidating an unbound MW Andrew Stellman
2026-11-19 15:19 ` 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-223362@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.