DragonFlyBSD Kernel Audit
DF-2432 / run.sh
← back to finding ↓ download raw
1
2
3
4
5
6
7
8
9
#!/bin/sh
# DF-2432 run: load the ccd module and issue CCDIOCSET with ccio_ndisks=0.
# Must be run AS ROOT (kldload + open /dev/ccd0 O_WRONLY).
# Expected on the vulnerable kernel: kernel panic (divide error in ccdinit).
# Expected on a FIXED kernel: ioctl returns EINVAL.
set -e
kldload ccd 2>/dev/null || true
ls -l /dev/ccd0 2>/dev/null || { echo "run.sh: /dev/ccd0 missing even after kldload ccd"; exit 1; }
./poc "$@"