CVE-2026-72389: bridge: stp: Fix a potential use-after-free when deleting a bridge
In the Linux kernel, the following vulnerability has been resolved:
bridge: stp: Fix a potential use-after-free when deleting a bridge
The three STP timers are not supposed to be armed while the bridge is administratively down. They are synchronously deactivated when the bridge is put administratively down and the various call sites check for 'IFFUP' before arming them.
This check is missing from brtopologychangedetection() and it is possible to engineer a situation in which the topology change timer is armed while the bridge is administratively down, resulting in a use-after-free [1] when the bridge is deleted.
Fix by adding the missing check and for good measures synchronously shutdown the three timers when the bridge is deleted.
[1] ODEBUG: free active (active state 0) object: ffff88811662b9b0 object type: timerlist hint: brtopologychangetimerexpired (net/bridge/brstptimer.c:120) WARNING: lib/debugobjects.c:629 at debugprintobject+0x1bc/0x450, CPU#9: ip/359