From: Vlastimil Babka <vbabka@suse.cz>
To: Jann Horn <jannh@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Suren Baghdasaryan <surenb@google.com>
Cc: Pedro Falcato <pfalcato@suse.de>, Linux-MM <linux-mm@kvack.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] hard-to-hit mm_struct UAF due to insufficiently careful vma_refcount_put() wrt SLAB_TYPESAFE_BY_RCU
Date: Wed, 23 Jul 2025 19:32:24 +0200 [thread overview]
Message-ID: <16c97e30-19c9-41e8-b73b-c0b3c8eceff3@suse.cz> (raw)
In-Reply-To: <CAG48ez0-deFbVH=E3jbkWx=X3uVbd8nWeo6kbJPQ0KoUD+m2tA@mail.gmail.com>
On 7/23/25 18:26, Jann Horn wrote:
> There's a racy UAF in `vma_refcount_put()` when called on the
> `lock_vma_under_rcu()` path because `SLAB_TYPESAFE_BY_RCU` is used
> without sufficient protection against concurrent object reuse:
Oof.
> I'm not sure what the right fix is; I guess one approach would be to
> have a special version of vma_refcount_put() for cases where the VMA
> has been recycled by another MM that grabs an extra reference to the
> MM? But then dropping a reference to the MM afterwards might be a bit
> annoying and might require something like mmdrop_async()...
Would we need mmdrop_async()? Isn't this the case for mmget_not_zero() and
mmput_async()?
next prev parent reply other threads:[~2025-07-23 17:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 16:26 Jann Horn
2025-07-23 17:32 ` Vlastimil Babka [this message]
2025-07-23 17:49 ` Jann Horn
2025-07-23 17:55 ` Suren Baghdasaryan
2025-07-23 19:01 ` Lorenzo Stoakes
2025-07-24 0:13 ` Suren Baghdasaryan
2025-07-24 4:40 ` Lorenzo Stoakes
2025-07-23 18:10 ` Vlastimil Babka
2025-07-23 18:19 ` Jann Horn
2025-07-23 18:39 ` Lorenzo Stoakes
2025-07-23 19:52 ` Jann Horn
2025-07-23 20:00 ` Jann Horn
2025-07-24 5:24 ` Lorenzo Stoakes
2025-07-24 5:23 ` Lorenzo Stoakes
2025-07-23 20:27 ` Suren Baghdasaryan
2025-07-24 2:30 ` Suren Baghdasaryan
2025-07-24 8:38 ` Vlastimil Babka
2025-07-24 10:53 ` Lorenzo Stoakes
2025-07-24 14:29 ` Suren Baghdasaryan
2025-07-24 14:45 ` Vlastimil Babka
2025-07-24 14:52 ` Suren Baghdasaryan
2025-07-24 14:45 ` Jann Horn
2025-07-24 16:36 ` Suren Baghdasaryan
2025-07-28 17:14 ` Suren Baghdasaryan
2025-07-23 18:14 ` Lorenzo Stoakes
2025-07-23 18:30 ` Jann Horn
2025-07-23 18:45 ` Lorenzo Stoakes
2025-07-23 19:43 ` Jann Horn
2025-07-24 5:13 ` Lorenzo Stoakes
2025-07-24 14:50 ` Jann Horn
2025-07-24 14:56 ` Lorenzo Stoakes
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=16c97e30-19c9-41e8-b73b-c0b3c8eceff3@suse.cz \
--to=vbabka@suse.cz \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=pfalcato@suse.de \
--cc=surenb@google.com \
/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