В ядре Linux устранена следующая уязвимость: Ice: исправлена обработка ошибок планировщика Tx в обратном вызове XDP. Когда программа XDP загружается, обратный вызов XDP добавляет новые очереди Tx. Это означает, что обратный вызов должен обновить планировщик Tx новым номер очереди.
В случае сбоя планировщика передачи обратный вызов XDP
также должен произойти сбой и откатить все изменения, ранее сделанные для XDP.
подготовка. В предыдущей реализации была ошибка, из-за которой не все изменения, внесенные
Обратный вызов XDP был отменен. Это вызвало сбой со следующим
трассировка вызова:
[ +9.549584] Ice 0000:ca:00.0: Не удалось настроить очередь VSI LAN для XDP, ошибка: -5
[ +0.382335] Упс: общая ошибка защиты, возможно, для неканонического адреса 0x50a2250a90495525: 0000 [#1] SMP NOPTI
[ +0.010710] CPU: 103 UID: 0 PID: 0 Связь: swapper/103 Не испорчено 6.14.0-net-next-mar-31+ #14 PREEMPT (добровольно)
[ +0.010175] Имя оборудования: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 16.02.2022
[ +0.010946] RIP: 0010:__ice_update_sample+0x39/0xe0 [лед]
[...]
[ +0.002715] Отслеживание вызовов:
[ +0,002452] <IRQ>
[ +0.002021] ? __die_body.cold+0x19/0x29
[ +0,003922] ? die_addr+0x3c/0x60
[ +0.003319] ? exc_general_protection+0x17c/0x400
[ +0.004707] ? asm_exc_general_protection+0x26/0x30
[ +0,004879] ? __ice_update_sample+0x39/0xe0 [лед]
[ +0.004835] Ice_napi_poll+0x665/0x680 [лед]
[ +0.004320] __napi_poll+0x28/0x190
[ +0,003500] net_rx_action+0x198/0x360
[ +0,003752] ? update_rq_clock+0x39/0x220
[ +0.004013] handle_softirqs+0xf1/0x340
[ +0,003840] ? sched_clock_cpu+0xf/0x1f0
[ +0.003925] __irq_exit_rcu+0xc2/0xe0
[ +0.003665] common_interrupt+0x85/0xa0
[ +0.003839] </IRQ>
[ +0.002098] <ЗАДАЧА>
[ +0.002106] asm_common_interrupt+0x26/0x40
[ +0.004184] RIP: 0010:cpuidle_enter_state+0xd3/0x690
Исправьте это, выполнив отсутствующее преобразование очередей XDP из
q_vectors и вернуть указатель колец XDP в NULL после всех этих
очереди освобождаются.
Также добавьте немедленный выход из обратного вызова XDP в случае звонка. провал подготовки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ice: fix Tx scheduler error handling in XDP callback When the XDP program is loaded, the XDP callback adds new Tx queues. This means that the callback must update the Tx scheduler with the new queue number. In the event of a Tx scheduler failure, the XDP callback should also fail and roll back any changes previously made for XDP preparation. The previous implementation had a bug that not all changes made by the XDP callback were rolled back. This caused the crash with the following call trace: [ +9.549584] ice 0000:ca:00.0: Failed VSI LAN queue config for XDP, error: -5 [ +0.382335] Oops: general protection fault, probably for non-canonical address 0x50a2250a90495525: 0000 [#1] SMP NOPTI [ +0.010710] CPU: 103 UID: 0 PID: 0 Comm: swapper/103 Not tainted 6.14.0-net-next-mar-31+ #14 PREEMPT(voluntary) [ +0.010175] Hardware name: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 02/16/2022 [ +0.010946] RIP: 0010:__ice_update_sample+0x39/0xe0 [ice] [...] [ +0.002715] Call Trace: [ +0.002452] <IRQ> [ +0.002021] ? __die_body.cold+0x19/0x29 [ +0.003922] ? die_addr+0x3c/0x60 [ +0.003319] ? exc_general_protection+0x17c/0x400 [ +0.004707] ? asm_exc_general_protection+0x26/0x30 [ +0.004879] ? __ice_update_sample+0x39/0xe0 [ice] [ +0.004835] ice_napi_poll+0x665/0x680 [ice] [ +0.004320] __napi_poll+0x28/0x190 [ +0.003500] net_rx_action+0x198/0x360 [ +0.003752] ? update_rq_clock+0x39/0x220 [ +0.004013] handle_softirqs+0xf1/0x340 [ +0.003840] ? sched_clock_cpu+0xf/0x1f0 [ +0.003925] __irq_exit_rcu+0xc2/0xe0 [ +0.003665] common_interrupt+0x85/0xa0 [ +0.003839] </IRQ> [ +0.002098] <TASK> [ +0.002106] asm_common_interrupt+0x26/0x40 [ +0.004184] RIP: 0010:cpuidle_enter_state+0xd3/0x690 Fix this by performing the missing unmapping of XDP queues from q_vectors and setting the XDP rings pointer back to NULL after all those queues are released. Also, add an immediate exit from the XDP callback in case of ring preparation failure.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5
|
6.6.94
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.34
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.15.3
|