From f7b804f9293f09d3d87ce45bfcf979a86f99c99f Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Mon, 26 Aug 2019 02:59:53 +0200 Subject: [PATCH] Add usrsctp project (#2739) --- projects/usrsctp/Dockerfile | 22 ++++++++++++++++++++++ projects/usrsctp/build.sh | 31 +++++++++++++++++++++++++++++++ projects/usrsctp/project.yaml | 8 ++++++++ 3 files changed, 61 insertions(+) create mode 100644 projects/usrsctp/Dockerfile create mode 100755 projects/usrsctp/build.sh create mode 100644 projects/usrsctp/project.yaml diff --git a/projects/usrsctp/Dockerfile b/projects/usrsctp/Dockerfile new file mode 100644 index 000000000..d04a08def --- /dev/null +++ b/projects/usrsctp/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +FROM gcr.io/oss-fuzz-base/base-builder +MAINTAINER weinrank@fh-muenster.de +RUN apt-get update && apt-get install -y make cmake +RUN git clone --depth 1 https://github.com/sctplab/usrsctp usrsctp +WORKDIR usrsctp +COPY build.sh $SRC/ diff --git a/projects/usrsctp/build.sh b/projects/usrsctp/build.sh new file mode 100755 index 000000000..4225ce1a1 --- /dev/null +++ b/projects/usrsctp/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash -eu +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +cmake -Dsctp_build_programs=0 -Dsctp_debug=0 -Dsctp_build_programs=0 -DCMAKE_BUILD_TYPE=RelWithDebInfo . +make -j$(nproc) +cd fuzzer + +TARGETS="fuzzer_connected fuzzer_unconnected" + +for target in $TARGETS; do + $CC $CFLAGS -I . -I ../usrsctplib/ -c ${target}.c -o $OUT/${target}.o + $CXX $CXXFLAGS -o $OUT/${target} $OUT/${target}.o $LIB_FUZZING_ENGINE ../usrsctplib/libusrsctp.a + rm -f $OUT/${target}.o +done + +zip -jr fuzzer_connected_seed_corpus.zip CORPUS_CONNECTED/ +cp fuzzer_connected_seed_corpus.zip $OUT/ diff --git a/projects/usrsctp/project.yaml b/projects/usrsctp/project.yaml new file mode 100644 index 000000000..5e93baa12 --- /dev/null +++ b/projects/usrsctp/project.yaml @@ -0,0 +1,8 @@ +homepage: "https://github.com/sctplab/usrsctp" +primary_contact: "weinrank@fh-muenster.de" +auto_ccs: + - "tuexen@fh-muenster.de" +sanitizers: + - address + - memory + - undefined