Nick Mathewson
9d848ca58a
Merge remote-tracking branch 'asn/ticket23623_032_01' into maint-0.3.2
2017-11-07 09:58:42 -05:00
Nick Mathewson
7d767706ef
Merge branch 'bug24150_032_squashed' into maint-0.3.2
2017-11-06 12:59:23 -05:00
Nick Mathewson
5240afa713
Fix a memory leak on decryption non-failure of v3 hsdesc
...
If it decrypts something that turns out to start with a NUL byte,
then decrypt_desc_layer() will return 0 to indicate the length of
its result. But 0 also indicates an error, which causes the result
not to be freed by decrypt_desc_layer()'s callers.
Since we're trying to stabilize 0.3.2.x, I've opted for the simpler
possible fix here and made it so that an empty decrypted string will
also count as an error.
Fixes bug 24150 and OSS-Fuzz issue 3994.
The original bug was present but unreachable in 0.3.1.1-alpha. I'm
calling this a bugfix on 0.3.2.1-alpha since that's the first version
where you could actually try to decrypt these descriptors.
2017-11-06 12:59:11 -05:00
Sebastian Hahn
d3fee8b823
ClientDNSRejectInternalAddresses in non-default networks
...
Once again allow the flag to be set, unless the default network is used.
Thanks to nickm for a suggestion for the workaround to a test failure.
2017-11-04 18:31:02 +01:00
Sebastian Hahn
5a46074e55
Revert "Make ClientDNSRejectInternalAddresses testing-only."
...
This reverts commit 27fa4a98d2
.
2017-11-04 18:30:59 +01:00
teor
27ea6fcd31
Test that IPv6-only clients can use microdescriptors
...
When running "make test-network-all", test that IPv6-only clients can use
microdescriptors. IPv6-only microdescriptor client support was fixed in
tor 0.3.0.1-alpha.
Requires chutney master 61c28b9 or later.
Closes ticket 24109.
2017-11-02 10:25:49 -04:00
Nick Mathewson
3aab8307a5
Merge branch 'ticket23820_032_01_squashed' into maint-0.3.2
2017-11-02 10:19:29 -04:00
teor
176bfe1bed
Don't run IPv6-only v3 single onion service tests using chutney
...
Part of #23820 .
2017-11-02 10:19:05 -04:00
David Goulet
bd631a649b
test: Fix voting schedule for hs_service.c
...
Part of #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 14:49:31 -04:00
David Goulet
814f4c6967
test: Fix voting schedule for hs_common.c
...
Part of #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 14:49:19 -04:00
David Goulet
19d32fd0d6
test: Fix voting schedule for shared random
...
Part of #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 14:48:50 -04:00
Nick Mathewson
0627512368
Merge branch 'bug24082_032' into maint-0.3.2
2017-10-31 14:31:21 -04:00
David Goulet
33da5d7672
test: Initialize the voting schedule in test_dir.c
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 14:07:41 -04:00
Nick Mathewson
8dffc46748
Merge branch 'hsdescv3_fuzz_more' into maint-0.3.2
2017-10-31 14:04:31 -04:00
Nick Mathewson
3d93ec3ef4
Merge branch 'bug23762_032_02_squashed' into maint-0.3.2
2017-10-31 12:14:21 -04:00
David Goulet
5dbcd48f0e
hs-v3: Attempt descriptor refetch when dirinfo changes
...
When the directory information changes, callback to the HS client subsystem so
it can check if any pending SOCKS connections are waiting for a descriptor. If
yes, attempt a refetch for those.
Fixes #23762
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 12:14:11 -04:00
Nick Mathewson
5dce134fbb
Initialize the mock options in the fuzzing code
...
Fixes bug 24082; bugfix on 0.3.0.3-alpha. Found by Brian Carpenter.
2017-10-30 17:05:26 -04:00
Nick Mathewson
26e0909e51
In the hsdescv3 fuzzer, replace the decryption function.
...
The new decryption function performs no decryption, skips the salt,
and doesn't check the mac. This allows us to fuzz the
hs_descriptor.c code using unencrypted descriptor test, and exercise
more of the code.
Related to 21509.
2017-10-27 14:28:02 -04:00
David Goulet
7ee0a2b9aa
sr: Don't use a dynamic voting schedule
...
The exposed get_voting_schedule() allocates and return a new object everytime
it is called leading to an awful lot of memory allocation when getting the
start time of the current round which is done for each node in the consensus.
Closes #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-27 09:23:37 -04:00
David Goulet
c4ef21ff5e
fuzzing: Make hsdescv3 use the decoding API correctly
...
Fixes #21509
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-26 09:52:15 -04:00
David Goulet
4d2de821ce
Revert "Temporarily disable compilation of the v3 hs fuzzing code"
...
This reverts commit 5ef656e7d1
.
2017-10-26 09:41:47 -04:00
Nick Mathewson
b95ef19a77
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:32 -04:00
Nick Mathewson
594cf92498
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:28 -04:00
Nick Mathewson
f3af74ccf5
Updates to fix check-spaces/check-changes warnings
2017-10-24 19:35:16 -04:00
Nick Mathewson
44e8aaa9aa
Adjust test to allow hyphens too.
2017-10-24 19:33:38 -04:00
Isis Lovecruft
02cde0d939
test: Add unittest for descriptors with BridgeDistribution option.
2017-10-24 19:26:24 -04:00
Nick Mathewson
fcd5c3144a
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-10-23 09:11:10 -04:00
Nick Mathewson
6a7aa47357
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-23 09:11:10 -04:00
Nick Mathewson
85115796bb
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-23 09:11:10 -04:00
Nick Mathewson
eac4c374e4
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-23 09:11:10 -04:00
Nick Mathewson
a5f5bda462
Adjust test, now that there are 9 dirauths again
2017-10-23 09:11:07 -04:00
Taylor Yu
44e4a96bb5
Don't expect permission failure if running as root
...
Skip test_config_include_no_permission() when running as root, because
it will get an unexpected success from config_get_lines_include().
This affects some continuous integration setups. Fixes bug 23758.
2017-10-04 08:42:05 -05:00
Nick Mathewson
1e7e36da4b
Merge branch 'bug23672_032_01_squashed'
2017-10-03 10:56:52 -04:00
David Goulet
30d2e0b71e
test: Add an HS v3 descriptor fetch unit test
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-03 10:56:46 -04:00
Nick Mathewson
783a44b2cd
Merge remote-tracking branch 'asn/bug23670'
2017-10-03 09:05:16 -04:00
George Kadianakis
f7306b16ec
entrynodes: Better naming for dir info check functions.
2017-10-03 15:55:19 +03:00
Nick Mathewson
a6c62cbd13
Merge branch 'bug23678_032'
2017-10-03 08:18:08 -04:00
Nick Mathewson
f923aeee1b
Follow-up on 23678: fix socks/wrong_protocol test
2017-10-03 08:17:41 -04:00
Nick Mathewson
bb7288b2c3
Make the fp_pair_map tests cover {get,set}_by_digests
2017-10-03 08:07:36 -04:00
George Kadianakis
5352785d0c
entrynodes: Error msg for missing guard descs is now more informative.
2017-10-03 14:41:20 +03:00
George Kadianakis
c9729853a5
entrynodes: Be specific about how many primary descriptors we miss.
2017-10-03 14:39:34 +03:00
Nick Mathewson
4e6374c26b
Merge remote-tracking branch 'catalyst-oniongit/bug23691'
2017-09-28 19:07:23 -04:00
Taylor Yu
2ae1b7e2db
Fix leak in test_util.c
...
AddressSanitizer found a leak in test_util_decompress_dos_impl().
Fixes bug #23691 .
2017-09-28 17:53:38 -05:00
Alexander Færøy
c2fac2c6b0
Enable disabled test that was disabled due to bug #23551
...
See: https://bugs.torproject.org/23551
2017-09-28 18:58:15 +02:00
Nick Mathewson
3a073c463d
Improve unit test coverage for compression code.
...
These tests try uncompressing garbage, verify that we won't
make compression bombs, and verify that we won't uncompress
compression bombs.
2017-09-28 12:20:02 -04:00
Nick Mathewson
f71ff0cabc
Unit test for case where %included dir exists but is unreadable
2017-09-28 09:49:30 -04:00
Nick Mathewson
5b6f2713cd
unit test for config_lines_dup_and_filter
2017-09-28 09:40:17 -04:00
Nick Mathewson
99e52711bb
Add unit test for buf_get_line().
2017-09-28 08:35:30 -04:00
Nick Mathewson
f21102c069
Let's get 100% coverage for proto_http while we're at it.
...
There was some coverage before, but it was mostly accidental.
2017-09-27 21:45:55 -04:00
Nick Mathewson
57f04a482e
Test more error cases of our socks code.
...
Coverage is now respectable. :)
2017-09-27 19:37:36 -04:00