โฌข DragonFlyBSD Kernel Audit
DF-0733 / run.sh
โ† back to finding โ†“ download raw
#!/bin/sh
# DF-0733 run script โ€” runs the deterministic userspace harness (PRIMARY proof)
# in both BUGGY and FIXED modes.  Decisive before/after: BUGGY => "UAF CONFIRMED",
# FIXED => "NO UAF (serialized)".
#
# Real-kernel object-level harness (needs root + wlan/wlan_acl loaded):
#   kldload wlan_acl; sysctl debug.use_malloc_pattern=1
#   kldload ./harness_mod.ko        # exposes /dev/df0733 (0666)
#   ./trigger 2000000 8             # exercises the real lockless acl_check
#                                   #   vs concurrent iac_remove/_acl_free
cd "$(dirname "$0")"
echo "########## DF-0733 โ€” deterministic userspace harness (PRIMARY proof) ##########"
echo "########## RUN: BUGGY (unpatched transcription โ€” acl_check calls _find_acl with NO lock) ##########"
./harness; echo "BUGGY_RC=$?"
echo
echo "########## RUN: FIXED (ACL_LOCK around _find_acl) ##########"
./harness_fixed; echo "FIXED_RC=$?"