В ядре Linux устранена следующая уязвимость:
ASoC: soc-compress: предотвратить потенциальное использование нулевого указателя. Есть одна трассировка вызова, которую выполняет snd_soc_register_card().
->snd_soc_bind_card()->soc_init_pcm_runtime()
->snd_soc_dai_compress_new()->snd_soc_new_compress(). В трассировке «codec_dai» передается из card->dai_link,
и мы можем видеть это из snd_soc_add_pcm_runtime() в
snd_soc_bind_card(), если значение card->dai_link->num_codecs
равно 0, тогда 'codec_dai' может быть вызван нулевым указателем
по индексу за пределами границы в «asoc_rtd_to_codec(rtd, 0)».
А snd_soc_register_card() вызывается на разных платформах. Поэтому лучше добавить проверку на случай неправильного использования. И поскольку «cpu_dai» уже проверил в soc_init_pcm_runtime(),
нет необходимости проверять еще раз.
Добавляем проверку следующим образом: если 'codec_dai' имеет значение null,
snd_soc_new_compress() не пройдет проверку
'if (воспроизведение + захват!= 1)', избегая остаточного использования
'кодек_дай'.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ASoC: soc-compress: prevent the potentially use of null pointer There is one call trace that snd_soc_register_card() ->snd_soc_bind_card()->soc_init_pcm_runtime() ->snd_soc_dai_compress_new()->snd_soc_new_compress(). In the trace the 'codec_dai' transfers from card->dai_link, and we can see from the snd_soc_add_pcm_runtime() in snd_soc_bind_card() that, if value of card->dai_link->num_codecs is 0, then 'codec_dai' could be null pointer caused by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'. And snd_soc_register_card() is called by various platforms. Therefore, it is better to add the check in the case of misusing. And because 'cpu_dai' has already checked in soc_init_pcm_runtime(), there is no need to check again. Adding the check as follow, then if 'codec_dai' is null, snd_soc_new_compress() will not pass through the check 'if (playback + capture != 1)', avoiding the leftover use of 'codec_dai'.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.4
|
5.4.189
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5
|
5.10.110
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.33
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
5.16.19
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.17
|
5.17.2
|