Descrizione
In the Linux kernel, the following vulnerability has been resolved: sched/fair: Fix zero_vruntime tracking fix John reported that stress-ng-yield could make his machine unhappy and managed to bisect it to commit b3d99f43c72b ("sched/fair: Fix zero_vruntime tracking"). The combination of yield and that commit was specific enough to hypothesize the following scenario: Suppose we have 2 runnable tasks, both doing yield. Then one will be eligible and one will not be, because the average position must be in between these two entities. Therefore, the runnable task will be eligible, and be promoted a full slice (all the tasks do is yield after all). This causes it to jump over the other task and now the other task is eligible and current is no longer. So we schedule. Since we are runnable, there is no {de,en}queue. All we have is the __{en,de}queue_entity() from {put_prev,set_next}_task(). But per the fingered commit, those two no longer move zero_vruntime. All that moves zero_vruntime are tick and full {de,en}queue. This means, that if the two tasks playing leapfrog can reach the critical speed to reach the overflow point inside one tick's worth of time, we're up a creek. Additionally, when multiple cgroups are involved, there is no guarantee the tick will in fact hit every cgroup in a timely manner. Statistically speaking it will, but that same statistics does not rule out the possibility of one cgroup not getting a tick for a significant amount of time -- however unlikely. Therefore, just like with the yield() case, force an update at the end of every slice. This ensures the update is never more than a single slice behind and the whole thing is within 2 lag bounds as per the comment on entity_key().
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
6.12.78precedenti alla6.12.81→ aggiornare alla6.12.81o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.18.17precedenti alla6.18.22→ aggiornare alla6.18.22o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19.7precedenti alla6.19.12→ aggiornare alla6.19.12o successiva.
Patch e advisory
- Patch: git.kernel.org/stable/c/1319ea57529e131822bab56bf41…
- Patch: git.kernel.org/stable/c/87573883c30f1a8555ff720836b…
- Patch: git.kernel.org/stable/c/c089147074ed96ff4330739a055…
- Patch: git.kernel.org/stable/c/fb61ffb3fb30a161eb5404c27fc…
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 | ≥ 6.12.78 < 6.12.81 | 6.12.81 |
| Linux | Linux Kernel | ≥ 6.18.17 < 6.18.22 | 6.18.22 |
| Linux | Linux Kernel | ≥ 6.19.7 < 6.19.12 | 6.19.12 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/1319ea57529e131822bab56bf417c8edc2db9ae8
- Patchhttps://git.kernel.org/stable/c/87573883c30f1a8555ff720836bb6ea231058539
- Patchhttps://git.kernel.org/stable/c/c089147074ed96ff4330739a0559394c19a3dfc8
- Patchhttps://git.kernel.org/stable/c/fb61ffb3fb30a161eb5404c27fc7635e275beafd