Descrizione
In the Linux kernel, the following vulnerability has been resolved: ASoC: soc-core: flush delayed work before removing DAIs and widgets When a sound card is unbound while a PCM stream is open, a use-after-free can occur in snd_soc_dapm_stream_event(), called from the close_delayed_work workqueue handler. During unbind, snd_soc_unbind_card() flushes delayed work and then calls soc_cleanup_card_resources(). Inside cleanup, snd_card_disconnect_sync() releases all PCM file descriptors, and the resulting PCM close path can call snd_soc_dapm_stream_stop() which schedules new delayed work with a pmdown_time timer delay. Since this happens after the flush in snd_soc_unbind_card(), the new work is not caught. soc_remove_link_components() then frees DAPM widgets before this work fires, leading to the use-after-free. The existing flush in soc_free_pcm_runtime() also cannot help as it runs after soc_remove_link_components() has already freed the widgets. Add a flush in soc_cleanup_card_resources() after snd_card_disconnect_sync() (after which no new PCM closes can schedule further delayed work) and before soc_remove_link_dais() and soc_remove_link_components() (which tear down the structures the delayed work accesses).
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.3.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
4.20precedenti alla5.10.253→ aggiornare alla5.10.253o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.203→ aggiornare alla5.15.203o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.167→ aggiornare alla6.1.167o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.130→ aggiornare alla6.6.130o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.78→ aggiornare alla6.12.78o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.19→ aggiornare alla6.18.19o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla6.19.9→ aggiornare alla6.19.9o successiva. - Linux Linux Kernel: vulnerabile la versione
7.0 rc1→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc2→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc3→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/231568afbc0cd25b8fb2a94ebf9…
- Patch: git.kernel.org/stable/c/317a9298c54bb00319da73e5a71…
- Patch: git.kernel.org/stable/c/3887e514978d28216246360b46a…
- Patch: git.kernel.org/stable/c/7d33e6140945482a07f8089ee86…
- Patch: git.kernel.org/stable/c/95bc5c225513fc3c4ce169563fb…
- Patch: git.kernel.org/stable/c/bf80a89da97285d9b877e0c6995…
- Patch: git.kernel.org/stable/c/c054f0607c8bb1b1aa529bc109e…
- Patch: git.kernel.org/stable/c/eab71e11ce2447c1e01809cbc11…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.
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 | ≥ 4.20 < 5.10.253 | 5.10.253 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.203 | 5.15.203 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.167 | 6.1.167 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.130 | 6.6.130 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.78 | 6.12.78 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.19 | 6.18.19 |
| Linux | Linux Kernel | ≥ 6.19 < 6.19.9 | 6.19.9 |
| Linux | Linux Kernel | 7.0 rc1 | — |
| Linux | Linux Kernel | 7.0 rc2 | — |
| Linux | Linux Kernel | 7.0 rc3 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/231568afbc0cd25b8fb2a94ebf9738eabe1cf007
- Patchhttps://git.kernel.org/stable/c/317a9298c54bb00319da73e5a7179f00e67fcbdf
- Patchhttps://git.kernel.org/stable/c/3887e514978d28216246360b46a9cb534969eb5a
- Patchhttps://git.kernel.org/stable/c/7d33e6140945482a07f8089ee86e13e02553ffdb
- Patchhttps://git.kernel.org/stable/c/95bc5c225513fc3c4ce169563fb5e3929fbb938b
- Patchhttps://git.kernel.org/stable/c/bf80a89da97285d9b877e0c6995e870d46b8025c
- Patchhttps://git.kernel.org/stable/c/c054f0607c8bb1b1aa529bc109e4149298a1cccd
- Patchhttps://git.kernel.org/stable/c/eab71e11ce2447c1e01809cbc11eab4234cf8dc8