Add usrsctp project (#2739)

This commit is contained in:
Felix Weinrank 2019-08-26 02:59:53 +02:00 committed by Oliver Chang
parent d6cf1bcea2
commit f7b804f929
3 changed files with 61 additions and 0 deletions

View File

@ -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/

31
projects/usrsctp/build.sh Executable file
View File

@ -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/

View File

@ -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