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

ng_fec_free_unit increments usage counter instead of decrementing + global bitmap mutated without locks

Summary

ng_fec_get_unit increments ng_units_in_use(:290). ng_fec_free_unit ALSO increments it(:315 ng_units_in_use++ should be --). Counter never decreases. if(ng_units_in_use==0)(:316) cleanup branch dead code. Signed overflow monotonic int UB. Separately ng_fec_units/len/in_use global NO lock (code notes XXX make SMP safe :316). Concurrent constructor/rmnode race on bitmap+realloc. Unit number collision, memory leak, allocator UB. Fix: change :315 to ng_units_in_use--, add lock.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0530 Β· 4 files
FileTypeDescriptionSize
VERDICT.md verdict source-confirmation + fix 980 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-0530 β€” Low-severity source-confirmation

Verdict: NOT_REPRODUCED

Impact: none Confidence: certain

Kernel ref: netgraph7/ng_fec.c:336

Mechanism / why

FALSE POSITIVE: ng_fec_free_unit DOES decrement ng_units_in_use (ng_fec.c:336 ng_units_in_use--); the claimed double-increment does not exist.

No code change needed: false positive (counter correctly decremented at :336).

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).

Confirmed kernel references

Detail

Exploit chain

none (false positive)

Evidence (decisive lines)

DF-0530 [NOT_REPRODUCED] - netgraph7/ng_fec.c:336

PoC changes

no code change (false positive) in findings/poc/DF-0530/

Verified recommended fix

No code change needed: false positive (counter correctly decremented at :336).

Verdict

FALSE POSITIVE: ng_fec_free_unit DOES decrement ng_units_in_use (ng_fec.c:336 ng_units_in_use--); the claimed double-increment does not exist.