[Skiboot] skiboot + AFL fuzz test for 'libstb' unit tests
rnsastry
rnsastry at linux.vnet.ibm.com
Wed Oct 26 16:55:22 AEDT 2016
Hi,
I am trying to do fuzz test with American Fuzzy Lop (AFL) on
‘libstb’ unit tests.
Here is what I am trying,
On a Ubuntu 16.04 guest running on Mac.
AFL Setup:
apt-get install build-essential wget git llvm clang flex bison
mkdir $HOME/afl
cd $HOME/afl
wget -N http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz
tar xz afl-latest.tgz
make
cd llvm_mode
make
skiboot Setup:
git clone https://github.com/open-power/skiboot
cd skiboot
make HOSTCC=$HOME/afl/afl-clang-fast # this built all the
binaries, except 'extract-gcov’.
make check CC=$HOME/afl/afl-clang-fast # Here have to use CC, with
HOSTCC make check didn’t work.
make check couldn’t compile the following. But compiled ‘libstb’
unit tests. So proceeding further.
...
~skiboot/test/hello_world/Makefile.check:21: recipe for target
'test/hello_world/hello_kernel/hello_kernel.o' failed
make: *** [test/hello_world/hello_kernel/hello_kernel.o] Error 1
Run AFL:
I want to run ‘libstb' unit test named 'print-stb-container’, for
this a container file need to be passed as argument.
Created /tmp/in and /tmp/out directories required for AFL as input and
output.
Copied ‘cappubin’ container files to /tmp/in
Tried running afl using the following command,
$HOME/afl/afl-fuzz -i /tmp/in -o /tmp/out --
libstb/test/print-stb-container @@
but this throws error
[-] PROGRAM ABORT : No instrumentation detected
am I missing some thing to instrument ‘print-stb-container’?
Thanks in advance.
Regards
R.Nageswara Sastry
More information about the Skiboot
mailing list