В ядре Linux устранена следующая уязвимость:
drm/amdkfd: исправлено разыменование NULL в get_queue_ids(). Когда usr_queue_id_array имеет значение NULL, а num_queues не равно нулю,
get_queue_ids() возвращает NULL. Вызывающие проверяют только IS_ERR() на
возвращаемое значение; поскольку IS_ERR(NULL) == false, проверка проходит, и
suspend_queues() вызывает q_array_invalidate(), который немедленно
разыменовывает NULL при повторении num_queues раз.
Пользовательское пространство может инициировать это с помощью kfd_ioctl_set_debug_trap(), указав
num_queues > 0 с нулевым значением length_array_ptr, что вызывает панику ядра.
NULL usr_queue_id_array с num_queues == 0 является законным бездействием.
(q_array_invalidate никогда не выполняется, а summary_queues уже защищает
все разыменованияqueue_ids после проверки NULL). Вернуть ERR_PTR(-EINVAL)
только когда num_queues не равно нулю и указатель отсутствует; оба абонента
уже распространяемый IS_ERR() правильно возвращается в пользовательское пространство.
(вишня выбрана из коммита f165a82cdf503884bb1797771c61b2fcc72113d4)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: fix NULL dereference in get_queue_ids() When usr_queue_id_array is NULL and num_queues is non-zero, get_queue_ids() returns NULL. The callers check only IS_ERR() on the return value; since IS_ERR(NULL) == false the check passes, and suspend_queues() calls q_array_invalidate() which immediately dereferences NULL while iterating num_queues times. Userspace can trigger this via kfd_ioctl_set_debug_trap() by supplying num_queues > 0 with a zero queue_array_ptr, causing a kernel panic. A NULL usr_queue_id_array with num_queues == 0 is a legitimate no-op (q_array_invalidate never executes, and resume_queues already guards all queue_ids dereferences behind a NULL check). Return ERR_PTR(-EINVAL) only when num_queues is non-zero and the pointer is absent; both callers already propagate IS_ERR() returns correctly to userspace. (cherry picked from commit f165a82cdf503884bb1797771c61b2fcc72113d4)
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.5
|
6.6.143
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.94
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.36
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.13
|
|
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:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc6:*:*:*:*:*:*
|
— | — |