В ядре Linux была устранена следующая уязвимость: USB: core: Fix deadlock in usb_deauthorize_interface() Among atribute file callback routines in drivers/usb/core/sysfs.c, функция interface_authorized_store() является единственной, которая приобретает блокировку устройства на предком устройстве: It вызывает usb_deauthorize_interface(), которая блокирует родительское устройство интерфейса USB. Это приведет к тупиковой ситуации, если другой процесс уже владеет этим блокировкой и пытается удалить интерфейс, будь то через изменение конфигурации или потому, что устройство было отключено. В рамках процедуры удаления device_del() ожидает завершения всех текущих вызовов атрибутов sysfs.
Но usb_deauthorize_interface() не может завершиться до тех пор, пока не будет выпущен замок устройства, и замок не будет выпущен до тех пор, пока удаление не будет завершено. Механизм, предоставляемый sysfs для предотвращения такого рода тупика, заключается в использовании функции sysfs_break_active_protection(), которая говорит sysfs не ждать обратного вызова атрибута. Reported-and-tested by: Yue Sun <samsun1006219@gmail.com> Reported by: xingwei lee <xrivendell7@gmail.com>
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: USB: core: Fix deadlock in usb_deauthorize_interface() Among the attribute file callback routines in drivers/usb/core/sysfs.c, the interface_authorized_store() function is the only one which acquires a device lock on an ancestor device: It calls usb_deauthorize_interface(), which locks the interface's parent USB device. The will lead to deadlock if another process already owns that lock and tries to remove the interface, whether through a configuration change or because the device has been disconnected. As part of the removal procedure, device_del() waits for all ongoing sysfs attribute callbacks to complete. But usb_deauthorize_interface() can't complete until the device lock has been released, and the lock won't be released until the removal has finished. The mechanism provided by sysfs to prevent this kind of deadlock is to use the sysfs_break_active_protection() function, which tells sysfs not to wait for the attribute callback. Reported-and-tested by: Yue Sun <samsun1006219@gmail.com> Reported by: xingwei lee <xrivendell7@gmail.com>
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.4
|
4.19.312
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.20.0
|
5.4.274
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5.0
|
5.10.215
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11.0
|
5.15.154
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16.0
|
6.1.84
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2.0
|
6.6.24
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7.0
|
6.7.12
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8.0
|
6.8.3
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:r1:*:*:*:*:*:*
|
— | — |