CVE-2026-98074: bonding: do not clear curr_active_slave prematurely when releasing all slaves
In the Linux kernel, the following vulnerability has been resolved:
bonding: do not clear curractiveslave prematurely when releasing all slaves
When releasing all slaves during bond destruction (all == true), bondreleaseone() unconditionally clears bond->curractiveslave to NULL in every iteration.
If a backup slave is released before the active slave, bondalbdeinitslave() triggers rlbteachdisabledmaconprimary(), which increments the active slave dev promiscuity counter and sets bondinfo->primaryispromisc = 1.
Because bond->curractiveslave was prematurely cleared to NULL when releasing the backup slave, the subsequent iteration releasing the active slave evaluates oldcurrent as NULL, so bondchangeactiveslave(bond, NULL) is skipped. Consequently, bondalbhandleactivechange() is never called to decrement the promiscuity counter, permanently leaking promiscuous mode on the physical device after bond teardown.
When oldcurrent == slave, bondchangeactiveslave(bond, NULL) already sets bond->curractiveslave 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).
Affected Software
Event History
Frequently Asked Questions
Under what conditions can the physical interface remain in promiscuous mode?
The condition occurs during bond destruction when all slaves are released and a backup slave is released before the active slave. The active slave's promiscuity counter may be incremented during ALB cleanup but not decremented when the active slave is subsequently released.
Which bonding configuration path is implicated?
The described behavior involves the bonding ALB cleanup path, specifically bond_alb_deinit_slave() and active-slave change handling. The issue requires teardown of a bond with both an active and backup slave in the relevant release order.
What is the observable impact after teardown?
The physical device used as the active slave can remain permanently in promiscuous mode after the bond is destroyed, due to a leaked promiscuity counter.
How does the fix prevent the leak?
The fix avoids clearing curr_active_slave while releasing every slave during all-slave teardown. This allows release of the actual active slave to invoke the active-slave change handling that decrements the promiscuity counter.