В ядре Linux устранена следующая уязвимость:
LoongArch: Сообщайте об умирающем ЦП в RCU в stop_this_cpu()
Это порт фиксации MIPS 9f3f3bdc6d9dac1 («MIPS: smp: report death
CPU к RCU в stop_this_cpu()"). smp_send_stop() паркует все вторичные
Процессоры в stop_this_cpu(). И эта функция помечает процессор в автономном режиме для
планировщик через set_cpu_online(false), но никогда не информирует RCU, поэтому RCU сохраняет
ожидая состояния покоя от процессоров, которые теперь вращаются вечно с
прерывания отключены. Пока ничего не ожидает льготного периода RCU после smp_send_stop()
это безвредно, поэтому и осталось незамеченным.
Однако, поскольку совершить
91840be8f710370 ("irq_work: исправлено использование после освобождения в irq_work_single() на
PREEMPT_RT"), irq_work_sync() вызываетsync_rcu() на архитектурах.
без собственного IPI irq_work, т. е. где Arch_irq_work_has_interrupt()
возвращает ложь. Любой irq_work_sync(), выданный при перезагрузке/выключении/остановке.
путь после smp_send_stop() затем блокируется на льготный период, который никогда не может
завершено, висит перезагрузка:
ВНИМАНИЕ: ЦП: 0 PID: 15 в ядре/irq_work.c:144 irq_work_queue_on
...
rcu: ИНФОРМАЦИЯ: rcu_sched обнаружил зависания процессоров/задач:
rcu: отключенный ЦП 1 блокирует текущий GP.
rcu: отключенный ЦП 2 блокирует текущий GP.
rcu: отключенный ЦП 3 блокирует текущий GP. Для воспроизведения этой проблемы требуются некоторые хаки, и это не было замечено на
LoongArch, потому что Arch_irq_work_has_interrupt() обычно возвращает true.
Вызов rcutree_report_cpu_dead() после отключения прерываний, зеркалирование
общий автономный путь горячего подключения ЦП, поэтому RCU перестает ждать на припаркованном
Процессоры и льготные периоды все еще могут завершиться. LoongArch отключает все процессоры
здесь без использования механизма горячего подключения ЦП, поэтому этот отчет
иначе не выдается.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: LoongArch: Report dying CPU to RCU in stop_this_cpu() This is a port of MIPS commit 9f3f3bdc6d9dac1 ("MIPS: smp: report dying CPU to RCU in stop_this_cpu()"). smp_send_stop() parks all secondary CPUs in stop_this_cpu(). And the function marks the CPU offline for the scheduler via set_cpu_online(false) but never informs RCU, so RCU keeps expecting a quiescent state from CPUs that are now spinning forever with interrupts disabled. As long as nothing waits for an RCU grace period after smp_send_stop() this is harmless, which is why it went unnoticed. However, since commit 91840be8f710370 ("irq_work: Fix use-after-free in irq_work_single() on PREEMPT_RT"), irq_work_sync() calls synchronize_rcu() on architectures without an irq_work self-IPI, i.e. where arch_irq_work_has_interrupt() returns false. Any irq_work_sync() issued in the reboot/shutdown/halt path after smp_send_stop() then blocks on a grace period that can never complete, hanging the reboot: WARNING: CPU: 0 PID: 15 at kernel/irq_work.c:144 irq_work_queue_on ... rcu: INFO: rcu_sched detected stalls on CPUs/tasks: rcu: Offline CPU 1 blocking current GP. rcu: Offline CPU 2 blocking current GP. rcu: Offline CPU 3 blocking current GP. This issue needs some hacks to reproduce, and it was not noticed on LoongArch because arch_irq_work_has_interrupt() usually returns true. Call rcutree_report_cpu_dead() once interrupts are disabled, mirroring the generic CPU-hotplug offline path, so RCU stops waiting on the parked CPUs and grace periods can still complete. LoongArch shuts down all CPUs here without going through the CPU-hotplug mechanism, so this report is not otherwise issued.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 11
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1.175
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.142
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12.92
|
6.12.95
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18.34
|
6.18.38
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.0.11
|
7.1
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.1.1
|
7.1.3
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc7:*:*:*:*:*:*
|
— | — |