All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Deep Shah" <deepshah146@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc 2/2] RDMA/uverbs: Fix DMABUF use-after-free during ufile cleanup
Date: Thu, 15 Oct 2026 08:44:09 +0000	[thread overview]
Message-ID: <sashiko-outbox-172512@kernel.org> (raw)
In-Reply-To: <20261015083637.200958-3-deepshah146@gmail.com>

> The DMABUF release can race with ufile cleanup. When the cleanup holds
> hw_destroy_rwsem for write, uverbs_uobject_release() fails its trylock
> and leaves the uobject on the ufile list, but the dma_buf is freed as
> soon as the release returns. The cleanup then destroys the uobject and
> uses the freed dma_buf:
> 
>   BUG: KASAN: slab-use-after-free in uverbs_dmabuf_fd_destroy_uobj+0x46/0x200
>   Read of size 8 at addr ff11000109cf14b0 by task repro/435
>   Call Trace:
>    uverbs_dmabuf_fd_destroy_uobj+0x46/0x200
>    destroy_hw_fd_uobject+0x3f/0x50
>    uverbs_destroy_uobject+0xc5/0x380
>    __uverbs_cleanup_ufile+0x1a8/0x260
>    uverbs_destroy_ufile_hw+0x54/0x160
>    ib_uverbs_close+0x34/0x110
> [ ... ]
> 
> Fixes: 0ac6f4056c4a ("RDMA/uverbs: Add DMABUF object type and operations")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Deep Shah <deepshah146@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015083637.200958-1-deepshah146@gmail.com?part=2


      reply	other threads:[~2026-10-15  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  8:36 [PATCH rdma-rc 0/2] RDMA/uverbs: Fix DMABUF lifetime bugs Deep Shah
2026-10-15  8:36 ` [PATCH rdma-rc 1/2] RDMA/uverbs: Fix uobject leak in DMABUF release Deep Shah
2026-10-15  8:57   ` sashiko-bot
2026-10-15  8:36 ` [PATCH rdma-rc 2/2] RDMA/uverbs: Fix DMABUF use-after-free during ufile cleanup Deep Shah
2026-10-15  8:44   ` 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-172512@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=deepshah146@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 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.