AngoraFuzzer / Angora

Angora is a mutation-based fuzzer. The main goal of Angora is to increase branch coverage by solving path constraints without symbolic execution.
Apache License 2.0
918 stars 168 forks source link

can't start successfully with either USE_TRACK or USE_PIN #87

Closed b04902036 closed 4 years ago

b04902036 commented 4 years ago

I try to compile file-5.38,I follow the instruction of file-5.38 and create the Makefile with the following command

autoreconf -f -i
env CC=/path/to/angora/bin/angora-clang CXX=/path/to/angora/bin/angora-clang++ LD=/path/to/angora/bin/angora-clang ./configure --disable-silent-rules --disable-shared
USE_TRACK=1 make

and it shows the following error message

./.libs/libmagic.a(compress.o): In function `uncompresszlib':
/home/fuzz/file_angora/src/compress.c:576: undefined reference to `dfs$inflateInit_'
/home/fuzz/file_angora/src/compress.c:576: undefined reference to `dfs$inflateInit2_'
/home/fuzz/file_angora/src/compress.c:580: undefined reference to `dfs$inflate'
/home/fuzz/file_angora/src/compress.c:585: undefined reference to `dfs$inflateEnd'
/home/fuzz/file_angora/src/compress.c:594: undefined reference to `dfs$zError'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:483: recipe for target 'file' failed
make[3]: *** [file] Error 1
make[3]: Leaving directory '/home/fuzz/file_angora/src'
Makefile:361: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/fuzz/file_angora/src'
Makefile:458: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/fuzz/file_angora'
Makefile:367: recipe for target 'all' failed
make: *** [all] Error 2

so I tried to use PIN_MODE to compile again with the following command:

USE_PIN=1 make

And I can successfully compile, however when I tried to fuzz the program with the following command

/path/to/angora/angora_fuzzer -i input -o output -m pin -t ./file.track  -- ./file.fast -zkd @@

it shows the following error message:

WARN  angora::fuzz_main   > There is none constraint in the seeds, please ensure the inputs are vaild in the seed directory, or the program is ran correctly, or the read functions have been marked as source.
 INFO  angora::depot::dump > dump constraints and chart..

PS. my input directory contains a small binary file Could someone help me with this? Thanks!

kedjames commented 4 years ago

I ran into this issue, to build without PIN and eliminate errors about undefined reference you need to specify a text file that excludes the functions "inflateInit_" etc. see here: https://github.com/AngoraFuzzer/Angora/blob/master/docs/example.md

For the second issue, I am having the same problem with libxml, did you have a look at this post? https://github.com/AngoraFuzzer/Angora/issues/63

b04902036 commented 4 years ago

Thanks! It works! Actually I've tried using -fsanitize-blacklist for clang however it didn't work. Anyway thanks for the help!