В ядре Linux устранена следующая уязвимость:
ASoC: soc-core: очищать отложенную работу перед удалением DAI и виджетов. Если звуковая карта отключена при открытом потоке PCM,
use-after-free может возникнуть в snd_soc_dapm_stream_event(), вызываемом из
обработчик рабочей очереди close_delayed_work. Во время отмены привязки snd_soc_unbind_card() сбрасывает отложенную работу, а затем
вызывает soc_cleanup_card_resources().
Уборка внутри,
snd_card_disconnect_sync() освобождает все дескрипторы файлов PCM и
результирующий путь закрытия PCM может вызвать snd_soc_dapm_stream_stop()
который планирует новую отложенную работу с задержкой таймера pmdown_time. Поскольку это происходит после сброса в snd_soc_unbind_card(),
новую работу не поймал. soc_remove_link_comComponents() затем освобождает
Виджеты DAPM до того, как эта работа сработает, что приведет к использованию после освобождения. Существующий сброс в soc_free_pcm_runtime() также не может помочь, поскольку
запускается после того, как soc_remove_link_comComponents() уже освободил виджеты.
Добавьте сброс в soc_cleanup_card_resources() после
snd_card_disconnect_sync() (после чего новый PCM не закроется).
запланировать дальнейшую отложенную работу) и до soc_remove_link_dais()
и soc_remove_link_comComponents() (которые разрушают структуры,
задержка доступа к работе).
Показать оригинальное описание (EN)
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).
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.20
|
5.10.253
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.203
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.167
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.130
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.78
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.19
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
|
— | — |