From: sashiko-bot@kernel.org
To: "Dongliang Qin" <cccccccccccc777777@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2 2/4] RDMA/rxe: Reserve MR state during MW binding
Date: Mon, 28 Sep 2026 17:27:51 +0000 [thread overview]
Message-ID: <20260928172752.08CC71F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928171756.3254016-3-cccccccccccc777777@gmail.com>
> MR invalidation, fast registration, reregistration, and deregistration
> only test num_mw before changing MR state. A concurrent type-2 MW bind
> can increment num_mw after that test and leave an MW bound to an MR
> that is being destroyed.
>
> Reserve num_mw == -1 while the MR state is changing, and allow binds
> only while num_mw is nonnegative. This keeps the MW binding count and
> MR lifetime synchronized without adding a new object.
>
> An unprivileged user with access to the device can use this race to corrupt
> kernel memory and escalate privileges.
>
> A concurrent bind and deregistration reproducer made KASAN report:
>
> BUG: KASAN: slab-use-after-free in rxe_mr_copy+0xd5/0x3d0
> [ ... ]
>
> Fixes: 32a577b4c3a9 ("RDMA/rxe: Add support for bind MW work requests")
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Dongliang Qin <cccccccccccc777777@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928171756.3254016-1-cccccccccccc777777@gmail.com?part=2
next prev parent reply other threads:[~2026-09-28 17:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 17:17 [PATCH v2 0/4] RDMA/rxe: Fix MW/MR lifetime races Dongliang Qin
2026-09-28 17:17 ` [PATCH v2 1/4] RDMA/rxe: Take MR reference under MW lock Dongliang Qin
2026-09-28 17:26 ` sashiko-bot
2026-09-28 17:17 ` [PATCH v2 2/4] RDMA/rxe: Reserve MR state during MW binding Dongliang Qin
2026-09-28 17:27 ` sashiko-bot [this message]
2026-09-28 17:17 ` [PATCH v2 3/4] RDMA/rxe: Invalidate MWs on QP destroy Dongliang Qin
2026-09-28 17:32 ` sashiko-bot
2026-09-28 17:17 ` [PATCH v2 4/4] RDMA/rxe: Do not force cleanup on pool timeout Dongliang Qin
2026-09-28 17:34 ` sashiko-bot
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=20260928172752.08CC71F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cccccccccccc777777@gmail.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