DragonFlyBSD Kernel Audit
DF-0490 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0490 run script (unprivileged)
# Run as non-root user. Demonstrates the AF_INET6 typo / type confusion in
# in_lifaddr_ioctl (in.c:911). On the BUGGY kernel SIOCGLIFADDR returns
# all-zero / wrong data instead of the real IPv4 address; on the FIXED kernel
# it returns the correct IPv4 address (e.g. 10.0.2.15).
set -e
cd "$(dirname "$0")"
IF="${1:-vtnet0}"
echo "uid=$(id -u) running SIOCGLIFADDR on $IF"
./poc_df0490 "$IF"