В ядре Linux устранена следующая уязвимость: ALSA: ядро: Исправлен потенциал UAF После асинхронного выпуска карты Usually звуковой драйвер высвобождает ресурсы, назначенные карте через snd_card_free(), и он синхронизируется со всей процедурой выпуска. Однако, когда карта выпускается асинхронно через snd_card_free_when_closed (), как USB-аудио драйвер, ситуация немного отличается; хотя вызов snd_card_disconnect () при отключении гарантирует, что любые новые доступы будут закрыты, задачи в полете могут по-прежнему получать доступ к базовому устройству card->dev даже после отключения, что в конечном итоге приведет к use-after-free. Для устранения ошибки выше, этот патч принимает пересчет card->dev при инициализации объекта карты и выпускает его деструктор.
Это гарантирует доступность card->dev на протяжении всего его жизненного цикла.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ALSA: core: Fix potential UAF after asynchronous card release Usually a sound driver releases the resources assigned to the card via snd_card_free(), and it synchronizes with the whole release procedure. However, when the card is released asynchronously via snd_card_free_when_closed() like USB-audio driver, the situation is slightly different; although the snd_card_disconnect() call at the disconnection guarantees that any newer accesses will be gated, the in-flight tasks might be still accessing to the underlying card->dev device even after the disconnection, which would cause a use-after-free in the end, as reported by fuzzers. For addressing the bug above, this patch takes the refcount of card->dev at initialization of the card object, and releases at its destructor. This assures the availability of the card->dev in its whole lifecycle.