В ядре Linux устранена следующая уязвимость:
media: mediatek: vcodec: исправление утечек ресурсов в vdec_msg_queue_init()
Если мы обнаружим какую-либо ошибку в vdec_msg_queue_init(), нам нужно
чтобы установить «msg_queue->wdma_addr.size = 0;». Обычно это делается
внутри функции vdec_msg_queue_deinit(). Однако, если
первый вызов для выделения &msg_queue->wdma_addr завершается неудачно, затем
Функция vdec_msg_queue_deinit() неактивна.
Для этой ситуации просто
явно установите размер равным нулю и вернитесь. Были еще два пути к ошибкам, которые не были устранены перед возвратом. Измените эти пути ошибок на goto mem_alloc_err.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init() If we encounter any error in the vdec_msg_queue_init() then we need to set "msg_queue->wdma_addr.size = 0;". Normally, this is done inside the vdec_msg_queue_deinit() function. However, if the first call to allocate &msg_queue->wdma_addr fails, then the vdec_msg_queue_deinit() function is a no-op. For that situation, just set the size to zero explicitly and return. There were two other error paths which did not clean up before returning. Change those error paths to goto mem_alloc_err.