DragonFlyBSD Kernel Audit
DF-0673 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0673 trigger: run as root with smbfs.ko loaded.
# Drives mount_smbfs at the fake server; see VERDICT.md for why this minimal
# fake server doesn't reach the leak site (mount_smbfs hangs in D1 waiting on
# the bogus negotiate response before nbssn_recv is reached for the
# post-negotiate message).
cd "$(dirname "$0")"
sudo kldload smbfs.ko 2>/dev/null || true
sudo ./fake_smb_server &
SRV=$!
sleep 0.5
sudo mount_smbfs -N -I 127.0.0.1 //g@localhost/x /mnt 2>/dev/null
sudo umount /mnt 2>/dev/null
kill $SRV 2>/dev/null
wait $SRV 2>/dev/null
sudo netstat -m