futex: Avoid private hash use-after-free on final put
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.47, 7.1.11, 7.2.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: futex: Avoid private hash use-after-free on final put futex_private_hash_put() drops the reference to fph before evaluating fph->mm for wake_up_var(). futex_ref_put() enables preemption again before returning. If that put drops the final reference and the task is preempted, another task can pivot to the replacement hash and free the old hash after an RCU grace period. The first task then reads fph->mm from the freed allocation when it resumes. KASAN reports a slab-use-after-free in futex_private_hash_put(), with the read at offset 24 in a freed kmalloc-512 allocation. The allocation and free stacks point to futex_hash_allocate() and the RCU free path, respectively. Load the mm pointer while the fph reference is still held and pass the saved value to wake_up_var(). wake_up_var() uses the pointer as a waitqueue key and does not dereference the mm through it.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From bd54df5ea7cadac520e346d5f0fe5d58e635b6ba · fixed in dba60d26e9dda3e157ad6b0934d4232f6c6904ee; From bd54df5ea7cadac520e346d5f0fe5d58e635b6ba · fixed in 12cd315a7b6a7d7db3f69d98bfe3909275e9451d; From bd54df5ea7cadac520e346d5f0fe5d58e635b6ba · fixed in 25408c62ed4ebcd491d0e9e4b4a5b512547512e4; From bd54df5ea7cadac520e346d5f0fe5d58e635b6ba · fixed in 1c7efabfbaf796f11000a46094a69955a01ec6cc
- Linux Linux
6.16
- KernelLinux
From 6.16.0 · fixed in 6.18.47; From 6.19.0 · fixed in 7.1.11; From 7.2.0 · fixed in 7.2.1