⬢ DragonFlyBSD Kernel Audit
DF-2368 / run_setkey.sh
← back to finding ↓ download raw
#!/bin/sh
# run_setkey.sh <bits> -- GUEST-side DF-2368 demo A:
# call the REAL rijndael_set_key with the given keyBits through the
# kernel harness.  On the stock INVARIANTS kernel any bits outside
# {128,192,256} panics at the KASSERT in rijndaelKeySetupEnc
# (rijndael-alg-fst.c:738) -- i.e. the only "validation" present.
# Expected: bits in {128,192,256}: prints Nr=10/12/14, guest up.
#          bits outside: kernel panic (assertion), ssh dies.
set -e
/root/rijnh setkey "$1"
echo "EXIT=$?"