cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.21k stars 474 forks source link

Implement fuzzers #442

Closed guidovranken closed 5 years ago

pabuhler commented 5 years ago

Thanks I will have some time to review next week. Before merge we would need to fix the code format checking, If you like I can do that once the rest of the code is reviewed.

pabuhler commented 5 years ago

@guidovranken , I am try to build and run this locally but it is not working for me. Are you able to include some instructions on how to use the fuzzer, compile & run.

guidovranken commented 5 years ago

Hi Pascal,

this works:

git clone git@github.com:guidovranken/libsrtp.git
cd libsrtp/
git checkout fuzzing
autoreconf -ivf
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=fuzzer-no-link,address,undefined -g -O3" CFLAGS="-fsanitize=fuzzer-no-link,address,undefined -g -O3" LDFLAGS="-fsanitize=fuzzer-no-link,address,undefined" ./configure
LIBFUZZER="-fsanitize=fuzzer" make srtp-fuzzer

# fuzzer/srtp-fuzzer has been created
pabuhler commented 5 years ago

@guidovranken thanks, maybe we should add the last two lines to the readme file ...

guidovranken commented 5 years ago

Done

pabuhler commented 5 years ago

@guidovranken thanks, if you don't mind I will apply the clang format tool to this PR so it matches the rest of libSRTP code and add support in travis to build the fuzzer to ensure it does not break.