apache-httpd: build pcre to avoid what seems to be false positives in leaks (#6820)

This commit is contained in:
DavidKorczynski 2021-11-12 22:05:12 +00:00 committed by GitHub
parent 67f7329eb7
commit 9901fd462b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -15,10 +15,17 @@
################################################################################ ################################################################################
FROM gcr.io/oss-fuzz-base/base-builder FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool wget libpcre3 \ RUN apt-get update && apt-get install -y make autoconf automake libtool wget \
libpcre3-dev uuid-dev pkg-config libtool-bin \ uuid-dev pkg-config libtool-bin \
libbsd-dev libbsd-dev
RUN svn co svn://vcs.exim.org/pcre2/code/trunk pcre2 && \
cd pcre2 && \
./autogen.sh && \
./configure && \
make && \
make install
RUN git clone https://github.com/AdaLogics/fuzz-headers RUN git clone https://github.com/AdaLogics/fuzz-headers
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.gz && \ RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.gz && \

View File

@ -33,6 +33,8 @@ svn checkout https://svn.apache.org/repos/asf/apr/apr/trunk/ srclib/apr
./configure --with-included-apr --enable-pool-debug ./configure --with-included-apr --enable-pool-debug
make make
static_pcre=($(find /src/pcre2 -name "libpcre2-8.a"))
# Build the fuzzers # Build the fuzzers
for fuzzname in utils parse tokenize addr_parse uri request preq; do for fuzzname in utils parse tokenize addr_parse uri request preq; do
$CC $CFLAGS $LIB_FUZZING_ENGINE \ $CC $CFLAGS $LIB_FUZZING_ENGINE \
@ -46,5 +48,5 @@ for fuzzname in utils parse tokenize addr_parse uri request preq; do
./server/mpm/event/.libs/libevent.a \ ./server/mpm/event/.libs/libevent.a \
./os/unix/.libs/libos.a \ ./os/unix/.libs/libos.a \
./srclib/apr/.libs/libapr-2.a \ ./srclib/apr/.libs/libapr-2.a \
-Wl,--end-group -luuid -lpcre -lcrypt -lexpat -l:libbsd.a -Wl,--end-group -luuid -lcrypt -lexpat -l:libbsd.a ${static_pcre}
done done