From 61b6f42c72e8e8f2d8fd62b30bb5a7f9a3d10380 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Fri, 24 Apr 2020 16:25:57 +0200 Subject: [PATCH] [hostap] Add missing libssl-dev dependency (#3673) Recent builds have started failing due to libssl-dev missing -- presumably the base image no longer includes this. Fix this by installing libssl-dev. --- projects/hostap/Dockerfile | 5 ++++- projects/hostap/build.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/projects/hostap/Dockerfile b/projects/hostap/Dockerfile index 5d38a06e5..cc215e961 100644 --- a/projects/hostap/Dockerfile +++ b/projects/hostap/Dockerfile @@ -16,7 +16,10 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER elver@google.com -RUN apt-get update && apt-get install -y make autoconf automake libtool g++ +RUN dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get install -y make autoconf automake libtool g++ libssl-dev \ + libssl-dev:i386 RUN git clone --depth 1 git://w1.fi/srv/git/hostap.git hostap WORKDIR hostap COPY build.sh $SRC/ diff --git a/projects/hostap/build.sh b/projects/hostap/build.sh index 881146cb7..2a0da9366 100755 --- a/projects/hostap/build.sh +++ b/projects/hostap/build.sh @@ -21,12 +21,24 @@ export LDO=$CXX export LDFLAGS="$CXXFLAGS $LIB_FUZZING_ENGINE" export CFLAGS="$CFLAGS -MMD" +if [[ "$ARCHITECTURE" == "i386" ]]; then + # Force static link + rm -v /lib/i386-linux-gnu/libcrypto.so* || : +fi + # Specific to hostap's rules.include: set empty, as we directly set required # sanitizer flags in CFLAGS and LDFLAGS (above). export FUZZ_FLAGS= for target in fuzzing/*; do [[ -d "$target" ]] || continue + + if [[ "$SANITIZER" == "dataflow" ]]; then + # libcrypto seems to cause problems with 'dataflow' sanitizer. + [[ "$target" == "fuzzing/dpp-uri" ]] && continue || : + [[ "$target" == "fuzzing/sae" ]] && continue || : + fi + ( cd "$target" make clean