В ядре Linux устранена следующая уязвимость:
i40e: исправить состояние гонки, добавив промежуточное состояние синхронизации фильтра. Исправьте состояние гонки в драйвере i40e, которое приводит к фильтрам MAC/VLAN.
повреждается и протекает. Устраните проблему, возникающую в разделе
большая нагрузка, когда несколько потоков одновременно изменяют MAC/VLAN
фильтрует, устанавливая Mac и порт VLAN.
1.
Поток T0 выделяет фильтр в i40e_add_filter() внутри
i40e_ndo_set_vf_port_vlan().
2. Поток T1 одновременно освобождает фильтр в __i40e_del_filter() внутри
i40e_ndo_set_vf_mac().
3. Впоследствии i40e_service_task() вызывает i40e_sync_vsi_filters(), который
относится к уже освобожденной памяти фильтра, что приводит к повреждению.
Этапы воспроизведения:
1. Создайте несколько VF.
2. Примените параллельную большую нагрузку, выполняя параллельные операции для изменения
MAC-адреса на VF и измените VLAN портов на хосте.
3.
Обратите внимание на ошибки в dmesg: «Ошибка I40E_AQ_RC_ENOSPC при добавлении фильтров RX на VF XX, пожалуйста, включите беспорядочную связь вручную для VF XX». Точный код для стабильного воспроизведения Intel сейчас не может открыть исходный код. Исправление включает в себя реализацию нового промежуточного состояния фильтра.
I40E_FILTER_NEW_SYNC — на время, когда фильтр находится в tmp_add_list. Эти фильтры нельзя удалить напрямую из хеш-списка, но
должны быть удалены с использованием полного процесса.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: i40e: fix race condition by adding filter's intermediate sync state Fix a race condition in the i40e driver that leads to MAC/VLAN filters becoming corrupted and leaking. Address the issue that occurs under heavy load when multiple threads are concurrently modifying MAC/VLAN filters by setting mac and port VLAN. 1. Thread T0 allocates a filter in i40e_add_filter() within i40e_ndo_set_vf_port_vlan(). 2. Thread T1 concurrently frees the filter in __i40e_del_filter() within i40e_ndo_set_vf_mac(). 3. Subsequently, i40e_service_task() calls i40e_sync_vsi_filters(), which refers to the already freed filter memory, causing corruption. Reproduction steps: 1. Spawn multiple VFs. 2. Apply a concurrent heavy load by running parallel operations to change MAC addresses on the VFs and change port VLANs on the host. 3. Observe errors in dmesg: "Error I40E_AQ_RC_ENOSPC adding RX filters on VF XX, please set promiscuous on manually for VF XX". Exact code for stable reproduction Intel can't open-source now. The fix involves implementing a new intermediate filter state, I40E_FILTER_NEW_SYNC, for the time when a filter is on a tmp_add_list. These filters cannot be deleted from the hash list directly but must be removed using the full process.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.10
|
5.15.172
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.117
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.61
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.11.8
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:rc6:*:*:*:*:*:*
|
— | — |