В ядре Linux устранена следующая уязвимость:
spi: cadence-quadspi: анализировать DT на предмет вспышек с остальной частью анализа DT
Недавний рефакторинг того, где включен PM во время выполнения, выполненный в коммите.
f1eb4e792bb1 ("spi: spi-cadence-quadspi: включите время выполнения pm раньше, чтобы
избежать дисбаланса») привело к тому, что когда мы выполняем pm_runtime_disable()
в путях ошибок зонда() мы можем вызвать отключение во время выполнения, что в
поворот приводит к отключению дублирующих часов. Это особенно вероятно
произойдет, если описание DT для вспышек отсутствует или повреждено
подключен к контроллеру. В начале функции проверки мы выполняем pm_runtime_get_noresume(), так как
функция зонда оставляет устройство во включенном состоянии, но в
путь ошибки, мы не можем предположить, что PM включен, поэтому мы также вручную
отключить все, включая часы.
Это означает, что когда время выполнения PM
активна и она, и функция зонда выпускают одну и ту же ссылку на
основные часы для IP, вызывающие предупреждения от подсистемы часов:
[ 8.693719] clk:75:7 уже отключено
[8.693791] ВНИМАНИЕ: ЦП: 1 PID: 185 в /usr/src/kernel/drivers/clk/clk.c:1188 clk_core_disable+0xa0/0xb
...
[ 8.694261] clk_core_disable+0xa0/0xb4 (P)
[ 8.694272] clk_disable+0x38/0x60
[ 8.694283] cqspi_probe+0x7c8/0xc5c [spi_cadence_quadspi]
[ 8.694309] Platform_probe+0x5c/0xa4
Правильное решение этого вопроса осложняется тем, что мы
не знаю, активен ли PM во время выполнения, поэтому не могу сказать, отключит ли он
часы или нет. Однако мы можем обойти проблему со вспышкой.
описания, перенеся их разбор на тот момент, когда мы разбираем контроллер
свойства, которые также избавляют нас от необходимости выполнять кучу настроек, которые никогда не могут быть выполнены.
используется, так что давайте сделаем это.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: spi: cadence-quadspi: Parse DT for flashes with the rest of the DT parsing The recent refactoring of where runtime PM is enabled done in commit f1eb4e792bb1 ("spi: spi-cadence-quadspi: Enable pm runtime earlier to avoid imbalance") made the fact that when we do a pm_runtime_disable() in the error paths of probe() we can trigger a runtime disable which in turn results in duplicate clock disables. This is particularly likely to happen when there is missing or broken DT description for the flashes attached to the controller. Early on in the probe function we do a pm_runtime_get_noresume() since the probe function leaves the device in a powered up state but in the error path we can't assume that PM is enabled so we also manually disable everything, including clocks. This means that when runtime PM is active both it and the probe function release the same reference to the main clock for the IP, triggering warnings from the clock subsystem: [ 8.693719] clk:75:7 already disabled [ 8.693791] WARNING: CPU: 1 PID: 185 at /usr/src/kernel/drivers/clk/clk.c:1188 clk_core_disable+0xa0/0xb ... [ 8.694261] clk_core_disable+0xa0/0xb4 (P) [ 8.694272] clk_disable+0x38/0x60 [ 8.694283] cqspi_probe+0x7c8/0xc5c [spi_cadence_quadspi] [ 8.694309] platform_probe+0x5c/0xa4 Dealing with this issue properly is complicated by the fact that we don't know if runtime PM is active so can't tell if it will disable the clocks or not. We can, however, sidestep the issue for the flash descriptions by moving their parsing to when we parse the controller properties which also save us doing a bunch of setup which can never be used so let's do that.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 4
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.17.11
|
6.18
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18.1
|
6.18.16
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.18:-:*:*:*:*:*:*
|
— | — |