В ядре Linux устранена следующая уязвимость:
драйверы: tty: серийный: исправлена взаимоблокировка в sa1100_set_termios(). В sa1100_set_termios() возникла тупиковая ситуация, которая показана
ниже:
(Тема 1) | (Тема 2)
| sa1100_enable_ms()
sa1100_set_termios() | mod_timer()
spin_lock_irqsave() //(1) | (подождите некоторое время)
... | sa1100_timeout()
del_timer_sync() | spin_lock_irqsave() //(2)
(таймер ожидания остановки) | ... Удерживаем sport->port.lock в позиции (1) потока 1 и
используйте del_timer_sync(), чтобы дождаться остановки таймера, но обработчик таймера
также нужен sport->port.lock в позиции (2) потока 2.
В результате
sa1100_set_termios() будет заблокирован навсегда. Этот патч перемещает del_timer_sync() перед spin_lock_irqsave().
чтобы не допустить тупика.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drivers: tty: serial: Fix deadlock in sa1100_set_termios() There is a deadlock in sa1100_set_termios(), which is shown below: (Thread 1) | (Thread 2) | sa1100_enable_ms() sa1100_set_termios() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | sa1100_timeout() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold sport->port.lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need sport->port.lock in position (2) of thread 2. As a result, sa1100_set_termios() will block forever. This patch moves del_timer_sync() before spin_lock_irqsave() in order to prevent the deadlock.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
— |
4.9.318
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.10
|
4.14.283
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.15
|
4.19.247
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.20
|
5.4.198
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5
|
5.10.122
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.47
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
5.17.15
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.18
|
5.18.4
|