futex/pi: Reject cross-mm private futex owners
- 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/pi: Reject cross-mm private futex owners A private futex key borrows the waiter's mm without taking an mm_users reference. Nevertheless, attach_to_pi_owner() currently accepts an owner from a different address space and copies the private key into the owner's PI state. When that owner exits, exit_pi_state_list() uses the saved key to find the hash bucket and acquires a reference to the waiter's private hash. If the last user of the waiter's mm exits concurrently, futex_hash_free() frees the hash while the owner still uses its bucket and reference. Prevent this by validating in attach_to_pi_owner() that, for private futexes, the owner mm and waiter mm are the same. Perform the check with the owner's pi_lock held and after validating owner::futex::state to serialize against a concurrent PI-state exit cleanup. [ tglx: Amended comment ]
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 80367ad01d93ac781b0e1df246edaf006928002f · fixed in 2b92e5562653b5293529f63b0300837d9dcedbd7; From 80367ad01d93ac781b0e1df246edaf006928002f · fixed in f7fb3e07752688842cbe0b85cf0d98c2fbf76b68; From 80367ad01d93ac781b0e1df246edaf006928002f · fixed in 43b148d796aa338858792d0167cebdc12b8cb4b9; From 80367ad01d93ac781b0e1df246edaf006928002f · fixed in 59b3732f95dda1fbd2234514d35f4fb6b5bb6d85
- 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