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

Unit-number bitmap length tracked in unsigned char: truncates after ~2040 nodes causing duplicate unit allocation (LATENT β€” file does not compile)

Summary

LATENT β€” file does not compile (DF-0721). ng_sppp_units_len is unsigned char :103 max 255. Growth formula newlen=2*len+1 :122 produces >255 after 8 extensions. Back-assignment ng_sppp_units_len=newlen :134 truncates to 255. Search loop :116-117 terminates at 255 re-enters extension bcopy only copies 255 bytes bzero wipes mark at byte 255 (unit 2040) re-issues same unit number producing duplicate if_xname. ng_units_in_use :104 also unsigned char wraps at 256 interfaces. Fix: promote both to int (sibling ng_iface.c already uses int).

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0722 Β· 5 files
FileTypeDescriptionSize
fix.diff suggested-fix Widen ng_sppp_units_len / cap growth. 433 B view raw
VERDICT.md verdict source-confirmation + fix 1.0 KB ↓ 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-0722 β€” Low-severity source-confirmation

Verdict: INCONCLUSIVE

Impact: dos Confidence: likely

Kernel ref: netgraph7/ng_sppp.c:122

Mechanism / why

LATENT: file does not compile (DF-0721); ng_sppp_units_len is unsigned char (max 255); newlen=2*len+1 overflows after 8 expansions. Source-confirmed in a non-compiling module.

Widen ng_sppp_units_len / cap growth.

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

A standalone git apply-able fix.diff is in this folder.

Confirmed kernel references

Detail

Exploit chain

none (latent; source-confirmed)

Evidence (decisive lines)

DF-0722 [INCONCLUSIVE] - netgraph7/ng_sppp.c:122

PoC changes

fix.diff present in findings/poc/DF-0722/; batched into ../_batch_low/combined_all.patch

Verified recommended fix

Widen ng_sppp_units_len / cap growth.

Verdict

LATENT: file does not compile (DF-0721); ng_sppp_units_len is unsigned char (max 255); newlen=2*len+1 overflows after 8 expansions. Source-confirmed in a non-compiling module.