DragonFlyBSD Kernel Audit
DF-0056 / run.sh
← back to finding ↓ download raw
1
2
3
4
5
6
7
8
#!/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)"