โฌข DragonFlyBSD Kernel Audit
DF-0616 / build.sh
โ† back to finding โ†“ download raw
#!/bin/sh
# DF-0616 โ€” build the code-level proof harness.
# Builds two binaries:
#   df0616_harness        โ€” vulnerable logic (netmap_generic.c:672-674, unbounded)
#   df0616_harness_fixed  โ€” same logic with the proposed fix (clamp to NETMAP_BUF_SIZE,
#                           mirroring the TX-side check at netmap_generic.c:500)
set -e
cd "$(dirname "$0")"
cc -O2 -Wall -o df0616_harness        df0616_harness.c
cc -O2 -Wall -DFIX -o df0616_harness_fixed df0616_harness.c
echo "built: df0616_harness (vulnerable) and df0616_harness_fixed (patched logic)"