From: Thomas Gleixner <tglx@kernel.org>
To: syzbot <syzbot+6c1861115b4253e45969@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: Forwarded: [PATCH] futex: Fix use-after-free in futex_unqueue() on private hash teardown
Date: Wed, 11 Feb 2026 09:14:31 +0100 [thread overview]
Message-ID: <874innae8o.ffs@tglx> (raw)
In-Reply-To: <698bf81c.050a0220.340abe.000a.GAE@google.com>
On Tue, Feb 10 2026 at 19:31, syzbot wrote:
> Subject: [PATCH] futex: Fix use-after-free in futex_unqueue() on private hash teardown
> Author: suunj1331@gmail.com
>
> futex_hash_free() frees the private hash table with kvfree() in the
> __mmput() path. However, a task sharing the same mm via CLONE_VM may
> still be in futex_unqueue() which relies on RCU read-side protection
> (guard(rcu)) when acquiring the hash bucket spinlock.
>
> Since kvfree() does not respect RCU grace periods, the hash bucket
> memory can be reclaimed while futex_unqueue() is still referencing it,
> leading to a use-after-free on the embedded spinlock.
>
> Use kvfree_rcu() instead, which defers freeing until after an RCU grace
> period, matching the protection already assumed by futex_unqueue().
>
> The futex_private_hash structure already has an rcu_head field used by
> the pivot path (__futex_pivot_hash), so no structural changes are needed.
This does not fix anything as I explained already before:
https://lore.kernel.org/lkml/87o6lwa0fl.ffs@tglx/
https://lore.kernel.org/all/87qzqsa1br.ffs@tglx/
The futex code has absolutely nothing to do with this and is entirely
correct.
Thanks,
tglx
next prev parent reply other threads:[~2026-02-11 8:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 21:43 [syzbot] [kernel?] KASAN: slab-use-after-free Read in futex_unqueue syzbot
2026-02-10 22:51 ` Hillf Danton
2026-02-10 23:15 ` syzbot
2026-02-11 0:38 ` Hillf Danton
2026-02-11 0:55 ` syzbot
2026-02-11 3:31 ` Forwarded: [PATCH] futex: Fix use-after-free in futex_unqueue() on private hash teardown syzbot
2026-02-11 8:14 ` Thomas Gleixner [this message]
2026-02-11 6:31 ` [syzbot] [kernel?] KASAN: slab-use-after-free Read in futex_unqueue Hillf Danton
2026-02-11 6:55 ` syzbot
2026-02-11 9:22 ` Hillf Danton
2026-02-11 9:46 ` syzbot
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=874innae8o.ffs@tglx \
--to=tglx@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+6c1861115b4253e45969@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 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.