aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
AgeCommit message (Collapse)Author
2020-03-17Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-17Fix TROVE-2020-003.George Kadianakis
Given that ed25519 public key validity checks are usually not needed and (so far) they are only necessary for onion addesses in the Tor protocol, we decided to fix this specific bug instance without modifying the rest of the codebase (see below for other fix approaches). In our minimal fix we check that the pubkey in hs_service_add_ephemeral() is valid and error out otherwise.
2020-03-17Trivial bugfixes found during TROVE investigation.George Kadianakis
2019-11-25Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-11-25Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1395' into maint-0.3.5teor
2019-10-24hs-v3: Remove a BUG() caused by an acceptable raceDavid Goulet
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor from the client cache with a NEWNYM or simply when the descriptor expires. Which means that for an INTRO circuit being established during that time, once it opens, we lookup the descriptor to get the IP object but hey surprised, no more descriptor. The approach here is minimalist that is accept the race and close the circuit since we can not continue. Before that, the circuit would stay opened and the client wait the SockTimeout. Fixers #28970. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-23Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-07hs-v3: Make service pick the exact amount of intro pointsDavid Goulet
When encoding introduction points, we were not checking if that intro points had an established circuit. When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor. However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed. But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet. This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561). Fixes #31548 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-29Merge branch 'tor-github/pr/1256' into maint-0.4.1David Goulet
2019-08-23hs: v3 single onion services fall back to 3-hop intro for unreachable nodesteor
Previously, v3 single onion services failed when all intro nodes were unreachable via a 1-hop path. Now, we select intros that are only available via a 3-hop path, and use a 3-hop path to connect to them. Fixes bug 23507; bugfix on 0.3.2.1-alpha.
2019-08-23hs: Always use a 3-hop path when a v3 single onion intro failsteor
Previously, we always used a 1-hop path, no matter how many times a v3 single onion intro failed. Fixes bug 23818; bugfix on 0.3.2.1-alpha.
2019-08-23hs: Always use a 3-hop path when a v3 single onion rend failsteor
Previously, we used a 1-hop path when a single onion rend failed immediately, and a 3-hop path when it failed after trying to build a circuit. Fixes bug 23818; bugfix on 0.3.2.1-alpha.
2019-06-05Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0Nick Mathewson
2019-06-05Merge remote-tracking branch 'tor-github/pr/1076'Nick Mathewson
2019-06-05Revert "hs: Implement a helper to repurpose a circuit"Mike Perry
This reverts commit 3789f22bcbfbc6de415a838e4c4bfb2555c7d6c3.
2019-06-05Add missing newline after decode_intro_points() closing bracketNeel Chauhan
2019-06-05Run "make autostyle."Nick Mathewson
2019-06-05Merge remote-tracking branch 'tor-github/pr/1053'Nick Mathewson
2019-05-29hs: Implement a helper to repurpose a circuitDavid Goulet
When we repurpose a hidden service circuit, we need to clean up from the HS circuit map and any HS related data structured contained in the circuit. This commit adds an helper function that does it when repurposing a hidden service circuit. Fixes #29034 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-22Merge remote-tracking branch 'dgoulet/ticket30454_035_01'Nick Mathewson
2019-05-22Merge remote-tracking branch 'nickm/ticket30454_034_01_squashed' into ↵David Goulet
ticket30454_035_01
2019-05-15fix typos, whitespace, commentsRoger Dingledine
2019-05-15Merge branch 'maint-0.4.0'George Kadianakis
2019-05-15Merge branch 'tor-github/pr/1013' into maint-0.4.0George Kadianakis
2019-05-10Don't pass a NULL into a %s when logging client auth file load failureNick Mathewson
Fortunately, in 0.3.5.1-alpha we improved logging for various failure cases involved with onion service client auth. Unfortunately, for this one, we freed the file right before logging its name. Fortunately, tor_free() sets its pointer to NULL, so we didn't have a use-after-free bug. Unfortunately, passing NULL to %s is not defined. Fortunately, GCC 9.1.1 caught the issue! Unfortunately, nobody has actually tried building Tor with GCC 9.1.1 before. Or if they had, they didn't report the warning. Fixes bug 30475; bugfix on 0.3.5.1-alpha.
2019-05-10Merge branch 'tor-github/pr/973'George Kadianakis
2019-05-08Merge branch 'tor-github/pr/1000'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-03Revert "Hiding crypt_path_t: Create a constructor for crypt_path_t."George Kadianakis
This reverts commit ab8b80944967ee5a6a0c45dbf61839cf257bfe44.
2019-05-03Hiding crypt_path_t: Rename some functions to fit the crypt_path API.George Kadianakis
Some of these functions are now public and cpath-specific so their name should signify the fact they are part of the cpath module: assert_cpath_layer_ok -> cpath_assert_layer_ok assert_cpath_ok -> cpath_assert_ok onion_append_hop -> cpath_append_hop circuit_init_cpath_crypto -> cpath_init_circuit_crypto circuit_free_cpath_node -> cpath_free onion_append_to_cpath -> cpath_extend_linked_list
2019-05-03Hiding crypt_path_t: Create a constructor for crypt_path_t.George Kadianakis
We are using an opaque pointer so the structure needs to be allocated on the heap. This means we now need a constructor for crypt_path_t. Also modify all places initializing a crypt_path_t to use the constructor.
2019-05-03Hiding crypt_path_t: Move init functions to crypt_path.c.George Kadianakis
This commit only moves code.
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-24hs_config: Allow Tor to be configured as an IPv6-only v3 single onion serviceteor
Part of #23588.
2019-04-24Add firewall_choose_address_ls() and hs_get_extend_info_from_lspecs() testsNeel Chauhan
2019-04-24Use fascist_firewall_choose_address_ls() in hs_get_extend_info_from_lspecs()Neel Chauhan
2019-04-23Rename outvar to follow _out convention.Nick Mathewson
2019-04-23Merge remote-tracking branch 'tor-github/pr/935'Nick Mathewson
2019-04-19Initialize rate_limited in hs_pick_hsdir() to falseNeel Chauhan
2019-04-19Only set rate_limited in hs_pick_hsdir() if rate_limited_count or ↵Neel Chauhan
responsible_dirs_count is greater than 0
2019-04-19Make rate_limited and is_rate_limited a boolNeel Chauhan
2019-04-11Make repeated/rate limited HSFETCH queries fail with QUERY_RATE_LIMITEDNeel Chauhan
2019-04-05crypto_format: Remove the return value from ed25519_signature_to_base64()teor
Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return value from curve25519_public_to_base64()teor
And fix the documentation on the function: it does produce trailing "="s as padding. Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-03-12Fix all nonconformant headers' guard macros.Nick Mathewson
2019-03-12Merge branch 'bug23576-041-rebased-squashed'Nick Mathewson
2019-03-12hs: abolish hs_desc_link_specifier_dup()teor
The previous commits introduced link_specifier_dup(), which is implemented using trunnel's opaque interfaces. So we can now remove hs_desc_link_specifier_dup(). Cleanup after bug 22781.