DragonFlyBSD Kernel Audit
DF-0704 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0704 reachability probe (same as DF-0705 — both findings are in the
# same dead-code file ip_fw3_sync.c). Confirms the buggy edge_socket_handler
# is never spawned.
set -e
cd "$(dirname "$0")"
if ! kldstat -m 2>/dev/null | grep -q ipfw3_basic; then
    if [ "$(id -u)" = "0" ]; then
        echo "[*] loading ipfw3.ko + ipfw3_basic.ko"
        kldload ipfw3.ko
        kldload ipfw3_basic.ko
    else
        echo "[!] ipfw3 not loaded" >&2; exit 2
    fi
fi
echo "[*] running as: $(id)"
./ipfw3_sync_probe
echo "RUN_EXIT=$?"