В ядре Linux устранена следующая уязвимость: bonding: не очищать curr_active_slave преждевременно при освобождении всех рабов When освобождает всех рабов во время разрушения облигаций (all true), __bond_release_one() безоговорочно очищает bond->curr_active_slave до NULL в каждой итерации. Если резервный раб выпущен до активного раба, bond_alb_deinit_slave() запускает rlb_teach_disabled_mac_on_primary(), который увеличивает счетчик беспорядочности активного раба dev и устанавливает bond_info->primary_is_promisc 1. Поскольку bond->curr_active_slave был преждевременно очищен до NULL при выпуске резервного раба, последующая итерация, освобождающая активного раба, оценивает старый ток как NULL, поэтому bond_change_active_slave(bond, NULL) пропущен.
Следовательно, bond_alb_handle_active_change() никогда не вызывается для уменьшения счетчика беспорядочности, постоянно пропуская беспорядочный режим на физическом устройстве после разрыва связи. Когда oldcurrent slave, bond_change_active_slave(bond, NULL) уже устанавливает bond->curr_active_slave в NULL. Нам нужно только избегать выбора нового активного раба, когда все истинно.
Replace the if (all) branch with if (!all && oldcurrent == slave).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: bonding: do not clear curr_active_slave prematurely when releasing all slaves When releasing all slaves during bond destruction (all == true), __bond_release_one() unconditionally clears bond->curr_active_slave to NULL in every iteration. If a backup slave is released before the active slave, bond_alb_deinit_slave() triggers rlb_teach_disabled_mac_on_primary(), which increments the active slave dev promiscuity counter and sets bond_info->primary_is_promisc = 1. Because bond->curr_active_slave was prematurely cleared to NULL when releasing the backup slave, the subsequent iteration releasing the active slave evaluates oldcurrent as NULL, so bond_change_active_slave(bond, NULL) is skipped. Consequently, bond_alb_handle_active_change() is never called to decrement the promiscuity counter, permanently leaking promiscuous mode on the physical device after bond teardown. When oldcurrent == slave, bond_change_active_slave(bond, NULL) already sets bond->curr_active_slave to NULL. We only need to avoid selecting a new active slave when all == true. Replace the if (all) branch with if (!all && oldcurrent == slave).
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.9
|
6.12.111
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.9
|
6.18.53
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.9
|
7.2.7
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.9
|
7.3-rc2
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.3:rc1:*:*:*:*:*:*
|
— | — |