fsfuzz

small fs fuzzer
git clone git://git.2f30.org/fsfuzz
Log | Files | Refs

xfs-fuzz.sh (426B)


      1 #!/bin/sh
      2 
      3 i=0
      4 while :; do
      5 	dmesg -c &>/dev/null 
      6 	dd if=/dev/zero of=xfs-own bs=1M count=32 &>/dev/null
      7 	mkfs.xfs xfs-own &>/dev/null
      8 	../fsfuzz -f xfs xfs-own
      9 	sync
     10 	mount -t xfs xfs-own mnt/ &>/dev/null
     11 	umount mnt/ &>/dev/null
     12 	dmesg | grep -iq 'eip' # anything that looks like a bug really
     13 	if [ "$?" -eq 0 ]; then
     14 		echo Found 0day ...
     15 		cp xfs-own xfs/xfs-own.$i
     16 		dmesg &> xfs/xfs-own-log.$i
     17 		sync
     18 		((i++))
     19 	fi
     20 done