В ядре Linux устранена следующая уязвимость:
драйверы: база: освобождает ресурсы devm при отмене регистрации устройства. В текущем коде devres_release_all() вызывается только в том случае, если устройство
у него есть автобус, и его проверяют. Это приводит к проблемам при использовании устройств без шины или драйверов, где
устройство может никогда не освободиться, если управляемый ресурс содержит ссылку
к устройству.
Это происходит, например, в рамках DRM. Таким образом, нам следует вызвать devres_release_all() в функции device_del(), чтобы
убедитесь, что действия, управляемые устройством, выполняются правильно, когда
устройство не зарегистрировано, даже если у него нет ни шины, ни водителя. По сути, это то же самое изменение, что и коммит 2f8d16a996da ("devres:
освободить ресурсы на device_del()"), которые были возвращены коммитом
a525a3ddeaca («ядро драйвера: бесплатные устройства в device_release») поверх
проблемы с утечками памяти.
Этот патч эффективно объединяет два упомянутых выше коммита для
освободите ресурсы как на device_del(), так и на device_release() и получите
лучшее из обоих миров.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drivers: base: Free devm resources when unregistering a device In the current code, devres_release_all() only gets called if the device has a bus and has been probed. This leads to issues when using bus-less or driver-less devices where the device might never get freed if a managed resource holds a reference to the device. This is happening in the DRM framework for example. We should thus call devres_release_all() in the device_del() function to make sure that the device-managed actions are properly executed when the device is unregistered, even if it has neither a bus nor a driver. This is effectively the same change than commit 2f8d16a996da ("devres: release resources on device_del()") that got reverted by commit a525a3ddeaca ("driver core: free devres in device_release") over memory leaks concerns. This patch effectively combines the two commits mentioned above to release the resources both on device_del() and device_release() and get the best of both worlds.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.7
|
6.1.53
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.4.16
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.5
|
6.5.3
|