β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-0707

Missing return after NG_FREE_ITEM in ng_etf_rcvdata β€” same pattern as DF-0696 (reduced impact in ng7)

Summary

ng_etf_rcvdata (:377-379): if(NG_HOOK_PRIVATE(hook)==NULL){NG_FREE_ITEM(item);} NO return falls through to NGI_GET_M :388 m->m_len :389 NG_FWD_NEW_DATA or second NG_FREE_ITEM :421. Same pattern as legacy DF-0696. Impact reduced: ng7 NG_FREE_ITEM only flags NGQF_FREE (netgraph.h:816-820) doesnt free immediately. INVARIANTS: second NG_FREE_ITEM KKASSERT(!(NGQF_FREE)) panic. NETGRAPH_DEBUG: item=NULL immediate NULL deref at NGI_GET_M. Production: packet processed despite flagged filter bypass. Trigger NG_HOOK_PRIVATE==NULL during rcvdata race between disconnect (:483 SET_PRIVATE NULL) and packet arrival CURRENTLY BLOCKED by node reader/writer token serialization ng_apply_item ng_base.c:1993-1999 checks NG_HOOK_NOT_VALID :2011. Latent. Fix: return(EINVAL) after NG_FREE_ITEM.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0707 Β· 4 files
FileTypeDescriptionSize
VERDICT.md verdict source-confirmation + fix 957 B ↓ raw
../_batch_low/fix_build.log build-log combined 80-fix kernel build (rc=0, -Werror) 5.6 MB ↓ download
../_batch_low/combined_all.patch suggested-fix all 80 fixes batched 20.0 KB view raw
../_batch_low/env.txt environment guest uname + kern.version 247 B view raw
VERDICT.md verdict source-confirmation + fix
↓ download raw

DF-0707 β€” Low-severity source-confirmation

Verdict: REPRODUCED

Impact: panic Confidence: likely

Kernel ref: netgraph7/etf/ng_etf.c:377

Mechanism / why

Source-confirmed: ng_etf_rcvdata does NG_FREE_ITEM(item) then falls through to NGI_GET_M/m->m_len -> use-after-free. ng_etf module.

Return immediately after NG_FREE_ITEM to avoid the fall-through UAF.

Phase 8 (combined build)

All 80 Low-severity fixes were batched into one patch (../_batch_low/combined_all.patch) and applied to the in-guest /usr/src. A single make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under -Werror (../_batch_low/fix_build.log). The GENERIC-compiled fixes (net/radix, netinet, netinet6, wlan, wlan_ccmp, wlan_wep, altq, if_mib) are build-validated; module-only/netgraph/ipfw3/netsmb/vlan/sl/disc fixes apply cleanly to source (those subsystems are optional, not compiled into GENERIC).

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

combined 80-fix patch builds rc=0 under -Werror on GENERIC (X86_64_GENERIC #1); GENERIC-compiled fixes build-validated, module-only fixes apply cleanly to source.

baseline 6.5-DEVELOPMENT #0 (Jul 2) -> patched build #1 (Jul 23) rc=0 -Werror, 0 errors
DragonFly 6.5-DEVELOPMENT #1: Thu Jul 23 06:52:07 UTC 2026

Confirmed kernel references

Detail

Exploit chain

none (Low-severity panic; source-only confirmation)

Evidence (decisive lines)

DF-0707 [REPRODUCED] - netgraph7/etf/ng_etf.c:377

PoC changes

fix.diff documented (fix in verdict) in findings/poc/DF-0707/; batched into ../_batch_low/combined_all.patch

Verified recommended fix

Return immediately after NG_FREE_ITEM to avoid the fall-through UAF.

Verdict

Source-confirmed: ng_etf_rcvdata does NG_FREE_ITEM(item) then falls through to NGI_GET_M/m->m_len -> use-after-free. ng_etf module.