В ядре Linux устранена следующая уязвимость: Ice: исправлена очистка PTP при удалении драйвера в пути ошибки. Улучшите очистку при освобождении ресурсов PTP на пути к ошибке. Случай ошибки может произойти либо на датчике драйвера, либо на PTP. инициализации функции или при перезапуске PTP (ошибки при обработке сброса, NVM обновление и т. д.).
В обоих случаях вызовы очистки PF PTP (ice_ptp_cleanup_pf
функция) и деинициализация мьютекса «ps_lock» были пропущены. Кроме того, в последнем случае регистрация часов ptp не была отменена. Сохраняйте состояние PTP как «неинициализированное» при инициализации, чтобы различать ошибки.
сценариев и избежать дублирования выпуска ресурсов при удалении драйвера.
Последствием отсутствия вызова Ice_ptp_cleanup_pf является следующий вызов
трассировка сбрасывается при освобождении объекта Ice_adapter (список портов не пуст,
как это требуется на данном этапе):
[ T93022] ------------[ вырезать здесь ] ------------
[ T93022] ВНИМАНИЕ: ЦП: 10 PID: 93022 в
Ice/ice_adapter.c:67 Ice_adapter_put+0xef/0x100 [лед]
...
[ T93022] RIP: 0010:ice_adapter_put+0xef/0x100 [лед]
...
[ T93022] Отслеживание вызовов:
[ T93022] <ЗАДАЧА>
[ Т93022] ? Ice_adapter_put+0xef/0x100 [лед
33d2647ad4f6d866d41eefff1806df37c68aef0c]
[ Т93022] ? __warn.cold+0xb0/0x10e
[ Т93022] ? Ice_adapter_put+0xef/0x100 [лед
33d2647ad4f6d866d41eefff1806df37c68aef0c]
[ Т93022] ? report_bug+0xd8/0x150
[ Т93022] ? handle_bug+0xe9/0x110
[ Т93022] ? exc_invalid_op+0x17/0x70
[ Т93022] ? asm_exc_invalid_op+0x1a/0x20
[ Т93022] ? Ice_adapter_put+0xef/0x100 [лед
33d2647ad4f6d866d41eefff1806df37c68aef0c]
[ T93022] pci_device_remove+0x42/0xb0
[ T93022] device_release_driver_internal+0x19f/0x200
[ T93022] driver_detach+0x48/0x90
[ T93022] bus_remove_driver+0x70/0xf0
[ T93022] pci_unregister_driver+0x42/0xb0
[ T93022] Ice_module_exit+0x10/0xdb0 [лед
33d2647ad4f6d866d41eefff1806df37c68aef0c]
...
[ T93022] ---[ конечная трассировка 0000000000000000 ]---
[ T93022] лед: модуль выгружен
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ice: fix PTP cleanup on driver removal in error path Improve the cleanup on releasing PTP resources in error path. The error case might happen either at the driver probe and PTP feature initialization or on PTP restart (errors in reset handling, NVM update etc). In both cases, calls to PF PTP cleanup (ice_ptp_cleanup_pf function) and 'ps_lock' mutex deinitialization were missed. Additionally, ptp clock was not unregistered in the latter case. Keep PTP state as 'uninitialized' on init to distinguish between error scenarios and to avoid resource release duplication at driver removal. The consequence of missing ice_ptp_cleanup_pf call is the following call trace dumped when ice_adapter object is freed (port list is not empty, as it is required at this stage): [ T93022] ------------[ cut here ]------------ [ T93022] WARNING: CPU: 10 PID: 93022 at ice/ice_adapter.c:67 ice_adapter_put+0xef/0x100 [ice] ... [ T93022] RIP: 0010:ice_adapter_put+0xef/0x100 [ice] ... [ T93022] Call Trace: [ T93022] <TASK> [ T93022] ? ice_adapter_put+0xef/0x100 [ice 33d2647ad4f6d866d41eefff1806df37c68aef0c] [ T93022] ? __warn.cold+0xb0/0x10e [ T93022] ? ice_adapter_put+0xef/0x100 [ice 33d2647ad4f6d866d41eefff1806df37c68aef0c] [ T93022] ? report_bug+0xd8/0x150 [ T93022] ? handle_bug+0xe9/0x110 [ T93022] ? exc_invalid_op+0x17/0x70 [ T93022] ? asm_exc_invalid_op+0x1a/0x20 [ T93022] ? ice_adapter_put+0xef/0x100 [ice 33d2647ad4f6d866d41eefff1806df37c68aef0c] [ T93022] pci_device_remove+0x42/0xb0 [ T93022] device_release_driver_internal+0x19f/0x200 [ T93022] driver_detach+0x48/0x90 [ T93022] bus_remove_driver+0x70/0xf0 [ T93022] pci_unregister_driver+0x42/0xb0 [ T93022] ice_module_exit+0x10/0xdb0 [ice 33d2647ad4f6d866d41eefff1806df37c68aef0c] ... [ T93022] ---[ end trace 0000000000000000 ]--- [ T93022] ice: module unloaded
Характеристики атаки
Последствия
Строка CVSS v3.1