UBUNTU-CVE-2026-98788: Use After Free
In the Linux kernel, the following vulnerability has been resolved: futex: Fix private hash use-after-free on resize pollstatesynchronizercu(mm->futex.phash.batches) is used by futexrefdrop() to check that a grace period has passed since the current hash was published. This relies on batches referencing a grace period which started after the hash pointer was assigned. futexpivothash() sets mmph->batches before it replaces mmph->hash: scopedguard(rcu) { mmph->batches = getstatesynchronizercu(); rcuassignpointer(mmph->hash, new); } The scopedguard(rcu) doesn't stop new grace periods from starting, and if one starts between those two assignments, futexrefdrop() can move forward while a reader still holds a pointer to the old hash. Fix things by setting mmph->batches after assigning mmph->hash. The scopedguard(rcu) isn't needed, so let's drop that as well.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In __futex_pivot_hash(), assign mmph->hash to the new hash first, then set mmph->batches = get_state_synchronize_rcu(); remove the unnecessary scoped_guard(rcu).