В ядре Linux устранена следующая уязвимость:
drm/v3d: отклонить пустое расширение multisync, чтобы предотвратить бесконечный цикл.
v3d_get_extensions() просматривает односвязный список, предоставленный пользовательским пространством. Расширения ioctl без каких-либо ограничений на длину цепочки. Локальный пользователь
может создать самоссылающееся расширение (ext->next == &ext) с нулем
in_sync_count и out_sync_count, которые обходят существующие дубликаты.
расширение защиты:
if (se->in_sync_count || se->out_sync_count)
вернуть -ЭИНВАЛ;
Защита никогда не срабатывает, потому что возвращает значение v3d_get_multisync_post_deps().
сразу, когда счетчик равен нулю, оставляя оба поля равными нулю при каждом
итерация.
Результатом является бесконечный цикл в контексте ядра, блокирующий
вызывающий поток и привязка ядра ЦП на неопределенный срок. Исправьте это, отклонив расширение multisync, в котором оба in_sync_count
и out_sync_count равны нулю в v3d_get_multisync_submit_deps(). Ан
пустой multisync не несет никакой информации о синхронизации и не служит
полезная цель, поэтому возврат -EINVAL для такого расширения является
правильная защита от этого вектора атаки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/v3d: Reject empty multisync extension to prevent infinite loop v3d_get_extensions() walks a userspace-provided singly-linked list of ioctl extensions without any bound on the chain length. A local user can craft a self-referential extension (ext->next == &ext) with zero in_sync_count and out_sync_count, which bypasses the existing duplicate- extension guard: if (se->in_sync_count || se->out_sync_count) return -EINVAL; The guard never fires because v3d_get_multisync_post_deps() returns immediately when count is zero, leaving both fields at zero on every iteration. The result is an infinite loop in kernel context, blocking the calling thread and pegging a CPU core indefinitely. Fix this by rejecting a multisync extension where both in_sync_count and out_sync_count are zero in v3d_get_multisync_submit_deps(). An empty multisync carries no synchronization information and serves no useful purpose, so returning -EINVAL for such an extension is the correct defense against this attack vector.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.176
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.18.33
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.9
|