From 43b0a9a0e4e5b9289279fd2fe465b051c235574e Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Fri, 20 Dec 2019 15:38:34 +0100 Subject: [PATCH] [cryptofuzz] Remove OpenSSL 1.0.2 and 1.1.0 (#3156) OpenSSL 1.1.0 has been end-of-life since 11 September 2019. OpenSSL 1.0.2 will be end-of-life on 31 December 2019. Per https://www.openssl.org/policies/releasestrat.html --- projects/cryptofuzz/Dockerfile | 2 - projects/cryptofuzz/build.sh | 142 --------------------------------- 2 files changed, 144 deletions(-) diff --git a/projects/cryptofuzz/Dockerfile b/projects/cryptofuzz/Dockerfile index 576c6504d..1629cecd9 100644 --- a/projects/cryptofuzz/Dockerfile +++ b/projects/cryptofuzz/Dockerfile @@ -34,8 +34,6 @@ RUN git clone --depth 1 https://github.com/weidai11/cryptopp/ RUN git clone --depth 1 https://dev.gnupg.org/source/libgcrypt.git RUN wget https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2 RUN git clone --depth 1 -b oss-fuzz https://github.com/project-everest/hacl-star evercrypt -RUN wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_0-stable.zip -RUN wget https://github.com/openssl/openssl/archive/OpenSSL_1_0_2-stable.zip RUN git clone --depth 1 https://github.com/google/cityhash.git RUN git clone --depth 1 https://github.com/golang/go RUN git clone --depth 1 https://github.com/randombit/botan.git diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh index bca9b2912..f2c05016d 100755 --- a/projects/cryptofuzz/build.sh +++ b/projects/cryptofuzz/build.sh @@ -490,145 +490,3 @@ cp $SRC/cryptofuzz/cryptofuzz $OUT/cryptofuzz-boringssl-noasm cp $SRC/cryptofuzz/cryptofuzz-dict.txt $OUT/cryptofuzz-boringssl-noasm.dict # Copy seed corpus cp $SRC/cryptofuzz-corpora/boringssl_latest.zip $OUT/cryptofuzz-boringssl-noasm_seed_corpus.zip - - -# OpenSSL 1.1.0 can currently not be used together with wolfCrypt due to symbol collisions -export SAVE_CXXFLAGS="$CXXFLAGS" -export CXXFLAGS=${CXXFLAGS/-DCRYPTOFUZZ_WOLFCRYPT/} - -############################################################################## -cd $SRC; -unzip OpenSSL_1_1_0-stable.zip - -if [[ $CFLAGS != *sanitize=memory* ]] -then - # Compile Openssl 1.1.0 (with assembly) - cd $SRC/openssl-OpenSSL_1_1_0-stable/ - if [[ $CFLAGS != *-m32* ]] - then - ./config --debug enable-md2 enable-rc5 $CFLAGS - else - setarch i386 ./config --debug enable-md2 enable-rc5 $CFLAGS - fi - make depend - make -j$(nproc) >/dev/null 2>&1 - - # Compile Cryptofuzz OpenSSL 1.1.0 (with assembly) module - cd $SRC/cryptofuzz/modules/openssl - OPENSSL_INCLUDE_PATH="$SRC/openssl-OpenSSL_1_1_0-stable/include" OPENSSL_LIBCRYPTO_A_PATH="$SRC/openssl-OpenSSL_1_1_0-stable/libcrypto.a" CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_OPENSSL_110" make -B - - # Compile Cryptofuzz - cd $SRC/cryptofuzz - LIBFUZZER_LINK="$LIB_FUZZING_ENGINE" CXXFLAGS="$CXXFLAGS -I $SRC/openssl-OpenSSL_1_1_0-stable/include $INCLUDE_PATH_FLAGS -DCRYPTOFUZZ_OPENSSL_110" make -B -j$(nproc) >/dev/null 2>&1 - - # Generate dictionary - ./generate_dict - - # Copy fuzzer - cp $SRC/cryptofuzz/cryptofuzz $OUT/cryptofuzz-openssl-110 - # Copy dictionary - cp $SRC/cryptofuzz/cryptofuzz-dict.txt $OUT/cryptofuzz-openssl-110.dict - # Copy seed corpus - cp $SRC/cryptofuzz-corpora/openssl_latest.zip $OUT/cryptofuzz-openssl_seed_corpus.zip -fi - -############################################################################## -# Compile Openssl 1.1.0 (without assembly) -cd $SRC/openssl-OpenSSL_1_1_0-stable/ -make clean || true -if [[ $CFLAGS != *-m32* ]] -then - ./config --debug no-asm enable-md2 enable-rc5 $CFLAGS -else - setarch i386 ./config --debug no-asm enable-md2 enable-rc5 $CFLAGS -fi -make depend -make -j$(nproc) >/dev/null 2>&1 - -# Compile Cryptofuzz OpenSSL 1.1.0 (without assembly) module -cd $SRC/cryptofuzz/modules/openssl -OPENSSL_INCLUDE_PATH="$SRC/openssl-OpenSSL_1_1_0-stable/include" OPENSSL_LIBCRYPTO_A_PATH="$SRC/openssl-OpenSSL_1_1_0-stable/libcrypto.a" CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_OPENSSL_110" make -B - -# Compile Cryptofuzz -cd $SRC/cryptofuzz -LIBFUZZER_LINK="$LIB_FUZZING_ENGINE" CXXFLAGS="$CXXFLAGS -I $SRC/openssl-OpenSSL_1_1_0-stable/include $INCLUDE_PATH_FLAGS -DCRYPTOFUZZ_OPENSSL_110" make -B -j$(nproc) >/dev/null 2>&1 - -# Generate dictionary -./generate_dict - - -# Copy fuzzer -cp $SRC/cryptofuzz/cryptofuzz $OUT/cryptofuzz-openssl-110-noasm -# Copy dictionary -cp $SRC/cryptofuzz/cryptofuzz-dict.txt $OUT/cryptofuzz-openssl-110-noasm.dict -# Copy seed corpus -cp $SRC/cryptofuzz-corpora/openssl_latest.zip $OUT/cryptofuzz-openssl-110-noasm_seed_corpus.zip - -export CXXFLAGS="$SAVE_CXXFLAGS" -############################################################################## -cd $SRC; -unzip OpenSSL_1_0_2-stable.zip - -if [[ $CFLAGS != *sanitize=memory* ]] -then - # Compile Openssl 1.0.2 (with assembly) - cd $SRC/openssl-OpenSSL_1_0_2-stable/ - if [[ $CFLAGS != *-m32* ]] - then - ./config --debug enable-md2 enable-rc5 $CFLAGS - else - setarch i386 ./config --debug enable-md2 enable-rc5 $CFLAGS - fi - make depend - make -j$(nproc) >/dev/null 2>&1 - - # Compile Cryptofuzz OpenSSL 1.0.2 (with assembly) module - cd $SRC/cryptofuzz/modules/openssl - OPENSSL_INCLUDE_PATH="$SRC/openssl-OpenSSL_1_0_2-stable/include" OPENSSL_LIBCRYPTO_A_PATH="$SRC/openssl-OpenSSL_1_0_2-stable/libcrypto.a" CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_OPENSSL_102" make -B - - # Compile Cryptofuzz - cd $SRC/cryptofuzz - LIBFUZZER_LINK="$LIB_FUZZING_ENGINE" CXXFLAGS="$CXXFLAGS -I $SRC/openssl-OpenSSL_1_0_2-stable/include $INCLUDE_PATH_FLAGS -DCRYPTOFUZZ_OPENSSL_102" make -B -j$(nproc) >/dev/null 2>&1 - - # Generate dictionary - ./generate_dict - - # Copy fuzzer - cp $SRC/cryptofuzz/cryptofuzz $OUT/cryptofuzz-openssl-102 - # Copy dictionary - cp $SRC/cryptofuzz/cryptofuzz-dict.txt $OUT/cryptofuzz-openssl-102.dict - # Copy seed corpus - cp $SRC/cryptofuzz-corpora/openssl_latest.zip $OUT/cryptofuzz-openssl_seed_corpus.zip -fi - -############################################################################## -# Compile Openssl 1.0.2 (without assembly) -cd $SRC/openssl-OpenSSL_1_0_2-stable/ -make clean || true -if [[ $CFLAGS != *-m32* ]] -then - ./config --debug no-asm enable-md2 enable-rc5 $CFLAGS -DPURIFY -else - setarch i386 ./config --debug no-asm enable-md2 enable-rc5 $CFLAGS -fi -make depend -make -j$(nproc) >/dev/null 2>&1 - -# Compile Cryptofuzz OpenSSL 1.0.2 (without assembly) module -cd $SRC/cryptofuzz/modules/openssl -OPENSSL_INCLUDE_PATH="$SRC/openssl-OpenSSL_1_0_2-stable/include" OPENSSL_LIBCRYPTO_A_PATH="$SRC/openssl-OpenSSL_1_0_2-stable/libcrypto.a" CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_OPENSSL_102" make -B - -# Compile Cryptofuzz -cd $SRC/cryptofuzz -LIBFUZZER_LINK="$LIB_FUZZING_ENGINE" CXXFLAGS="$CXXFLAGS -I $SRC/openssl-OpenSSL_1_0_2-stable/include $INCLUDE_PATH_FLAGS -DCRYPTOFUZZ_OPENSSL_102" make -B -j$(nproc) >/dev/null 2>&1 - -# Generate dictionary -./generate_dict - -# Copy fuzzer -cp $SRC/cryptofuzz/cryptofuzz $OUT/cryptofuzz-openssl-102-noasm -# Copy dictionary -cp $SRC/cryptofuzz/cryptofuzz-dict.txt $OUT/cryptofuzz-openssl-102-noasm.dict -# Copy seed corpus -cp $SRC/cryptofuzz-corpora/openssl_latest.zip $OUT/cryptofuzz-openssl-102-noasm_seed_corpus.zip -