Add a new fuzz target to osquery for sql queries, and add dictionaries and seed corpuses for both targets. (#2992)

This commit is contained in:
Tom Ritter 2019-10-31 00:51:01 +00:00 committed by Abhishek Arya
parent e4e95078fe
commit e49213a348
2 changed files with 9 additions and 0 deletions

0
projects/osquery/Dockerfile Normal file → Executable file
View File

View File

@ -41,6 +41,7 @@ cmake \
# Build harnesses
cmake --build . -j$(nproc) --target osqueryfuzz-config
cmake --build . -j$(nproc) --target osqueryfuzz-sqlquery
# Cleanup
find . -type f -name '*.o' -delete
@ -49,3 +50,11 @@ rm -rf libs/src/patched-source/libudev/src/test
# Move harnesses to output path
cp osquery/main/harnesses/osqueryfuzz-config "${OUT}/osqueryfuzz-config"
cp osquery/main/harnesses/osqueryfuzz-sqlquery "${OUT}/osqueryfuzz-sqlquery"
# Build supporting files
popd
tools/harnesses/osqueryfuzz_config_corpus.sh "${OUT}/osqueryfuzz-config_seed_corpus.zip"
tools/harnesses/osqueryfuzz_config_dict.sh "${OUT}/osqueryfuzz-config.dict"
tools/harnesses/osqueryfuzz_sqlquery_corpus.sh "${OUT}/osqueryfuzz-sqlquery_seed_corpus.zip"
cp tools/harnesses/osqueryfuzz_sqlquery.dict "${OUT}/osqueryfuzz-sqlquery.dict"