Linux kernel missed futex wakeups in MM reuse handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 222993395ed38f3751287f4bd82ef46b3eb3a66d · < c17cc2027773e8e4913c5ab0fe3a489b1ed5bf81| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
futex: Fix mm reuse handling for FUT_OFF_MMSHARED
A FUT_OFF_MMSHARED futex is a shared futex that refers to an MM. It is possible for a process to wait on a shared futex with a different MM because a FUT_OFF_INODE waiter can be requeued onto a FUT_OFF_MMSHARED futex by another process. This can cause FUT_OFF_MMSHARED waiters on a freed MM to consume wakeups intended for a newly allocated MM at the same address.
Fix it by keying FUT_OFF_MMSHARED using a unique 64-bit per-MM ID. Leave private futexes as before to avoid influencing the performance of the hotpath.
(Multi-threaded processes typically implicitly use FUT_OFF_MMSHARED by setting clear_child_tid such that it points into anonymous memory, which causes mm_release() in a multi-threaded mm to perform FUTEX_WAKE.)
From the CVE record · Linux
The Linux kernel can mishandle FUT_OFF_MMSHARED futex waiters when a waiter is requeued from a FUT_OFF_INODE futex and an MM is freed and reused at the same address. A local process can cause waiters on the freed MM to consume wakeups intended for the new MM. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels should check their versions against the vendor advisory; affected versions are not specified in the input.