В ядре Linux была устранена следующая уязвимость: drm/vc4: Disable прерывание V3D через время выполнения приостанавливает vc4_irq_disable() маскирует источники прерываний V3D, а затем вызывает synchronize_irq() перед выключением V3D. Однако само по себе этого недостаточно, чтобы успокоить обработчика прерываний. synchronize_irq () ждет обработчиков, которые уже установили IRQD_IRQ_INPROGRESS, а для irqchips сообщает о IRQCHIP_STATE_ACTIVE. Чип прерывания GIC может отметить прерывание активным, как только CPU признает это, поэтому эти проверки охватывают весь путь отправки.
На RPi 0-3, однако, контроллером прерывания является ARMCTRL, который не имеет активного состояния. CPU, который прочитал hwirq из ожидающего регистра, но еще не достиг handle_level_irq (), остается невидимым для synchronize_irq (). При переходе питания vc4_irq() может работать после выключения домена питания, где каждый прочитанный регистр V3D возвращает 0xdeadbeef. 0xdeadbeef имеет набор FLDONE, FRDONE и OUTOMEM.
Эта проблема не вызывает проблем с удалением указателей NULL только потому, что функции vc4_irq_finish_bin_job() и vc4_irq_finish_render_job() возвращаются раньше, когда нет указателя задания, но OUTOMEM все еще может планировать vc4_overflow_mem_work() после того, как vc4_irq_disable() уже отменил его. Поэтому исправьте ложные прерывания, отключив линию прерывания через переход PM. Чтобы сохранить баланс enable/disable, переместите vc4_irq_install() и запросите отключение строки IRQ до первого резюме во время выполнения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/vc4: Disable the V3D interrupt across runtime suspend vc4_irq_disable() masks the V3D interrupt sources and then calls synchronize_irq() before the V3D is powered down. However, by itself, this is not enough to quiesce the interrupt handler. synchronize_irq() waits for handlers that have already set IRQD_IRQ_INPROGRESS, and for irqchips reporting IRQCHIP_STATE_ACTIVE. A GIC interrupt chip is able to mark an interrupt active as soon as a CPU acknowledges it, so there these checks cover the whole dispatch path. On RPi 0-3, however, the interrupt controller is ARMCTRL, which has no active state. A CPU that has read the hwirq out of the pending register but has not yet reached handle_level_irq() stays invisible to synchronize_irq(). During a power transition, vc4_irq() may therefore run after the power domain is off, where every V3D register read will return 0xdeadbeef. 0xdeadbeef has FLDONE, FRDONE and OUTOMEM set. This problem doesn't trigger NULL pointer dereference issues only because the functions vc4_irq_finish_bin_job() and vc4_irq_finish_render_job() return early when there is no job pointer, but OUTOMEM is still able to schedule vc4_overflow_mem_work() after vc4_irq_disable() has already cancelled it. Therefore, fix the spurious interrupts by disabling the interrupt line across the PM transition. To preserve the enable/disable balance, move vc4_irq_install() and request the IRQ line disabled before the first runtime resume.
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
7.2.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
7.3
|