В ядре Linux устранена следующая уязвимость:
ALSA: usb-audio: qcom: отключить отклонение потока без активного интерфейса
handle_uaudio_stream_req() разрешает индекс интерфейса с помощью
info_idx_from_ifnum(), который возвращает -EINVAL, если ни один интерфейс не соответствует. Ветка включения и метка ответа: очистка защищают от
отрицательный индекс, а ветвь отключения - нет: она образует
info = &uadev[pcm_card_num].info[info_idx] и разыменовывает его.
uadev[].info — это указатель, выделяемый только при первом включении потока,
поэтому отрицательный info_idx в пути отключения небезопасен по двум причинам:
- Если карта никогда не была активирована, .info имеет значение NULL, а &info[-EINVAL] —
дикий указатель; чтение ошибок info->data_ep_pipe (упс ядра).
- Если карта была активирована хотя бы один раз (выделен .info) и
отключить имена интерфейса, которые не совпадают, точки &info[-EINVAL]
до распределения; info->data_ep_pipe / info->sync_ep_pipe — это
чтение сляба за пределами границ и, если оно не равно нулю, 4-байтовое чтение за пределами границ.
запись (оба поля канала очищаются до 0). Это повреждение памяти,
не просто разыменование NULL.
Запрос доступен из непривилегированного локального пользовательского пространства через
AF_QIPCRTR. Отклонить запрос на отключение без разрешенного интерфейса, соответствующий
охранник, который уже есть на пути включения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: qcom: reject stream disable with no active interface handle_uaudio_stream_req() resolves an interface index with info_idx_from_ifnum(), which returns -EINVAL when no interface matches. The enable branch and the response: cleanup label both guard against a negative index, but the disable branch does not: it forms info = &uadev[pcm_card_num].info[info_idx] and dereferences it. uadev[].info is a pointer allocated only when a stream is first enabled, so a negative info_idx on the disable path is unsafe in two ways: - If the card was never enabled, .info is NULL and &info[-EINVAL] is a wild pointer; reading info->data_ep_pipe faults (kernel oops). - If the card was enabled at least once (.info allocated) and the disable names an interface that does not match, &info[-EINVAL] points before the allocation; info->data_ep_pipe / info->sync_ep_pipe are an out-of-bounds slab read and, when non-zero, an out-of-bounds 4-byte write (both pipe fields are cleared to 0). That is memory corruption, not just a NULL dereference. The request is reachable from unprivileged local userspace over AF_QIPCRTR. Reject a disable request with no resolved interface, matching the guard the enable path already has.
Характеристики атаки
Последствия
Строка CVSS v3.1