DragonFlyBSD Kernel Audit
DF-0607 / fix_build.log
← back to finding ↓ download raw
DF-0607 fix.diff compilation validation
=======================================

Applied fix.diff to sys/netgraph7/iface/ng_iface.c on the guest:
  patch -p0 < /tmp/df0607_fix.patch
  Hunk #1 succeeded at 424.

Built the netgraph7 ng_iface module:
  cd /usr/src/sys/netgraph7/iface && make
  cc ... -c ng_iface.c
  cc ... -o ng_iface.ko ng_iface.o
  MAKE_RC=0

The fix compiles cleanly. The fixed code reads the AF from the mbuf
(DLT_NULL convention) instead of from uninitialized dst->sa_data,
matching the correct implementation already present in the loaded
sys/netgraph/iface/ng_iface.c.

Note: The fix is for dead code (netgraph7 is never compiled into any
module on this system). The loaded module (netgraph) already has the
correct code. The fix cannot be runtime-tested because:
1. The netgraph7 framework is not loaded.
2. Even the legacy netgraph ng_iface cannot be created due to a
   separate constructor bug (if_attach from netisr context).