From: Kees Cook <kees@kernel.org>
To: Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Boqun Feng <boqun.feng@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Petr Pavlu <petr.pavlu@suse.com>
Cc: Kees Cook <kees@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] refcount: Report UAF for refcount_sub_and_test(0) when counter==0
Date: Wed, 17 Jul 2024 09:42:45 -0700 [thread overview]
Message-ID: <172123456264.2736908.1565336371503980585.b4-ty@kernel.org> (raw)
In-Reply-To: <20240717130023.5675-1-petr.pavlu@suse.com>
On Wed, 17 Jul 2024 15:00:23 +0200, Petr Pavlu wrote:
> When a reference counter is at zero and refcount_sub_and_test() is invoked
> to subtract zero, the function accepts this request without any warning and
> returns true. This behavior does not seem ideal because the counter being
> already at zero indicates a use-after-free. Furthermore, returning true by
> refcount_sub_and_test() in this case potentially results in a double-free
> done by its caller.
>
> [...]
(Peter, let me know if you'd rather this went via a different tree...)
Applied to for-linus/hardening, thanks!
[1/1] refcount: Report UAF for refcount_sub_and_test(0) when counter==0
https://git.kernel.org/kees/c/cee1fb1bb8bd
Take care,
--
Kees Cook
prev parent reply other threads:[~2024-07-17 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 13:00 Petr Pavlu
2024-07-17 16:25 ` Peter Zijlstra
2024-07-17 16:42 ` Kees Cook [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=172123456264.2736908.1565336371503980585.b4-ty@kernel.org \
--to=kees@kernel.org \
--cc=arnd@arndb.de \
--cc=boqun.feng@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=petr.pavlu@suse.com \
--cc=will@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
all inboxes | Powered by JetHome®