sys/netgraph7/ng_device.c is non-compilable, unwired FreeBSD-port rot (all defects latent)
Summary
Guest-verified: an out-of-tree kmod build of the unmodified file produces 64 errors (struct cdevsw members, D_VERSION/MTX_DEF undeclared, ifq_mtx, msleep, m_uiotombuf etc.). It is absent from sys/netgraph7/Makefile SUBDIR, gated by 'optional netgraph7_device' which no kernel config defines, and /boot/kernel/ng_device.ko does not exist. The v1 twin is likewise unwired. Every defect in this file (DF-3547, DF-3548) is unreachable until the port is completed - or the file deleted. Platform fact recorded; it silently accumulates CVE-able patterns that activate the moment someone completes the port without the lifetime fix.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-3549 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| README.md | file | 1.5 KB | β raw | |
| verdict.json | file | 1.6 KB | view raw |
DF-3549 β sys/netgraph7/ng_device.c is non-compilable, unwired FreeBSD-port rot
Info-level finding documenting why DF-3547/DF-3548 (and any future bug in this file) are latent only:
- Does not compile. Guest-verified out-of-tree kmod build: 64 errors β
struct cdevswhas no memberd_open/d_close/d_read/d_write/d_poll/d_name,unknown type name 'd_poll_t',D_VERSIONundeclared,MTX_DEFundeclared,struct ifqueue has no member 'ifq_mtx',implicit declaration of IF_LOCK,_IF_QFULL,IFQ_SET_MAXLEN,IFQ_IS_EMPTY,msleep,unit2minor,m_uiotombuf(full log: ../DF-3547/build.log). None of these FreeBSD primitives exist anywhere in DragonFly headers. - Wired into no build.
sys/netgraph7/MakefileSUBDIR has nodeviceentry;sys/conf/files:1699gates it behindoptional netgraph7_device; no kernel config in the tree definesNETGRAPH7_DEVICE(sys/conf/options:302is the only reference). - The v1 twin
sys/netgraph/ng_device.cis likewise absent fromsys/conf/filesandsys/netgraph/Makefile(both variants dead since their respective imports).
Recommendation: either complete the DragonFly port (struct dev_ops-based cdevsw, DF sleep/queue primitives, plus the DF-3547 lifetime fix) and wire it into the module Makefile, or delete the file. As it stands it silently rots and gathers unverifiable CVE-able patterns.
Phase V: skipped (Info; the "verification" of this finding is the compile log in ../DF-3547/build.log plus env.txt).
Fix verification
not_testablenot_applicable β Info documentation finding
n/a
Confirmed kernel references
- sys/netgraph7/ng_device.c:116
- sys/netgraph7/ng_device.c:171
- sys/netgraph7/ng_device.c:179
- sys/conf/files:1699
- sys/conf/options:302
- sys/netgraph7/Makefile
Detail
Evidence (decisive lines)
../DF-3547/build.log (compile failure), ../DF-3547/env.txt (module absence, config grep)
PoC changes
n/a
Verified recommended fix
Complete the FreeBSD->DragonFly port (dev_ops cdevsw, DF sleep/queue primitives, DF-3547 lifetime fix) and add 'device' to sys/netgraph7/Makefile SUBDIR β or remove the file.
Verdict
SKIPPED per contract (Info). Fact verified directly on the guest and host: sys/netgraph7/ng_device.c cannot compile against DragonFly headers (64-error kmod build log in ../DF-3547/build.log) and is wired into no build (no SUBDIR in sys/netgraph7/Makefile; optional netgraph7_device never enabled in any kernel config; /boot/kernel/ng_device.ko absent). All defects in this file (DF-3547, DF-3548) are therefore latent until the port is completed or the file deleted.
No comments yet.