⬢ DragonFlyBSD Kernel Audit
DF-5070 / run_fixed_ab.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-5070 — fixed-variant A/B (run AFTER the baseline panic + reset):
# df5070f.ko differs from df5070.ko ONLY by the indata==NULL check in the
# SET_PARAMS arm (the fix that goes into sys/.../if_ath_spectral.c).
# Expect: control still succeeds, contrast still EINVAL, and the fire call
# now returns EINVAL with NO panic.
set -e
: ${DEV:=/dev/df5070f}

echo "== kldload fixed variant =="
kldload /tmp/poc/df5070/fixed/df5070f.ko
sleep 1

echo "== control (unchanged): expect rc=0 =="
/tmp/poc/df5070_trigger control "$DEV"

echo "== contrast (unchanged): expect EINVAL =="
/tmp/poc/df5070_trigger contrast "$DEV"

echo "== fire WITH FIX: expect EINVAL, NO panic =="
/tmp/poc/df5070_trigger fire "$DEV"

echo "== guest still alive, kernel log clean =="
uptime
dmesg | grep -E 'df5070|Fatal trap' | tail -6

echo "== unload (clean) =="
kldunload df5070f