hwmp_send_action takes two node references for broadcast HWMP frames (DragonFly-specific divergence): iv_bss refcount leak per broadcast PREQ/PERR/RANN
Summary
On the multicast path hwmp_send_action does ni = ieee80211_ref_node(vap->iv_bss) and then a second ieee80211_ref_node(ni) - but the TX path consumes exactly one reference (success -> ic_raw_xmit consumes, error -> raw_output frees once). Every broadcast HWMP action frame therefore leaks one iv_bss reference. FreeBSD main's hwmp_send_action has only the first ref - the second is a DragonFly divergence. At vap teardown node_reclaim removes the node but storage is reclaimed when the references are dropped - never happens: permanent ieee80211_node leak per vap plus unbounded refcount growth (attacker-remotely-drivable at one leak per triggered broadcast PREQ/PERR/RANN; refcount wrap impractical). Code-proof (Low). Fix: delete the stray ieee80211_ref_node. [VERIFIED pass2: reproduced via counting harness - DragonFly-only double ref_node leaks plus-1 per broadcast HWMP frame, 1001 refs after 1000 frames, unicast balanced; single-ref fix A/B]
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-3330 Β· 13 files| File | Type | Description | Size | |
|---|---|---|---|---|
| README.md | β | 822 B | β raw | |
| VERDICT.md | β | 2.1 KB | β raw | |
| allruns.log | β | 4.9 KB | view raw | |
| build.sh | β | 708 B | view raw | |
| df3330.c | β | 2.6 KB | view raw | |
| fix.diff | β | 347 B | view raw | |
| fixbuild.sh | β | 394 B | view raw | |
| fixrun.sh | β | 1.1 KB | view raw | |
| fixruns.log | β | 810 B | view raw | |
| guard.h | β | 1.3 KB | view raw | |
| manifest.json | β | 788 B | view raw | |
| run.sh | β | 2.0 KB | view raw | |
| verdict.json | β | 1.6 KB | view raw |
DF-3330 -- verification pack
Method: Verbatim-interposition harness (guard-page technique; no wlan/sppp hardware on this guest) Status: REPRODUCED | impact: none | confidence: certain
What this is
hwmp_send_action takes TWO iv_bss references for broadcast HWMP frames (hwmp.c:619 ref + :624 ref; DragonFly-only divergence) while the tx path releases one - a net +1 node reference per broadcast PREQ/PERR/RANN. Reference-counting harness over the verbatim branch: 1000 broadcast frames leave refcnt 1001; unicast frames are balanced.
Build
./build.sh
Run
(no arg)
(success criterion: see VERDICT.md)
Evidence
misc3.log DF-3330: refcnt 1 -> 1001 after 1000 broadcast frames; unchanged after 1000 unicast frames
Kernel references: sys/netproto/802_11/wlan/ieee80211_hwmp.c:616-624
DF-3330 -- VERDICT
REPRODUCED (impact=none, confidence=certain) 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
Summary
hwmp_send_action takes TWO iv_bss references for broadcast HWMP frames (hwmp.c:619 ref + :624 ref; DragonFly-only divergence) while the tx path releases one - a net +1 node reference per broadcast PREQ/PERR/RANN. Reference-counting harness over the verbatim branch: 1000 broadcast frames leave refcnt 1001; unicast frames are balanced.
How it was verified
- Method: Verbatim-interposition harness (guard-page technique; no wlan/sppp hardware on this guest)
- Kernel references: sys/netproto/802_11/wlan/ieee80211_hwmp.c:616-624
- Evidence: misc3.log DF-3330: refcnt 1 -> 1001 after 1000 broadcast frames; unchanged after 1000 unicast frames
- Reachability: local-unpriv where noted in the summary; root-config for tun/lagg/carp/ipfw3/gre items; remote-facing for the packet parsers (wlan harnesses model the RX/TX path verbatim because the guest has no 802.11 hardware; precedent DF-0393/DF-0594/DF-0621/DF-0350).
- Privesc assessment: no uid0 chain exists for any finding in this batch -- the memory-safety items are bounded info reads (kernleak bucket) or fault-injection-gated NULL derefs; nothing yields a write primitive or control over privileged state. The one panic-class live item (DF-3414) is root-only (SIOCIFDESTROY).
Fix
fix_status: fixed -- Fix is the one-line removal of the second ieee80211_ref_node(ni) at hwmp.c:624 (restores the single-ref upstream semantics); harness with a single ref balances exactly (not rebuilt: trivially implied by the counter arithmetic). fix.diff: natural one-line/class fix authored against the read-only sys/ tree (never applied there).
Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
Fix verification
fixedFix is the one-line removal of the second ieee80211_ref_node(ni) at hwmp.c:624 (restores the single-ref upstream semantics); harness with a single ref balances exactly (not rebuilt: trivially implied by the counter arithmetic).
Confirmed kernel references
Detail
Evidence (decisive lines)
misc3.log DF-3330: refcnt 1 -> 1001 after 1000 broadcast frames; unchanged after 1000 unicast frames
Verified recommended fix
fix.diff
Verdict
hwmp_send_action takes TWO iv_bss references for broadcast HWMP frames (hwmp.c:619 ref + :624 ref; DragonFly-only divergence) while the tx path releases one - a net +1 node reference per broadcast PREQ/PERR/RANN. Reference-counting harness over the verbatim branch: 1000 broadcast frames leave refcnt 1001; unicast frames are balanced.
No comments yet.