diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2017-02-07 00:47:13 +0900 |
---|---|---|
committer | Abhishek Arya <inferno@chromium.org> | 2017-02-06 07:47:13 -0800 |
commit | 0d00148a3babc971aa71fac0c6f7fa1563c42c0b (patch) | |
tree | efeba81fe34ce9af896832c8c87b2ee2a70336ae /projects/nghttp2 | |
parent | b0b823a0ded6506dd7acbce6afc7df9b277c6cf3 (diff) |
Add nghttp2 fuzzer (#353)
Diffstat (limited to 'projects/nghttp2')
-rw-r--r-- | projects/nghttp2/Dockerfile | 22 | ||||
-rwxr-xr-x | projects/nghttp2/build.sh | 28 | ||||
-rw-r--r-- | projects/nghttp2/nghttp2_fuzzer.options | 2 |
3 files changed, 52 insertions, 0 deletions
diff --git a/projects/nghttp2/Dockerfile b/projects/nghttp2/Dockerfile new file mode 100644 index 00000000..3d7b52b9 --- /dev/null +++ b/projects/nghttp2/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2016 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 ossfuzz/base-builder +MAINTAINER tatsuhiro.t@gmail.com +RUN apt-get install -y make autoconf automake libtool pkg-config +RUN git clone --depth 1 https://github.com/nghttp2/nghttp2.git +WORKDIR nghttp2 +COPY build.sh *.options $SRC/ diff --git a/projects/nghttp2/build.sh b/projects/nghttp2/build.sh new file mode 100755 index 00000000..819af675 --- /dev/null +++ b/projects/nghttp2/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash -eu +# Copyright 2016 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. +# +################################################################################ + +autoreconf -i +./configure --enable-lib-only +make -j$(nproc) all + +$CXX $CXXFLAGS -std=c++11 -Ilib/includes \ + fuzz/fuzz_target.cc -o $OUT/nghttp2_fuzzer \ + -lFuzzingEngine lib/.libs/libnghttp2.a + +cp $SRC/*.options $OUT + +zip -j $OUT/nghttp2_fuzzer_seed_corpus.zip fuzz/corpus/*/* diff --git a/projects/nghttp2/nghttp2_fuzzer.options b/projects/nghttp2/nghttp2_fuzzer.options new file mode 100644 index 00000000..79488880 --- /dev/null +++ b/projects/nghttp2/nghttp2_fuzzer.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len = 1024 |