Merge branch 'maint-0.3.2'

This commit is contained in:
Nick Mathewson 2017-10-26 10:43:05 -04:00
commit 4af1653e0f
4 changed files with 32 additions and 4 deletions

3
changes/bug21509 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes (hidden service v3, fuzzing):
- Fix the hidden service v3 descriptor decoding fuzzing to use the latest
decoding API correctly. Fixes bug 21509; bugfix on 0.3.2.1-alpha.

View File

@ -7,6 +7,7 @@ FUZZERS = """
diff-apply diff-apply
extrainfo extrainfo
hsdescv2 hsdescv2
hsdescv3
http http
http-connect http-connect
iptsv2 iptsv2

View File

@ -55,10 +55,12 @@ int
fuzz_main(const uint8_t *data, size_t sz) fuzz_main(const uint8_t *data, size_t sz)
{ {
hs_descriptor_t *desc = NULL; hs_descriptor_t *desc = NULL;
uint8_t subcredential[DIGEST256_LEN];
char *fuzzing_data = tor_memdup_nulterm(data, sz); char *fuzzing_data = tor_memdup_nulterm(data, sz);
memset(subcredential, 'A', sizeof(subcredential));
hs_desc_decode_descriptor(fuzzing_data, NULL, &desc); hs_desc_decode_descriptor(fuzzing_data, subcredential, &desc);
if (desc) { if (desc) {
log_debug(LD_GENERAL, "Decoding okay"); log_debug(LD_GENERAL, "Decoding okay");
hs_descriptor_free(desc); hs_descriptor_free(desc);

View File

@ -17,9 +17,8 @@ FUZZING_LIBS = \
src/trunnel/libor-trunnel-testing.a \ src/trunnel/libor-trunnel-testing.a \
$(rust_ldadd) \ $(rust_ldadd) \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
@TOR_LIBEVENT_LIBS@ \ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ @CURVE25519_LIBS@ \
@CURVE25519_LIBS@ \
@TOR_SYSTEMD_LIBS@ \ @TOR_SYSTEMD_LIBS@ \
@TOR_LZMA_LIBS@ \ @TOR_LZMA_LIBS@ \
@TOR_ZSTD_LIBS@ @TOR_ZSTD_LIBS@
@ -95,6 +94,14 @@ src_test_fuzz_fuzz_hsdescv2_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_hsdescv2_LDFLAGS = $(FUZZING_LDFLAG) src_test_fuzz_fuzz_hsdescv2_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_hsdescv2_LDADD = $(FUZZING_LIBS) src_test_fuzz_fuzz_hsdescv2_LDADD = $(FUZZING_LIBS)
src_test_fuzz_fuzz_hsdescv3_SOURCES = \
src/test/fuzz/fuzzing_common.c \
src/test/fuzz/fuzz_hsdescv3.c
src_test_fuzz_fuzz_hsdescv3_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_hsdescv3_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_hsdescv3_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_hsdescv3_LDADD = $(FUZZING_LIBS)
src_test_fuzz_fuzz_http_SOURCES = \ src_test_fuzz_fuzz_http_SOURCES = \
src/test/fuzz/fuzzing_common.c \ src/test/fuzz/fuzzing_common.c \
src/test/fuzz/fuzz_http.c src/test/fuzz/fuzz_http.c
@ -142,6 +149,7 @@ FUZZERS = \
src/test/fuzz/fuzz-diff-apply \ src/test/fuzz/fuzz-diff-apply \
src/test/fuzz/fuzz-extrainfo \ src/test/fuzz/fuzz-extrainfo \
src/test/fuzz/fuzz-hsdescv2 \ src/test/fuzz/fuzz-hsdescv2 \
src/test/fuzz/fuzz-hsdescv3 \
src/test/fuzz/fuzz-http \ src/test/fuzz/fuzz-http \
src/test/fuzz/fuzz-http-connect \ src/test/fuzz/fuzz-http-connect \
src/test/fuzz/fuzz-iptsv2 \ src/test/fuzz/fuzz-iptsv2 \
@ -193,6 +201,13 @@ src_test_fuzz_lf_fuzz_hsdescv2_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_hsdescv2_LDFLAGS = $(LIBFUZZER_LDFLAG) src_test_fuzz_lf_fuzz_hsdescv2_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_hsdescv2_LDADD = $(LIBFUZZER_LIBS) src_test_fuzz_lf_fuzz_hsdescv2_LDADD = $(LIBFUZZER_LIBS)
src_test_fuzz_lf_fuzz_hsdescv3_SOURCES = \
$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
src_test_fuzz_lf_fuzz_hsdescv3_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_hsdescv3_LDADD = $(LIBFUZZER_LIBS)
src_test_fuzz_lf_fuzz_http_SOURCES = \ src_test_fuzz_lf_fuzz_http_SOURCES = \
$(src_test_fuzz_fuzz_http_SOURCES) $(src_test_fuzz_fuzz_http_SOURCES)
src_test_fuzz_lf_fuzz_http_CPPFLAGS = $(LIBFUZZER_CPPFLAGS) src_test_fuzz_lf_fuzz_http_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
@ -235,6 +250,7 @@ LIBFUZZER_FUZZERS = \
src/test/fuzz/lf-fuzz-diff-apply \ src/test/fuzz/lf-fuzz-diff-apply \
src/test/fuzz/lf-fuzz-extrainfo \ src/test/fuzz/lf-fuzz-extrainfo \
src/test/fuzz/lf-fuzz-hsdescv2 \ src/test/fuzz/lf-fuzz-hsdescv2 \
src/test/fuzz/lf-fuzz-hsdescv3 \
src/test/fuzz/lf-fuzz-http \ src/test/fuzz/lf-fuzz-http \
src/test/fuzz/lf-fuzz-http-connect \ src/test/fuzz/lf-fuzz-http-connect \
src/test/fuzz/lf-fuzz-iptsv2 \ src/test/fuzz/lf-fuzz-iptsv2 \
@ -278,6 +294,11 @@ src_test_fuzz_liboss_fuzz_hsdescv2_a_SOURCES = \
src_test_fuzz_liboss_fuzz_hsdescv2_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS) src_test_fuzz_liboss_fuzz_hsdescv2_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv2_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS) src_test_fuzz_liboss_fuzz_hsdescv2_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv3_a_SOURCES = \
$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
src_test_fuzz_liboss_fuzz_hsdescv3_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv3_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
src_test_fuzz_liboss_fuzz_http_a_SOURCES = \ src_test_fuzz_liboss_fuzz_http_a_SOURCES = \
$(src_test_fuzz_fuzz_http_SOURCES) $(src_test_fuzz_fuzz_http_SOURCES)
src_test_fuzz_liboss_fuzz_http_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS) src_test_fuzz_liboss_fuzz_http_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
@ -310,6 +331,7 @@ OSS_FUZZ_FUZZERS = \
src/test/fuzz/liboss-fuzz-diff-apply.a \ src/test/fuzz/liboss-fuzz-diff-apply.a \
src/test/fuzz/liboss-fuzz-extrainfo.a \ src/test/fuzz/liboss-fuzz-extrainfo.a \
src/test/fuzz/liboss-fuzz-hsdescv2.a \ src/test/fuzz/liboss-fuzz-hsdescv2.a \
src/test/fuzz/liboss-fuzz-hsdescv3.a \
src/test/fuzz/liboss-fuzz-http.a \ src/test/fuzz/liboss-fuzz-http.a \
src/test/fuzz/liboss-fuzz-http-connect.a \ src/test/fuzz/liboss-fuzz-http-connect.a \
src/test/fuzz/liboss-fuzz-iptsv2.a \ src/test/fuzz/liboss-fuzz-iptsv2.a \