From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, Jann Horn <jannh@google.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] io_uring: Fix registered ring file refcount leak
Date: Wed, 18 Dec 2024 18:20:03 -0700 [thread overview]
Message-ID: <173457120329.744782.1920271046445831362.b4-ty@kernel.dk> (raw)
In-Reply-To: <20241218-uring-reg-ring-cleanup-v1-1-8f63e999045b@google.com>
On Wed, 18 Dec 2024 17:56:25 +0100, Jann Horn wrote:
> Currently, io_uring_unreg_ringfd() (which cleans up registered rings) is
> only called on exit, but __io_uring_free (which frees the tctx in which the
> registered ring pointers are stored) is also called on execve (via
> begin_new_exec -> io_uring_task_cancel -> __io_uring_cancel ->
> io_uring_cancel_generic -> __io_uring_free).
>
> This means: A process going through execve while having registered rings
> will leak references to the rings' `struct file`.
>
> [...]
Applied, thanks!
[1/1] io_uring: Fix registered ring file refcount leak
commit: 12d908116f7efd34f255a482b9afc729d7a5fb78
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2024-12-19 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 16:56 [PATCH] io_uring: Fix registered ring file refcount leak Jann Horn
2024-12-19 1:20 ` Jens Axboe [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=173457120329.744782.1920271046445831362.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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