mirror of https://github.com/google/oss-fuzz.git
[wolfssl] Import corpora from other projects (#6001)
This commit is contained in:
parent
275c979de5
commit
1d76e45880
|
@ -27,6 +27,16 @@ RUN git clone --depth 1 https://github.com/google/wycheproof.git
|
|||
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2
|
||||
RUN git clone https://github.com/wolfssl/oss-fuzz-targets --depth 1 $SRC/fuzz-targets
|
||||
|
||||
# Retrieve corpora from other projects
|
||||
RUN wget https://storage.googleapis.com/pub/gsutil.tar.gz -O $SRC/gsutil.tar.gz
|
||||
RUN tar zxf $SRC/gsutil.tar.gz
|
||||
ENV PATH="${PATH}:$SRC/gsutil"
|
||||
RUN gsutil cp gs://bearssl-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/bearssl_cryptofuzz-bearssl/public.zip $SRC/corpus_bearssl.zip
|
||||
RUN gsutil cp gs://nettle-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/nettle_cryptofuzz-nettle-with-mini-gmp/public.zip $SRC/corpus_nettle.zip
|
||||
RUN gsutil cp gs://libecc-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/libecc_cryptofuzz-libecc/public.zip $SRC/corpus_libecc.zip
|
||||
RUN gsutil cp gs://relic-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/relic_cryptofuzz-relic/public.zip $SRC/corpus_relic.zip
|
||||
RUN gsutil cp gs://cryptofuzz-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/cryptofuzz_cryptofuzz-openssl/public.zip $SRC/corpus_cryptofuzz.zip
|
||||
|
||||
WORKDIR wolfssl
|
||||
|
||||
COPY build.sh $SRC/
|
||||
|
|
|
@ -202,16 +202,27 @@ then
|
|||
unset WOLFCRYPT_LIBWOLFSSL_A_PATH
|
||||
unset WOLFCRYPT_INCLUDE_PATH
|
||||
|
||||
mkdir $SRC/cryptofuzz-seed-corpus/
|
||||
|
||||
# Convert Wycheproof test vectors to Cryptofuzz corpus format
|
||||
mkdir $SRC/corpus-cryptofuzz-wycheproof/
|
||||
find $SRC/wycheproof/testvectors/ -type f -name 'ecdsa_*' -exec $SRC/cryptofuzz-disable-fastmath/cryptofuzz --from-wycheproof={},$SRC/corpus-cryptofuzz-wycheproof/ \;
|
||||
find $SRC/wycheproof/testvectors/ -type f -name 'ecdsa_*' -exec $SRC/cryptofuzz-disable-fastmath/cryptofuzz --from-wycheproof={},$SRC/cryptofuzz-seed-corpus/ \;
|
||||
|
||||
# Unpack corpora from other projects
|
||||
unzip -n $SRC/corpus_bearssl.zip -d $SRC/cryptofuzz_seed_corpus/
|
||||
unzip -n $SRC/corpus_nettle.zip -d $SRC/cryptofuzz_seed_corpus/
|
||||
unzip -n $SRC/corpus_libecc.zip -d $SRC/cryptofuzz_seed_corpus/
|
||||
unzip -n $SRC/corpus_relic.zip -d $SRC/cryptofuzz_seed_corpus/
|
||||
unzip -n $SRC/corpus_cryptofuzz.zip -d $SRC/cryptofuzz_seed_corpus/
|
||||
|
||||
# Pack it
|
||||
zip -j $SRC/cryptofuzz_wycheproof_seed_corpus.zip $SRC/corpus-cryptofuzz-wycheproof/*
|
||||
cd $SRC/cryptofuzz_seed_corpus
|
||||
zip -r $SRC/cryptofuzz_seed_corpus.zip .
|
||||
|
||||
# Use it as the seed corpus for each Cryptofuzz-based fuzzer
|
||||
cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math-all_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math-all-8bit_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-disable-fastmath_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_seed_corpus.zip $OUT/cryptofuzz-sp-math-all_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_seed_corpus.zip $OUT/cryptofuzz-sp-math-all-8bit_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_seed_corpus.zip $OUT/cryptofuzz-sp-math_seed_corpus.zip
|
||||
cp $SRC/cryptofuzz_seed_corpus.zip $OUT/cryptofuzz-disable-fastmath_seed_corpus.zip
|
||||
|
||||
# Build SSL/SSH fuzzers
|
||||
NEW_SRC=$SRC/wolf-ssl-ssh-fuzzers/oss-fuzz/projects/wolf-ssl-ssh/
|
||||
|
|
Loading…
Reference in New Issue