In the Linux kernel, the following vulnerability has been resolved: media: usbtv: keep device alive while ALSA card exists The ALSA PCM callbacks store the driver state in pcm->private_data. Открытый файл PCM может пережить разрыв USB, потому что usbtv_audio_free() использует snd_card_free_when_closed(). Затем путь разъединения может отбросить ссылку на устройство V4L2 и освободить usbtv до того, как ALSA выпустит подпоток, поэтому более поздние близкие ссылки освобождают память в snd_usbtv_pcm_close ().
Возьмите ссылку на устройство V4L2 для карты ALSA и сбросьте ее с обратного вызова карты private_free. Это сохраняет struct usbtv действительным до тех пор, пока ALSA не закроет оставшиеся файлы и не освободит карту.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: media: usbtv: keep device alive while ALSA card exists The ALSA PCM callbacks store the driver state in pcm->private_data. An open PCM file can outlive USB disconnect because usbtv_audio_free() uses snd_card_free_when_closed(). The disconnect path can then drop the V4L2 device reference and free struct usbtv before ALSA releases the substream, so a later close dereferences freed memory in snd_usbtv_pcm_close(). Take a V4L2 device reference for the ALSA card and drop it from the card private_free callback. This keeps struct usbtv valid until ALSA has closed the remaining files and freed the card.
Характеристики атаки
Последствия
Строка CVSS v3.1