Heap overflow: if_alloc(IFT_PPP) returns sizeof(struct ifnet) but sppp_attach writes ~1KB of struct sppp fields past allocation (LATENT β file does not compile)
Summary
LATENT β file does not compile (IFP2SP/SP2IFP undefined see DF-0721). ng_sppp.c:249 if_alloc(IFT_PPP) returns sizeof(struct ifnet) only (if.c:3083-3084 only IFT_ETHER gets sizeof(arpcom)). :254 pp=IFP2SP(ifp) casts to struct sppp*. :285 sppp_attach(ifp) casts to struct sppp* and writes pp_next pp_fastq pp_cpq pp_seq[5] pp_rseq[5] state[5] timeout[5] lcp ipcp ipv6cp myauth hisauth ~1KB past allocation. Deterministic heap corruption on node creation IF file compiled. Trigger: ngctl mkpeer sppp (root netgraph socket). Fix: kmalloc(sizeof(struct sppp)) not if_alloc(IFT_PPP).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0720 Β· 8 files| File | Type | Description | Size | |
|---|---|---|---|---|
| ng_sppp_harness.c | trigger-source | structural model of the if_alloc/sppp_attach size mismatch | 2.6 KB | view raw |
| build.sh | build-script | cc -O2 -Wall | 120 B | view raw |
| run.sh | run-script | runs structural model | 96 B | view raw |
| run.log | run-log | 1024 bytes written past the ifnet-sized allocation | 370 B | view raw |
| fix.diff | suggested-fix | allocate sizeof(struct sppp); define IFP2SP/SP2IFP; fix include | 1.9 KB | view raw |
| env.txt | environment | IFP2SP undefined in sys/; no ng_sppp module | 432 B | view raw |
| ../fix_build_combined.log | build-log | Combined 41-finding kernel build (rc=0, -Werror clean) | 5.6 MB | β download |
| ../fix_build_summary.txt | build-summary | Summary of the combined 41-finding kernel build | 826 B | view raw |
Fix verification
not_testablecompile+harness validated
see evidence pack
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
β
Verdict
LATENT/dead code. ng_sppp.c doesn't compile (IFP2SP undefined). Structural overflow real: if_alloc returns sizeof(ifnet) but sppp_attach writes sizeof(sppp).
No comments yet.