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

Error-path kfree uses wrong malloc type M_NETGRAPH_SPPP for M_IFNET allocation and bypasses if_free (LATENT β€” file does not compile)

Summary

LATENT β€” file does not compile (DF-0721). ng_sppp.c:249 ifp=if_alloc(IFT_PPP) allocates M_IFNET (if.c:3086). :261-262 error path kfree(pp,M_NETGRAPH_SPPP) where pp=(struct sppp*)ifp same pointer β€” frees M_IFNET allocation with wrong type tag. Also bypasses if_free() which shutdown :396 uses correctly. Corrupts malloc-type accounting leaks if_l2com if IFT_PPP ever gains com_alloc hook. Reachable on M_NULLOK OOM only. Fix: if_free(ifp) instead of kfree(pp,M_NETGRAPH_SPPP).

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

Verdict: INCONCLUSIVE

Impact: dos Confidence: likely

Kernel ref: netgraph7/ng_sppp.c:261

Mechanism / why

LATENT: file does not compile (DF-0721); ng_sppp.c ifp=if_alloc() then on the error path kfrees(pp) without if_free(ifp) -> leaked ifnet. Source-confirmed in a non-compiling module.

if_free(ifp) on the error path.

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 (latent; source-confirmed)

Evidence (decisive lines)

DF-0723 [INCONCLUSIVE] - netgraph7/ng_sppp.c:261

PoC changes

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

Verified recommended fix

if_free(ifp) on the error path.

Verdict

LATENT: file does not compile (DF-0721); ng_sppp.c ifp=if_alloc() then on the error path kfrees(pp) without if_free(ifp) -> leaked ifnet. Source-confirmed in a non-compiling module.