В ядре Linux устранена следующая уязвимость:
pds_core: исправить тупик между потоком сброса и удалением
pci_reset_function() получает значение device_lock перед выполнением сброса.
pdsc_remove() вызывается ядром PCI с уже удержанной блокировкой устройства. Если pdsc_pci_reset_thread() выполняется при вызове pdsc_remove(),
Destroy_workqueue() заблокирует ожидание завершения работы, а
работа блокируется в ожидании device_lock - взаимоблокировка. Используйте pci_try_reset_function(), который внутренне использует pci_dev_trylock().
При этом будет получена как блокировка устройства, так и блокировка доступа к конфигурации PCI.
без блокировки — если какая-либо блокировка оспаривается, возвращается -EAGAIN
немедленно. Это позволяет избежать тупиковой ситуации и одновременно обеспечивает надлежащее
сериализация доступа к пространству конфигурации во время сброса. Вызовы pci_dev_get/put также удалены, поскольку они были ненужными:
рабочая очередь, принадлежащая драйверу, уничтожается в pdsc_remove(), гарантируя
работа завершается до возврата возврата.
Ядро PCI сохраняет свою
ссылка на pci_dev на протяжении всей последовательности отмены привязки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: pds_core: fix deadlock between reset thread and remove pci_reset_function() acquires device_lock before performing the reset. pdsc_remove() is called by the PCI core with device_lock already held. If pdsc_pci_reset_thread() is running when pdsc_remove() is called, destroy_workqueue() will block waiting for the work to complete, while the work is blocked waiting for device_lock - deadlock. Use pci_try_reset_function() which uses pci_dev_trylock() internally. This acquires both the device lock and the PCI config access lock without blocking - if either lock is contended, it returns -EAGAIN immediately. This avoids the deadlock while also ensuring proper config space access serialization during the reset. The pci_dev_get/put calls are also removed as they were unnecessary - the driver-owned workqueue is destroyed in pdsc_remove(), guaranteeing the work completes before remove returns. The PCI core holds its reference to pci_dev throughout the entire unbind sequence.
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.9
|
6.12.101
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.9
|
6.18.42
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.9
|
7.1.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.9
|
7.2
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8.7
|
— |