From 6364c0f8326dd1b9b1af000d993339d5ea8a93ca Mon Sep 17 00:00:00 2001 From: matt-kwong Date: Wed, 15 Mar 2017 14:43:36 -0700 Subject: [PATCH] gRPC - add ssl_server_fuzzer and remove options (#458) * CC less people for gRPC issues * Enable ssl_server_fuzzer and remove options --- projects/grpc/Dockerfile | 2 +- projects/grpc/api_fuzzer.options | 3 -- projects/grpc/build.sh | 32 +++++++++---------- projects/grpc/client_fuzzer.options | 3 -- projects/grpc/fuzzer.options | 2 -- projects/grpc/fuzzer_response.options | 2 -- projects/grpc/fuzzer_serverlist.options | 2 -- .../grpc/hpack_parser_fuzzer_test.options | 3 -- projects/grpc/percent_decode_fuzzer.options | 2 -- projects/grpc/percent_encode_fuzzer.options | 2 -- projects/grpc/project.yaml | 3 -- projects/grpc/request_fuzzer.options | 3 -- projects/grpc/response_fuzzer.options | 3 -- projects/grpc/server_fuzzer.options | 3 -- projects/grpc/ssl_server_fuzzer.options | 2 -- projects/grpc/uri_fuzzer_test.options | 2 -- 16 files changed, 16 insertions(+), 53 deletions(-) delete mode 100644 projects/grpc/api_fuzzer.options delete mode 100644 projects/grpc/client_fuzzer.options delete mode 100644 projects/grpc/fuzzer.options delete mode 100644 projects/grpc/fuzzer_response.options delete mode 100644 projects/grpc/fuzzer_serverlist.options delete mode 100644 projects/grpc/hpack_parser_fuzzer_test.options delete mode 100644 projects/grpc/percent_decode_fuzzer.options delete mode 100644 projects/grpc/percent_encode_fuzzer.options delete mode 100644 projects/grpc/request_fuzzer.options delete mode 100644 projects/grpc/response_fuzzer.options delete mode 100644 projects/grpc/server_fuzzer.options delete mode 100644 projects/grpc/ssl_server_fuzzer.options delete mode 100644 projects/grpc/uri_fuzzer_test.options diff --git a/projects/grpc/Dockerfile b/projects/grpc/Dockerfile index 274f0df2a..bf9eba4dc 100644 --- a/projects/grpc/Dockerfile +++ b/projects/grpc/Dockerfile @@ -36,4 +36,4 @@ RUN apt-get update && apt-get install -y bazel RUN git clone --recursive https://github.com/grpc/grpc grpc WORKDIR /src/grpc/ -COPY build.sh *.options $SRC/ +COPY build.sh $SRC/ diff --git a/projects/grpc/api_fuzzer.options b/projects/grpc/api_fuzzer.options deleted file mode 100644 index 8871ae21b..000000000 --- a/projects/grpc/api_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 2048 -dict = api_fuzzer.dictionary diff --git a/projects/grpc/build.sh b/projects/grpc/build.sh index 69f9489bd..c4410be4e 100755 --- a/projects/grpc/build.sh +++ b/projects/grpc/build.sh @@ -28,9 +28,8 @@ test/core/transport/chttp2/hpack_parser_fuzzer_test.c \ test/core/end2end/fuzzers/api_fuzzer.c \ test/core/end2end/fuzzers/client_fuzzer.c \ test/core/end2end/fuzzers/server_fuzzer.c \ +test/core/security/ssl_server_fuzzer.c \ " -# TODO: enable ssl server corpus after Bazel fuzzer rules written -# test/core/security/ssl_server_fuzzer.c \ FUZZER_DICTIONARIES="\ test/core/end2end/fuzzers/api_fuzzer.dictionary \ @@ -76,21 +75,20 @@ for dict in $FUZZER_DICTIONARIES; do cp $dict $OUT/ done -cp $SRC/*.options $OUT/ +cp $SRC/grpc/tools/fuzzer/options/*.options $OUT/ # We don't have a consistent naming convention between fuzzer files and corpus # directories so we resort to hard coding zipping corpuses -zip $OUT/fuzzer_seed_corpus.zip test/core/json/corpus -zip $OUT/uri_fuzzer_test_seed_corpus.zip test/core/client_channel/uri_corpus -zip $OUT/request_fuzzer_seed_corpus.zip test/core/http/request_corpus -zip $OUT/response_fuzzer_seed_corpus.zip test/core/http/response_corpus -zip $OUT/fuzzer_response_seed_corpus.zip test/core/nanopb/corpus_response -zip $OUT/fuzzer_serverlist_seed_corpus.zip test/core/nanopb/corpus_serverlist -zip $OUT/percent_decode_fuzzer_seed_corpus.zip test/core/slice/percent_decode_corpus -zip $OUT/percent_encode_fuzzer_seed_corpus.zip test/core/slice/percent_encode_corpus -zip $OUT/hpack_parser_fuzzer_test_seed_corpus.zip test/core/transport/chttp2/hpack_parser_corpus -zip $OUT/api_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/api_fuzzer_corpus -zip $OUT/client_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/client_fuzzer_corpus -zip $OUT/server_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/server_fuzzer_corpus -# TODO: zip ssl server corpus after Bazel fuzzer rules written -# test/core/security/corpus/ssl_server_corpus +zip $OUT/fuzzer_seed_corpus.zip test/core/json/corpus/* +zip $OUT/uri_fuzzer_test_seed_corpus.zip test/core/client_channel/uri_corpus/* +zip $OUT/request_fuzzer_seed_corpus.zip test/core/http/request_corpus/* +zip $OUT/response_fuzzer_seed_corpus.zip test/core/http/response_corpus/* +zip $OUT/fuzzer_response_seed_corpus.zip test/core/nanopb/corpus_response/* +zip $OUT/fuzzer_serverlist_seed_corpus.zip test/core/nanopb/corpus_serverlist/* +zip $OUT/percent_decode_fuzzer_seed_corpus.zip test/core/slice/percent_decode_corpus/* +zip $OUT/percent_encode_fuzzer_seed_corpus.zip test/core/slice/percent_encode_corpus/* +zip $OUT/hpack_parser_fuzzer_test_seed_corpus.zip test/core/transport/chttp2/hpack_parser_corpus/* +zip $OUT/api_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/api_fuzzer_corpus/* +zip $OUT/client_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/client_fuzzer_corpus/* +zip $OUT/server_fuzzer_seed_corpus.zip test/core/end2end/fuzzers/server_fuzzer_corpus/* +zip $OUT/ssl_server_fuzzer_seed_corpus.zip test/core/security/corpus/ssl_server_corpus/* diff --git a/projects/grpc/client_fuzzer.options b/projects/grpc/client_fuzzer.options deleted file mode 100644 index fd2eebf7d..000000000 --- a/projects/grpc/client_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 2048 -dict = hpack.dictionary diff --git a/projects/grpc/fuzzer.options b/projects/grpc/fuzzer.options deleted file mode 100644 index 5d468bc6e..000000000 --- a/projects/grpc/fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 512 diff --git a/projects/grpc/fuzzer_response.options b/projects/grpc/fuzzer_response.options deleted file mode 100644 index 5dcdfac7a..000000000 --- a/projects/grpc/fuzzer_response.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 128 diff --git a/projects/grpc/fuzzer_serverlist.options b/projects/grpc/fuzzer_serverlist.options deleted file mode 100644 index 5dcdfac7a..000000000 --- a/projects/grpc/fuzzer_serverlist.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 128 diff --git a/projects/grpc/hpack_parser_fuzzer_test.options b/projects/grpc/hpack_parser_fuzzer_test.options deleted file mode 100644 index 584487faf..000000000 --- a/projects/grpc/hpack_parser_fuzzer_test.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 512 -dict = hpack.dictionary diff --git a/projects/grpc/percent_decode_fuzzer.options b/projects/grpc/percent_decode_fuzzer.options deleted file mode 100644 index ea2785e11..000000000 --- a/projects/grpc/percent_decode_fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 32 diff --git a/projects/grpc/percent_encode_fuzzer.options b/projects/grpc/percent_encode_fuzzer.options deleted file mode 100644 index ea2785e11..000000000 --- a/projects/grpc/percent_encode_fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 32 diff --git a/projects/grpc/project.yaml b/projects/grpc/project.yaml index be9159091..820236e5c 100644 --- a/projects/grpc/project.yaml +++ b/projects/grpc/project.yaml @@ -1,11 +1,8 @@ homepage: "http://www.grpc.io/" primary_contact: "mattkwong@google.com" auto_ccs: - - "grpc-c-team@google.com" - "ctiller@google.com" - "dgq@google.com" - - "klempner@google.com" - - "jkolhe@google.com" - "roth@google.com" - "ncteisen@google.com" - "nnoble@google.com" diff --git a/projects/grpc/request_fuzzer.options b/projects/grpc/request_fuzzer.options deleted file mode 100644 index fd32ac16e..000000000 --- a/projects/grpc/request_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 2048 - diff --git a/projects/grpc/response_fuzzer.options b/projects/grpc/response_fuzzer.options deleted file mode 100644 index fd32ac16e..000000000 --- a/projects/grpc/response_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 2048 - diff --git a/projects/grpc/server_fuzzer.options b/projects/grpc/server_fuzzer.options deleted file mode 100644 index fd2eebf7d..000000000 --- a/projects/grpc/server_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 2048 -dict = hpack.dictionary diff --git a/projects/grpc/ssl_server_fuzzer.options b/projects/grpc/ssl_server_fuzzer.options deleted file mode 100644 index 60bd9b0b2..000000000 --- a/projects/grpc/ssl_server_fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 2048 diff --git a/projects/grpc/uri_fuzzer_test.options b/projects/grpc/uri_fuzzer_test.options deleted file mode 100644 index 5dcdfac7a..000000000 --- a/projects/grpc/uri_fuzzer_test.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 128