Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in futex_unqueue

From: Hillf Danton

Date: Tue Feb 10 2026 - 19:38:58 EST


> Date: Tue, 10 Feb 2026 13:43:32 -0800 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 72c395024dac Merge tag 'docs-7.0' of git://git.kernel.org/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=137d9b22580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bf83be18dae53c93
> dashboard link: https://syzkaller.appspot.com/bug?extid=6c1861115b4253e45969
> compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=169f8ae6580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17f657fa580000

#syz test

--- x/kernel/futex/core.c
+++ y/kernel/futex/core.c
@@ -1735,8 +1735,7 @@ void futex_hash_free(struct mm_struct *m
free_percpu(mm->futex_ref);
kvfree(mm->futex_phash_new);
fph = rcu_dereference_raw(mm->futex_phash);
- if (fph)
- kvfree(fph);
+ kvfree_rcu(fph, rcu);
}

static bool futex_pivot_pending(struct mm_struct *mm)
--- x/kernel/fork.c
+++ y/kernel/fork.c
@@ -1192,6 +1192,7 @@ static inline void __mmput(struct mm_str
void mmput(struct mm_struct *mm)
{
might_sleep();
+ VM_BUG_ON(!atomic_read(&mm->mm_users));

if (atomic_dec_and_test(&mm->mm_users))
__mmput(mm);
--