aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-29hs: Implement an HS client free all functionDavid Goulet
Called from main.c, the function for now purges the hidden service directory request cache. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-29Merge branch 'maint-0.3.1'Nick Mathewson
2017-08-29Merge remote-tracking branch 'dgoulet/bug22159_031_01' into maint-0.3.1Nick Mathewson
2017-08-29Merge branch 'maint-0.3.1'Nick Mathewson
2017-08-29Add test_hs_descriptor.inc to include.am to unbreak distcheck.Nick Mathewson
2017-08-28Merge remote-tracking branch 'asn/bug23343'Nick Mathewson
2017-08-28hs: Fix the intro circuit max retryDavid Goulet
Some parentheses were missing making the rend_max_intro_circs_per_period() return a lower value than it was suppose to. The calculation is that a service at most will open a number of intro points that it wants which is 3 by default or HiddenServiceNumIntroductionPoints. Two extra are launched for performance reason. Finally, this can happen twice for two descriptors for the current and next time period. From: 2 * n_intro_wanted + 2 ...which resulted in 8 for 3 intro points, this commit fixes it to: (n_intro_wanted + 2) * 2 ... resulting in 12 possible intro point circuit which is the correct maximum intro circuit allowed per period. Last, this commit rate limits the the log message if we ever go above that limit else over a INTRO_CIRC_RETRY_PERIOD, we can print it often! Fixes #22159 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-28Temporarily disable compilation of the v3 hs fuzzing codeNick Mathewson
Turns out, it wasn't up-to-date with the latest v3 hs API :(
2017-08-28Fix compilation.Nick Mathewson
2017-08-28Merge remote-tracking branch 'haxxpop/fuzzing-hsv3'Nick Mathewson
2017-08-28fixup! prop224: Fix length check when purging hidserv requests.George Kadianakis
Improve doc based on david's comments.
2017-08-28Merge branch 'maint-0.3.1'Nick Mathewson
2017-08-28Merge branch 'ticket22348_031' into maint-0.3.1Nick Mathewson
2017-08-28Merge branch 'ticket22348_031'Nick Mathewson
2017-08-28Try to improve the keypinning-failure message even moreNick Mathewson
2017-08-28Merge branch 'bug22802_squashed'Nick Mathewson
2017-08-28Don't fall back to _atoi64Nick Mathewson
We only did this on windows when building with MSVC 6 and earlier, which is now considered a screamingly bad idea.
2017-08-28Don't use "0" as a "base" argument to tor_parse_*().Nick Mathewson
Telling these functions to autodetect the numeric base has lead to trouble in the past. Fixes bug 22469. Bugfix on 0.2.2.various.
2017-08-28In test_establish_intro_wrong_purpose, use tt_i64_op on ssize_tNick Mathewson
Since ssize_t is signed and might be 64 bits, we should use tt_i64_op to make sure it's positive. Otherwise, if it is negative, and we use tt_u64_op, we'll be treating it as a uint64_t, and we won't detect negative values. This fixes CID 1416338 and 1416339. Bug not in any released Tor.
2017-08-28Fix unlikely memory leak introduced in 418f3d6298beb27e050Nick Mathewson
This is CID 1416880; bug not in any released Tor.
2017-08-28Merge remote-tracking branch 'asn/bug23335'Nick Mathewson
2017-08-28prop224: Fix length check when purging hidserv requests.George Kadianakis
That check was wrong: a) We should be making sure that the size of `key` is big enough before proceeding, since that's the buffer that we would overread with the tor_memeq() below. The old check used to check that `req_key_str` is big enough which is not right, since we won't read deep into that buffer. The new check makes sure that `key` has enough size to survive the tor_memeq(), and if not it moves to the next element of the strmap. b) That check shouldn't be a BUG since that strmap contains variable-sized elements and we should not be bugging out if we happen to compare a small sized element (v2) to a bigger one (v3).
2017-08-28prop224: Add test that exposes the #23343 bug.George Kadianakis
2017-08-28Fix compilation warning on old clangs.George Kadianakis
2017-08-28Silence some leftover warnings.George Kadianakis
2017-08-25hs: Note the connection attempt if descriptor is unusableDavid Goulet
This way, we can clear off the directory requests from our cache and thus allow the next client to query those HSDir again at the next SOCKS connection. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-25hs: Implement note_connection_attempt_succeeded()David Goulet
v3 client now cleans up the HSDir request cache when a connection to a service was successful. Closes #23308 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-25Restore documentation for approved-routersNick Mathewson
We removed this documentation in 607724c696a6e, when we removed Naming Authoritative Directories, but actually this file is still used by authorities to indicate rejected and invalid fingerprints. Closes ticket 21148.
2017-08-25Merge branch 'maint-0.3.1'Nick Mathewson
2017-08-25Merge branch 'bug19418_029' into maint-0.3.1Nick Mathewson
2017-08-25fix wide linesNick Mathewson
2017-08-25Merge remote-tracking branch 'asn/bug23309_v2'Nick Mathewson
2017-08-25sandbox: Fix double free when initializing HSv3 filenamesDavid Goulet
Don't free a reference that has been stolen. Fixes #23329 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-25prop224: Move service_desc_hsdirs_changed() and make it static.George Kadianakis
That function could be static but needed to be moved to the top.
2017-08-25prop224: Refactor descriptor reupload logic.George Kadianakis
We refactor the descriptor reupload logic to be similar to the v2 logic where we update a global 'consider_republishing_rend_descriptors' flag and then we use that to check for hash ring changes during the global hidden service callbacks. This fixes bugs where we would inspect the hash ring immediately as we receive new dirinfo (e.g. consensus) but before running the hidden service housekeeping events. That was leaving us in an inconsistent state wrt hsdir indices and causing bugs all around.
2017-08-25prop224: Refactor descriptor rotation logic.George Kadianakis
The problem was that when we went from overlap mode to non-overlap mode, we were not wiping the 'desc_next' descriptor and instead we left it on the service. This meant that all functions that iterated service descriptors were also inspecting the useless 'desc_next' descriptor that should have been deleted. This commit refactors rotate_all_descriptors() so that it rotates descriptor both when entering overlap mode and also when leaving it.
2017-08-24Merge remote-tracking branch 'dgoulet/bug23319_032_01'Nick Mathewson
2017-08-24test: Fix memory leak in hs_descriptor/decode_bad_signatureDavid Goulet
Fixes #23319 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24add another invizbox maintainer to ReleasingTor.mdNick Mathewson
2017-08-24Re-run trunnel. Cosmetic changes only.Nick Mathewson
2017-08-24Merge branch 'ahf_bug22497_redux'Nick Mathewson
2017-08-24Changes file for 22497Nick Mathewson
2017-08-24Ensure that `make check-spaces` is happy.Alexander Færøy
The `test-operator-cleanup` patch, and related coccinelle patches, don't do any checks for line length. This patch fixes the line length issues caused by the previous commits.
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-24apply ahf's test_assert_zero.cocciNick Mathewson
2017-08-24Apply ahf's ceil_div.cocci patch.Nick Mathewson
2017-08-24Fix a needless line-continuation in aes.cNick Mathewson
coccinelle was getting confused
2017-08-24Apply test-operator-cleanup to src/common too.Nick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]