В ядре Linux устранена следующая уязвимость:
Постановка: nvec: исправлено использование после освобождения в nvec_rx_completed()
В nvec_rx_completed(), когда обнаруживается неполная передача RX,
nvec_msg_free() вызывается для возврата сообщения обратно в пул
очистка атомного флага «использовано». Сразу после этого код
обращается к nvec->rx->data[0] для проверки типа сообщения. Поскольку nvec_msg_free() помечает слот пула как доступный черезatomic_set(),
любой одновременный или последующий вызов nvec_msg_alloc() может утверждать, что
тот же слот и перезаписать его массив data[].
Чтение nvec->rx->data[0] после
Таким образом, освобождение сообщения является использованием после освобождения. Исправьте это, сохранив байт типа сообщения перед вызовом nvec_msg_free(),
затем используйте сохраненное значение для проверки особенностей батареи.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: staging: nvec: fix use-after-free in nvec_rx_completed() In nvec_rx_completed(), when an incomplete RX transfer is detected, nvec_msg_free() is called to return the message back to the pool by clearing its 'used' atomic flag. Immediately after this, the code accesses nvec->rx->data[0] to check the message type. Since nvec_msg_free() marks the pool slot as available via atomic_set(), any concurrent or subsequent call to nvec_msg_alloc() could claim that same slot and overwrite its data[] array. Reading nvec->rx->data[0] after freeing the message is therefore a use-after-free. Fix this by saving the message type byte before calling nvec_msg_free(), then using the saved value for the battery quirk check.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
5.10.261
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
5.15.212
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
6.12.97
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
6.18.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
7.1.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.2
|
7.2-rc1
|