Descrizione
In the Linux kernel, the following vulnerability has been resolved: futex: Prevent lockup in requeue-PI during signal/ timeout wakeup During wait-requeue-pi (task A) and requeue-PI (task B) the following race can happen: Task A Task B futex_wait_requeue_pi() futex_setup_timer() futex_do_wait() futex_requeue() CLASS(hb, hb1)(&key1); CLASS(hb, hb2)(&key2); *timeout* futex_requeue_pi_wakeup_sync() requeue_state = Q_REQUEUE_PI_IGNORE *blocks on hb->lock* futex_proxy_trylock_atomic() futex_requeue_pi_prepare() Q_REQUEUE_PI_IGNORE => -EAGAIN double_unlock_hb(hb1, hb2) *retry* Task B acquires both hb locks and attempts to acquire the PI-lock of the top most waiter (task B). Task A is leaving early due to a signal/ timeout and started removing itself from the queue. It updates its requeue_state but can not remove it from the list because this requires the hb lock which is owned by task B. Usually task A is able to swoop the lock after task B unlocked it. However if task B is of higher priority then task A may not be able to wake up in time and acquire the lock before task B gets it again. Especially on a UP system where A is never scheduled. As a result task A blocks on the lock and task B busy loops, trying to make progress but live locks the system instead. Tragic. This can be fixed by removing the top most waiter from the list in this case. This allows task B to grab the next top waiter (if any) in the next iteration and make progress. Remove the top most waiter if futex_requeue_pi_prepare() fails. Let the waiter conditionally remove itself from the list in handle_early_requeue_pi_wakeup().
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
5.15precedenti alla6.1.175→ aggiornare alla6.1.175o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.141→ aggiornare alla6.6.141o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.91→ aggiornare alla6.12.91o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.33→ aggiornare alla6.18.33o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.0.10→ aggiornare alla7.0.10o successiva. - Linux Linux Kernel: vulnerabile la versione
7.1 rc1→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/0304d60abb9dcc02bc7fe6d1850…
- Patch: git.kernel.org/stable/c/0aacb6d18f76552e3e0ee25d9f4…
- Patch: git.kernel.org/stable/c/4e0ed44e51727d56244a822ab94…
- Patch: git.kernel.org/stable/c/69a7cfc66405aeaa2483147653d…
- Patch: git.kernel.org/stable/c/bc7304f3ae20972d11db6e0b1b5…
- Patch: git.kernel.org/stable/c/e3f95b1ba242e37093305812df7…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Linux | Linux Kernel | ≥ 5.15 < 6.1.175 | 6.1.175 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.141 | 6.6.141 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.91 | 6.12.91 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.33 | 6.18.33 |
| Linux | Linux Kernel | ≥ 6.19 < 7.0.10 | 7.0.10 |
| Linux | Linux Kernel | 7.1 rc1 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/0304d60abb9dcc02bc7fe6d1850f4ca206e8f1a0
- Patchhttps://git.kernel.org/stable/c/0aacb6d18f76552e3e0ee25d9f40d21b3486f4cf
- Patchhttps://git.kernel.org/stable/c/4e0ed44e51727d56244a822ab941efe507c47966
- Patchhttps://git.kernel.org/stable/c/69a7cfc66405aeaa2483147653d031b3592ffc9c
- Patchhttps://git.kernel.org/stable/c/bc7304f3ae20972d11db6e0b1b541c63feda5f05
- Patchhttps://git.kernel.org/stable/c/e3f95b1ba242e37093305812df7fdbe7288a43ac
- Riferimentohttps://git.kernel.org/stable/c/e5dbae3572757cecc3d3ec7cf96cbcc9cd9f016c