В ядре Linux устранена следующая уязвимость:
ALSA: oss: исправлено переполнение буфера PCM OSS. У нас есть отчеты syzbot о переполнении INT_MAX в vmalloc().
выделение, которое вызывается из snd_pcm_plug_alloc(). Хотя мы
применить ограничения к входным параметрам, это основано только на
hw_params базового устройства PCM.
Поскольку уровень PCM OSS
выделяет временный буфер для преобразования данных, размер может
стать неожиданно большим, когда задано больше каналов или более высокие скорости;
в описанном случае он превысил INT_MAX и, следовательно, достиг WARN_ON(). Этот патч является попыткой избежать такого переполнения и выделения
для слишком больших буферов. Во-первых, он добавляет ограничение в 1 МБ в качестве
верхняя граница для байтов периода.
Он должен быть достаточно большим для любого использования.
случаях, и мы действительно не хотим обрабатывать временный буфер большего размера
чем этот размер. Проверка размера выполняется в двух местах, где
вычисляются исходные байты периода и размер буфера плагина
рассчитывается. Кроме того, драйвер использует array_size() и array3_size() для
умножения для обнаружения переполнения преобразованного размера периода и
буферные байты.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ALSA: oss: Fix PCM OSS buffer allocation overflow We've got syzbot reports hitting INT_MAX overflow at vmalloc() allocation that is called from snd_pcm_plug_alloc(). Although we apply the restrictions to input parameters, it's based only on the hw_params of the underlying PCM device. Since the PCM OSS layer allocates a temporary buffer for the data conversion, the size may become unexpectedly large when more channels or higher rates is given; in the reported case, it went over INT_MAX, hence it hits WARN_ON(). This patch is an attempt to avoid such an overflow and an allocation for too large buffers. First off, it adds the limit of 1MB as the upper bound for period bytes. This must be large enough for all use cases, and we really don't want to handle a larger temporary buffer than this size. The size check is performed at two places, where the original period bytes is calculated and where the plugin buffer size is calculated. In addition, the driver uses array_size() and array3_size() for multiplications to catch overflows for the converted period size and buffer bytes.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
— |
4.19.237
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.20
|
5.4.188
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5
|
5.10.109
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.32
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
5.16.18
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.17:*:*:*:*:*:*:*
|
— | — |