В ядре Linux устранена следующая уязвимость:
hwmon: (pmbus/adm1266) отклонять короткие ответы на чтение блоков в методах доступа GPIO.
adm1266_gpio_get() и adm1266_gpio_get_multiple() составляют
слово состояния контакта как
pins_status = read_buf[0] + (read_buf[1] << 8);
сразу после i2c_smbus_read_block_data(), защищаясь только от
возврат ошибки. Устройство с хорошим поведением возвращает 2 байта для
GPIO_STATUS/PDIO_STATUS, но помощник с радостью сообщает 0- или
1-байтовый ответ тоже. Если устройство возвращает 0 байт, оба read_buf
слоты — это неинициализированная стековая память; если он возвращает 1 байт, read_buf[1]
есть.
Составное значение затем передается через set_bit() в вызывающую программу.
*биты в adm1266_gpio_get_multiple() или в возвращаемое значение
adm1266_gpio_get() и попадает в пространство пользователя через gpiolib (sysfs и
char-dev ioctls). Это приводит к утечке нескольких битов стека ядра каждый раз.
запрос на любое устройство, у которого сбой прошивки, ошибка шины или враждебное
ведомый выдает короткий ответ на чтение блока. Добавьте проверку недостающей длины на оба сайта вызова и выведите короткий
ответ как -EIO.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: hwmon: (pmbus/adm1266) reject short block-read responses in the GPIO accessors adm1266_gpio_get() and adm1266_gpio_get_multiple() both compose the pin-status word as pins_status = read_buf[0] + (read_buf[1] << 8); right after i2c_smbus_read_block_data(), guarding only against an error return. A well-behaved device returns 2 bytes for GPIO_STATUS/PDIO_STATUS, but the helper happily reports a 0- or 1-byte response too. If the device returns 0 bytes, both read_buf slots are uninitialized stack memory; if it returns 1 byte, read_buf[1] is. The composed value then flows through set_bit() into the caller's *bits in adm1266_gpio_get_multiple(), or into the return value of adm1266_gpio_get(), and ends up in userspace via gpiolib (sysfs and the char-dev ioctls). That leaks a few bits of kernel stack per request on any device whose firmware glitch, bus error, or hostile slave produces a short block-read response. Add the missing length check to both call sites and surface a short response as -EIO.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 11
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.10
|
5.10.258
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.209
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.175
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.142
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.92
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.34
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |