В ядре Linux устранена следующая уязвимость:
ASoC: кодек: sma1307: исправлено повреждение памяти в sma1307_setting_loaded().
sma1307->set.header_size — это количество целых чисел в заголовке.
(их 8), но вместо выделения места из 8 целых чисел
мы выделяем 8 байт. Это приводит к повреждению памяти при копировании данных.
это на следующей строке:
memcpy(sma1307->set.header, данные,
sma1307->set.header_size * sizeof(int));
Кроме того, поскольку мы немедленно копируем память в ->set.header,
нет необходимости обнулять его в распределителе. Используйте devm_kmalloc_array().
вместо этого выделить память.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded() The sma1307->set.header_size is how many integers are in the header (there are 8 of them) but instead of allocating space of 8 integers we allocate 8 bytes. This leads to memory corruption when we copy data it on the next line: memcpy(sma1307->set.header, data, sma1307->set.header_size * sizeof(int)); Also since we're immediately copying over the memory in ->set.header, there is no need to zero it in the allocator. Use devm_kmalloc_array() to allocate the memory instead.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 7
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.16.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*
|
— | — |