#!/bin/sh
# DF-0056 run: kldload the crafted .ko.  REQUIRES ROOT (sys_kldload checks
# SYSCAP_NOKLD) -- this is a root->kernel heap-overflow / defense-in-depth.
# On the unfixed kernel this panics (page fault in memmove).  On the fixed
# kernel kldload rejects with ENOEXEC and the guest stays up.
cd "$(dirname "$0")"
kldload ./df0056_overflow.ko
echo "kldload rc=$? (0=loaded, 1=rejected-ENOEXEC, kernel panic=dead guest)"
