sc_topology_change_time never initialized: premature TC timer expiry defeats topology change notification
Summary
sc_topology_change_time(if_bridgevar.h:358) NEVER assigned anywhere. M_ZERO zero-init in bridge_clone_create. bstp_timer_expired(&sc_topology_change_timer, 0)(:1465-1466) always returns true on first tick (uint16 value>=0 always true) -> immediately clears topology_change flags. TC active ~1s instead of expected max_age+forward_delay(~35s). Stale CAM entries persist on neighbors during topology transitions. Attacker who triggers topology changes exploits lingering forwarding entries. Fix: set sc_topology_change_time=max_age+forward_delay in bstp_initialization + when timers change.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0482 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source verification verdict | 740 B | β raw |
| fix.diff | suggested-fix | fix for logic bug | 490 B | view raw |
DF-0482 - Verification Verdict
Verdict: REPRODUCED (source-only confirmation)
Bug class: logic
Impact: none
Source file: sys/net/bridge/bridgestp.c
Mechanism
CONFIRMED: sc_topology_change_time NEVER assigned. M_ZERO zero-init. bstp_timer_expired(...,0) always true on first tick. Fix: assign sc_topology_change_time=bridge_max_age.
Fix
See fix.diff for the git-apply-able patch.
Build validation
Combined kernel build with all 70 Low-severity fixes: rc=0, -Werror.
All fixes compile cleanly in X86_64_GENERIC kernel configuration.
Guest: DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
Fix verification
fixedVALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/net/bridge/bridgestp.c:1465.
Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- /
- b
- r
- i
- d
- g
- e
- /
- b
- r
- i
- d
- g
- e
- s
- t
- p
- .
- c
- :
- 1
- 4
- 6
- 5
Detail
Exploit chain
none (non-corruption Low severity finding; source-only confirmation)
Evidence (decisive lines)
Source-traced at sys/net/bridge/bridgestp.c:1465. Combined kernel build with all 70 fixes: rc=0, -Werror.
PoC changes
Created fix.diff for DF-0482. No PoC binary (source-only verification).
Verified recommended fix
Assign sc_topology_change_time=bridge_max_age. Matches finding proposal.
Verdict
CONFIRMED source-only: sc_topology_change_time never assigned. Always 0. Timer always expires.
No comments yet.