В ядре Linux устранена следующая уязвимость:
usb: xhci: исправлена утечка памяти в xhci_disable_slot().
xhci_alloc_command() выделяет структуру команды и, когда
второй аргумент имеет значение true, также выделяет структуру завершения. В настоящее время путь обработки ошибок в xhci_disable_slot() освобождает только
структура команды с использованием kfree(), вызывающая структуру завершения
протекать. Используйте xhci_free_command() вместо kfree(). xhci_free_command() правильно
освобождает как командную структуру, так и связанную с ней структуру завершения.
Поскольку структура команд выделяется с нулевой инициализацией,
команда->in_ctx имеет значение NULL и не будет ошибочно освобождена
xhci_free_command(). Эта ошибка была обнаружена с помощью экспериментального инструмента статического анализа, которым мы являемся.
развивается. Инструмент основан на платформе LLVM и специально предназначен для
предназначен для обнаружения проблем с управлением памятью.
В настоящее время он находится под
находится в активной разработке и пока не доступен публично, но мы планируем
откройте исходный код после публикации нашего исследования. Первоначально ошибка была обнаружена в версии 6.13-rc1 с помощью нашего статического анализа.
инструмент, и мы убедились, что проблема сохраняется в последней основной ветке
ядро. Мы провели тестирование сборки на x86_64 с помощью alliesconfig, используя GCC=11.4.0.
Поскольку для запуска этих путей ошибок в xhci_disable_slot() требуются определенные
состояние оборудования или ненормальное состояние, мы не смогли построить тест
случай, чтобы надежно вызвать эти конкретные пути ошибок во время выполнения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: usb: xhci: Fix memory leak in xhci_disable_slot() xhci_alloc_command() allocates a command structure and, when the second argument is true, also allocates a completion structure. Currently, the error handling path in xhci_disable_slot() only frees the command structure using kfree(), causing the completion structure to leak. Use xhci_free_command() instead of kfree(). xhci_free_command() correctly frees both the command structure and the associated completion structure. Since the command structure is allocated with zero-initialization, command->in_ctx is NULL and will not be erroneously freed by xhci_free_command(). This bug was found using an experimental static analysis tool we are developing. The tool is based on the LLVM framework and is specifically designed to detect memory management issues. It is currently under active development and not yet publicly available, but we plan to open-source it after our research is published. The bug was originally detected on v6.13-rc1 using our static analysis tool, and we have verified that the issue persists in the latest mainline kernel. We performed build testing on x86_64 with allyesconfig using GCC=11.4.0. Since triggering these error paths in xhci_disable_slot() requires specific hardware conditions or abnormal state, we were unable to construct a test case to reliably trigger these specific error paths at runtime.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 13
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.19.221
|
4.20
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.4.165
|
5.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.10.85
|
5.10.253
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15.8
|
5.15.203
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.167
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.130
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.78
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.19
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
|
— | — |