Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jaeyeong Lee" <lee@jaeyeong.cc>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/mlx5: Preserve DEVX objects after failed output copy
Date: Sun, 22 Nov 2026 10:48:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-227899@kernel.org> (raw)
In-Reply-To: <20261122103715.51731-1-lee@jaeyeong.cc>

> A DEVX create can successfully create and publish a hardware object
> before uverbs_copy_to() returns an error. The error path currently
> destroys the object directly and frees struct devx_obj without checking
> whether destruction succeeded.
> 
> This is unsafe for DCTs. mlx5_core_destroy_dct() returns immediately if
> the DRAIN_DCT command fails, leaving core_dct in qp_table.dct_xa. A later
> DCT_DRAINED event retrieves the stale entry and completes the embedded
> completion after devx_obj was freed.
> 
> The failure was reproduced by forcing DRAIN_DCT to fail and then
> delivering a DCT_DRAINED event:
> 
>   BUG: KASAN: slab-use-after-free in complete+0x1a7/0x1b0
>   Write of size 4 at addr ffff88800b112ca8 by task insmod/77
> [ ... ]
> 
> Fixes: c5ae1954c47d3 ("IB/mlx5: Use mlx5 core to create/destroy a DEVX DCT")
> Cc: stable@vger.kernel.org
> Signed-off-by: Finder16 <nakamurajames123@gmail.com>
> Signed-off-by: Jaeyeong Lee <lee@jaeyeong.cc>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261122103715.51731-1-lee@jaeyeong.cc?part=1

      parent reply	other threads:[~2026-11-22 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 10:53 [PATCH] RDMA/mlx5: Fix UAF after DEVX DCT create failure Jaeyeong Lee
2026-11-11 11:13 ` sashiko-bot
2026-11-15 13:51 ` Leon Romanovsky
2026-11-22 10:37   ` [PATCH v2] RDMA/mlx5: Preserve DEVX objects after failed output copy Jaeyeong Lee
2026-11-22 10:39     ` Jaeyeong Lee
2026-11-22 10:48     ` 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-227899@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lee@jaeyeong.cc \
    --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