Merge pull request #8642 from yang-g/ssl_fuzzer

Add a fuzzer for ssl server side
pull/8617/head
Yang Gao 8 years ago committed by GitHub
commit 92fd7e147a
  1. 74
      Makefile
  2. 13
      build.yaml
  3. BIN
      test/core/security/corpus/ssl_server_corpus/05cda1e986096f42698ee2d86ab0a4a3f6a6690b
  4. BIN
      test/core/security/corpus/ssl_server_corpus/0f65ef472e8308561c77ada56afd4de5932d950a
  5. BIN
      test/core/security/corpus/ssl_server_corpus/128915cb83e66a736f8a1833c8901eccb81e0656
  6. BIN
      test/core/security/corpus/ssl_server_corpus/134d3a5e7a1609a583f6282c48ef9b871e0fdc15
  7. BIN
      test/core/security/corpus/ssl_server_corpus/13fccd43a6b52c62851ea24e8be4f8cfe6c0103d
  8. BIN
      test/core/security/corpus/ssl_server_corpus/171bc6b14b94c72435d2da2e31e9682f12a3f13c
  9. BIN
      test/core/security/corpus/ssl_server_corpus/17dea38d21e9282ecd062466cf287ecf5b30c1cf
  10. BIN
      test/core/security/corpus/ssl_server_corpus/1961eb9d4dd4bf21cbcd9c45a17b1d025eb0d200
  11. BIN
      test/core/security/corpus/ssl_server_corpus/226ebb5cc16ac42fae3be273de533ac79759ae01
  12. BIN
      test/core/security/corpus/ssl_server_corpus/2333cf428cb1e2976679ac84e64873bf76c6595e
  13. BIN
      test/core/security/corpus/ssl_server_corpus/2885553a9e6829265d5f44ea4e24fcf7d6513436
  14. BIN
      test/core/security/corpus/ssl_server_corpus/28bce9a7cb21f3232239b9b71ef568137bf801f4
  15. BIN
      test/core/security/corpus/ssl_server_corpus/2a0286615be426d1e7fd5894aadf1a503df05a0a
  16. BIN
      test/core/security/corpus/ssl_server_corpus/2b4a1f3ebe223d91c042a5e86aff31e460f6cc3f
  17. BIN
      test/core/security/corpus/ssl_server_corpus/2cfbe809bcf53160ecc0109b2df01a8696a226fd
  18. BIN
      test/core/security/corpus/ssl_server_corpus/2f770de96db36ef9a71f7eb09b2e8695ac1f0655
  19. BIN
      test/core/security/corpus/ssl_server_corpus/30ba8ad171657470b5312232387b7da70c387219
  20. BIN
      test/core/security/corpus/ssl_server_corpus/36548a97a8b847e17a77d1e646c6eb5ec001d84a
  21. BIN
      test/core/security/corpus/ssl_server_corpus/3c442804f73cfe826a609d97c12ef87852742883
  22. BIN
      test/core/security/corpus/ssl_server_corpus/3dad758011b16a3771376f9af91242953be3e47b
  23. BIN
      test/core/security/corpus/ssl_server_corpus/43b56a1adffaf2c3c994679bf2b6fe6414e13df4
  24. BIN
      test/core/security/corpus/ssl_server_corpus/4446c60ab89c34e5ccc26bec18d7e7d21fe5aec1
  25. BIN
      test/core/security/corpus/ssl_server_corpus/44924b3866956d0668ec65750c3663279ac84a36
  26. BIN
      test/core/security/corpus/ssl_server_corpus/44e4370a4eafde61f8e7dc7e4542e0ad5ecf5253
  27. BIN
      test/core/security/corpus/ssl_server_corpus/44fb8c02117ebd75c97e517624c0abc9f9a76aa7
  28. BIN
      test/core/security/corpus/ssl_server_corpus/45d76dd1f0a29fce3f8d289b5177263871eb3f83
  29. BIN
      test/core/security/corpus/ssl_server_corpus/4fcbf18c4135352539eaf445c26f2f8a5da9b68e
  30. BIN
      test/core/security/corpus/ssl_server_corpus/508ca86c6f4e6ecc30c252ccf74e78256a893b17
  31. BIN
      test/core/security/corpus/ssl_server_corpus/515d240b860fcd1e77d4a5af291aa4a667d9b609
  32. BIN
      test/core/security/corpus/ssl_server_corpus/528e9738d5016f01cf59d74f20a8aa3f341ad89e
  33. BIN
      test/core/security/corpus/ssl_server_corpus/54b636a2bb66ccf8247b53ff76a6400e9f1355d0
  34. BIN
      test/core/security/corpus/ssl_server_corpus/5cc337c4b33cd703cd354804530f5b72684260d0
  35. BIN
      test/core/security/corpus/ssl_server_corpus/5ce3ec59111bf328044e41fcf26b3bc542df527e
  36. 1
      test/core/security/corpus/ssl_server_corpus/5eaac270339f19cfce4eafa2e69d62adf100ad1c
  37. BIN
      test/core/security/corpus/ssl_server_corpus/6129382083353687a5c3acb3d4274b811227bf3d
  38. BIN
      test/core/security/corpus/ssl_server_corpus/616a25f7c4557ef9eb33d4367c6884abc336802d
  39. BIN
      test/core/security/corpus/ssl_server_corpus/6214e558afbfdb8451e49b62619896492f1a8972
  40. 2
      test/core/security/corpus/ssl_server_corpus/6c6a6b2ce74acf8a8b90fc0b268ecc7dc992cd60
  41. BIN
      test/core/security/corpus/ssl_server_corpus/6f72309e1b23b824e9bbb9abf74a014b78be038e
  42. BIN
      test/core/security/corpus/ssl_server_corpus/7137ffad853e4dd76c6d6490f37b36e20de7ede0
  43. BIN
      test/core/security/corpus/ssl_server_corpus/71c9356b6b6c5a3a07033d0fa4ed417fa74a77e5
  44. BIN
      test/core/security/corpus/ssl_server_corpus/7414938799ed61282f41d5fb1474751ca52b2682
  45. BIN
      test/core/security/corpus/ssl_server_corpus/75e853eb2ff7e78efb327e114b39baff5a1dd5bb
  46. BIN
      test/core/security/corpus/ssl_server_corpus/7607c92952b4429e350260d8074c3c460468fd49
  47. BIN
      test/core/security/corpus/ssl_server_corpus/7677373c082fee56d8cdde009d9db5b117a4c8de
  48. 2
      test/core/security/corpus/ssl_server_corpus/76abde5c970743f9fb8bc781e46c431dee2aa104
  49. BIN
      test/core/security/corpus/ssl_server_corpus/77e0b4e2066853df9d32d475b8788e3d7d19329b
  50. BIN
      test/core/security/corpus/ssl_server_corpus/78e66840048ddc3c75e0e4abffbb3109af0d750e
  51. BIN
      test/core/security/corpus/ssl_server_corpus/7dc620eb45764390c7b106362fc4922227415407
  52. 1
      test/core/security/corpus/ssl_server_corpus/82ca7a52d589e9dbae37ebf1c59fac7ad876eb7c
  53. BIN
      test/core/security/corpus/ssl_server_corpus/8997d472f73eec84fea712638abd762818ec92ec
  54. BIN
      test/core/security/corpus/ssl_server_corpus/933bc3fdc56718d7ac0486c26eecddb6db1c5ba2
  55. BIN
      test/core/security/corpus/ssl_server_corpus/94431bda60ddc175cf86273ddc07cb41ecf45fa1
  56. BIN
      test/core/security/corpus/ssl_server_corpus/94c4272b2bb4fa9178eb4ae7dcf4b796fdcb22ac
  57. BIN
      test/core/security/corpus/ssl_server_corpus/9551c32a794250fb425005d8faf4bd24475acd41
  58. BIN
      test/core/security/corpus/ssl_server_corpus/9677da7c82f18cec3e0ed2e78aadd6e590271a52
  59. BIN
      test/core/security/corpus/ssl_server_corpus/9c2e6291aff608f3f5307a7c80db6b17107f0575
  60. BIN
      test/core/security/corpus/ssl_server_corpus/9c39dc04c7414ca0bb64fb942422bebe83ed8e8f
  61. BIN
      test/core/security/corpus/ssl_server_corpus/9cc8547d183a4f2ab7022b36376ca4a6230726c6
  62. BIN
      test/core/security/corpus/ssl_server_corpus/9e19e5e77789c34f99bbe1e6de198610d6765806
  63. BIN
      test/core/security/corpus/ssl_server_corpus/9f0853ccf6912df9fba2d5fc3a1ddece41c377ac
  64. BIN
      test/core/security/corpus/ssl_server_corpus/a6d521e501322f052df5a81ee622e0e4942ddcda
  65. BIN
      test/core/security/corpus/ssl_server_corpus/a9dc20f09890403be510357a7665a8f0db2468a4
  66. BIN
      test/core/security/corpus/ssl_server_corpus/ac1c60970910880558ae7a2ca2e155cfd7772e05
  67. BIN
      test/core/security/corpus/ssl_server_corpus/afe36d0187a155fc6e4e5c055c0ed0f3802cf696
  68. BIN
      test/core/security/corpus/ssl_server_corpus/b12b5fc39edc5407b4a525c414ff6b5e116eee05
  69. 1
      test/core/security/corpus/ssl_server_corpus/b5b088c6e3a96f88119a940874ab04cb954797ae
  70. BIN
      test/core/security/corpus/ssl_server_corpus/b65ad77a43ede3394ba714238829860c4ef4bc9f
  71. BIN
      test/core/security/corpus/ssl_server_corpus/b6f265cad9d47e2ccd17a73a6d309d8898dc5428
  72. BIN
      test/core/security/corpus/ssl_server_corpus/b7ca5868bca7ae7d1952f44ca966218b26fb7207
  73. BIN
      test/core/security/corpus/ssl_server_corpus/bd20809eacabadb9bcc77d31e42d3359117b03f2
  74. BIN
      test/core/security/corpus/ssl_server_corpus/c328623c4ce12505a54cf1a7a1606e1db36e870d
  75. BIN
      test/core/security/corpus/ssl_server_corpus/c823e8bd5526d9fe7d51319737f51bd18bdd75e8
  76. BIN
      test/core/security/corpus/ssl_server_corpus/c9394095d86ff36b69d90f7122592bf51cafe7dd
  77. 1
      test/core/security/corpus/ssl_server_corpus/cdbf0d2ae953bec07a67b7152785b548e55f85a4
  78. BIN
      test/core/security/corpus/ssl_server_corpus/cef06f9c35ee338998703555847d70c26bfc9474
  79. BIN
      test/core/security/corpus/ssl_server_corpus/cfb40ab8eb7031e978bed2418cdc2f0b8a8d8ec7
  80. BIN
      test/core/security/corpus/ssl_server_corpus/d30840c3f48f11179ef976ada30477045c6d1e98
  81. BIN
      test/core/security/corpus/ssl_server_corpus/d5afef69141edc7f4911243cf2deb19c912999cf
  82. BIN
      test/core/security/corpus/ssl_server_corpus/d5cf71396e1a04da1a7ec266957ffd2de29d6a57
  83. BIN
      test/core/security/corpus/ssl_server_corpus/d6dd8a2b085db5d33ef24b23502293ce1ce906a3
  84. BIN
      test/core/security/corpus/ssl_server_corpus/d7676dcd39b7c7cfaac513a98b56fe4ac8ea27d8
  85. BIN
      test/core/security/corpus/ssl_server_corpus/d8c9e9ef14abc23b36cb493283ba3e2812d9e537
  86. 1
      test/core/security/corpus/ssl_server_corpus/d9edb0aa5d2fe4af26ac861770c1530a4075f919
  87. BIN
      test/core/security/corpus/ssl_server_corpus/da1b52041957334b9ea1371bd2993013118bc82d
  88. BIN
      test/core/security/corpus/ssl_server_corpus/dca7861424c8f92d3720de5c4488454cde1c39df
  89. BIN
      test/core/security/corpus/ssl_server_corpus/df3755e257d024ef8ab08f6d5cefcf28148ea4b1
  90. BIN
      test/core/security/corpus/ssl_server_corpus/e360a49faefb87d671edb99e777f528f52cac9ae
  91. BIN
      test/core/security/corpus/ssl_server_corpus/e5e789605744d47e5a5d433bb04db1b413bc91a8
  92. BIN
      test/core/security/corpus/ssl_server_corpus/e6e44a6aa0ece409450c85e43d02c57e338ce1da
  93. BIN
      test/core/security/corpus/ssl_server_corpus/e8ebd49ee98cf57ca7eb35b6e96ef8866270aac6
  94. BIN
      test/core/security/corpus/ssl_server_corpus/ea0645f46ccd233337a8389b6118db5b0289f040
  95. BIN
      test/core/security/corpus/ssl_server_corpus/f6f7687df6b7056d3c819c03c9268e22a956b6b5
  96. BIN
      test/core/security/corpus/ssl_server_corpus/f725caa73aa9467c5e934c49780fc409b36b251c
  97. BIN
      test/core/security/corpus/ssl_server_corpus/f8d3326a860091edd4d60725f96f429d13f3abe6
  98. BIN
      test/core/security/corpus/ssl_server_corpus/f9261344b4049e90e88b5af784dd29b938c5c838
  99. BIN
      test/core/security/corpus/ssl_server_corpus/f95b97ece3b46815204a8e6d6e94f92ec40a9672
  100. BIN
      test/core/security/corpus/ssl_server_corpus/f97db29497e4e3225016a6ced837e20a13622f16
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1038,6 +1038,7 @@ slice_test: $(BINDIR)/$(CONFIG)/slice_test
sockaddr_resolver_test: $(BINDIR)/$(CONFIG)/sockaddr_resolver_test
sockaddr_utils_test: $(BINDIR)/$(CONFIG)/sockaddr_utils_test
socket_utils_test: $(BINDIR)/$(CONFIG)/socket_utils_test
ssl_server_fuzzer: $(BINDIR)/$(CONFIG)/ssl_server_fuzzer
tcp_client_posix_test: $(BINDIR)/$(CONFIG)/tcp_client_posix_test
tcp_posix_test: $(BINDIR)/$(CONFIG)/tcp_posix_test
tcp_server_posix_test: $(BINDIR)/$(CONFIG)/tcp_server_posix_test
@ -1204,6 +1205,7 @@ nanopb_fuzzer_serverlist_test_one_entry: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serve
percent_decode_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry
percent_encode_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry
server_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry
ssl_server_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry
uri_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry
run_dep_checks:
@ -1434,6 +1436,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/server_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry \
@ -6970,6 +6973,7 @@ endif
LIBEND2END_TESTS_SRC = \
test/core/end2end/end2end_tests.c \
test/core/end2end/end2end_test_utils.c \
test/core/end2end/tests/authority_not_supported.c \
test/core/end2end/tests/bad_hostname.c \
test/core/end2end/tests/binary_metadata.c \
test/core/end2end/tests/call_creds.c \
@ -7015,7 +7019,6 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/simple_request.c \
test/core/end2end/tests/streaming_error_response.c \
test/core/end2end/tests/trailing_metadata.c \
test/core/end2end/tests/authority_not_supported.c \
PUBLIC_HEADERS_C += \
@ -7056,6 +7059,7 @@ endif
LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/end2end_nosec_tests.c \
test/core/end2end/end2end_test_utils.c \
test/core/end2end/tests/authority_not_supported.c \
test/core/end2end/tests/bad_hostname.c \
test/core/end2end/tests/binary_metadata.c \
test/core/end2end/tests/cancel_after_accept.c \
@ -7100,7 +7104,6 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/simple_request.c \
test/core/end2end/tests/streaming_error_response.c \
test/core/end2end/tests/trailing_metadata.c \
test/core/end2end/tests/authority_not_supported.c \
PUBLIC_HEADERS_C += \
@ -10872,6 +10875,38 @@ endif
endif
SSL_SERVER_FUZZER_SRC = \
test/core/security/ssl_server_fuzzer.c \
SSL_SERVER_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SSL_SERVER_FUZZER_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/ssl_server_fuzzer: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/ssl_server_fuzzer: $(SSL_SERVER_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(SSL_SERVER_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/ssl_server_fuzzer
endif
$(OBJDIR)/$(CONFIG)/test/core/security/ssl_server_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_ssl_server_fuzzer: $(SSL_SERVER_FUZZER_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(SSL_SERVER_FUZZER_OBJS:.o=.dep)
endif
endif
TCP_CLIENT_POSIX_TEST_SRC = \
test/core/iomgr/tcp_client_posix_test.c \
@ -16393,6 +16428,41 @@ endif
endif
SSL_SERVER_FUZZER_ONE_ENTRY_SRC = \
test/core/security/ssl_server_fuzzer.c \
test/core/util/one_corpus_entry_fuzzer.c \
SSL_SERVER_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SSL_SERVER_FUZZER_ONE_ENTRY_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry: $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry
endif
$(OBJDIR)/$(CONFIG)/test/core/security/ssl_server_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/core/util/one_corpus_entry_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_ssl_server_fuzzer_one_entry: $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
endif
endif
URI_FUZZER_TEST_ONE_ENTRY_SRC = \
test/core/client_channel/uri_fuzzer_test.c \
test/core/util/one_corpus_entry_fuzzer.c \

@ -2576,6 +2576,19 @@ targets:
- mac
- linux
- posix
- name: ssl_server_fuzzer
build: fuzzer
language: c
src:
- test/core/security/ssl_server_fuzzer.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
corpus_dirs:
- test/core/security/corpus/ssl_server_corpus
maxlen: 2048
- name: tcp_client_posix_test
cpu_cost: 0.5
build: test

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save