DragonFlyBSD Kernel Audit
DF-0136 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0136 run — host var setup (root) + jail enumeration (root creates jail).
# The breach is that ANY user inside the jail can enumerate host system varsyms;
# setup (set var + create jail) is a realistic admin action.
set -e
cd "$(dirname "$0")"

# Host: plant a marker system varsym (idempotent).
varsym -s DF0136_HOSTSECRET=secretvalue 2>/dev/null || true

# Run the enumeration binary inside a jail at '/' with a localhost ip.
jail / dftest 127.0.0.1 "$(pwd)/leak_check"