Build break: ADD_FILTER references undefined EVL_VLID_MASK macro β dead code not in any build
Summary
ng_vlan.c:218 validates vlan id with if(vf->vlan & ~EVL_VLID_MASK) but EVL_VLID_MASK is NEVER defined anywhere in the entire tree (rg confirms single reference). Intended symbol is 0x0FFF 12-bit VID mask from older FreeBSD if_vlan_var.h dropped during VLAN rework. File is DEAD CODE: not in sys/conf/files not in sys/netgraph7/Makefile SUBDIR not in any sys/config/* kernel config. Would fail to compile if revived. If maintainer fixes build by deleting check instead of defining mask ADD_FILTER accepts arbitrary 16-bit vlan values stored in evl_tag but still hash-bounded (HASH &0x0f) so not memory-safety. No runtime impact today. Fix: define EVL_VLID_MASK in if_vlan_var.h or use existing EVL_VLANOFTAG(tag)((tag)&4095).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0711 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| manifest.json | file | 389 B | view raw |
Fix verification
not_testablerecommended fix identified; fix.diff not authored/validated in this batch
recommended fix identified; fix.diff not authored/validated in this batch
Confirmed kernel references
β
Detail
Exploit chain
none (Info severity)
Evidence (decisive lines)
Source-confirmed at sys/netgraph7/ng_vlan.c:218: build break - ADD_FILTER references undefined EVL_VLID_MASK (dead code)
Verified recommended fix
Source-confirmed at sys/netgraph7/ng_vlan.c:218: build break - ADD_FILTER references undefined EVL_VLID_MASK (dead code)
Verdict
Source-confirmed at sys/netgraph7/ng_vlan.c:218: build break - ADD_FILTER references undefined EVL_VLID_MASK (dead code)
No comments yet.