summaryrefslogtreecommitdiff
path: root/src/feature/rend
AgeCommit message (Collapse)Author
2019-09-09Merge branch 'ticket30924_042_04_squashed' into ↵Nick Mathewson
ticket30924_042_04_squashed_merged
2019-09-04rendclient: use ptrdiff, not off_t, for offset of DH field.Nick Mathewson
The off_t type is only useful for offsets on the filesystem. For in-memory offsets, use ptrdiff_t.
2019-09-03Merge remote-tracking branch 'tor-github/pr/1279'Nick Mathewson
2019-09-02Merge branch 'maint-0.4.1'Nick Mathewson
2019-09-02Merge branch 'ticket12399_035' into maint-0.4.1Nick Mathewson
2019-09-02Change loglevel of message 'Hash of session info was not as expected'rl1987
2019-08-30Space out the arguments to the cell functions in rend_process_relay_cell()Neel Chauhan
2019-08-29Merge branch 'maint-0.4.1'David Goulet
2019-08-29Merge branch 'tor-github/pr/1255' into maint-0.4.1David Goulet
2019-08-26hs-v3: Move to hs_dos.c INTRO2 defenses initializationDavid Goulet
A bit cleaner especially that the next commit(s) will make the consensus param interface private to hs_dos.c so we expose as little as we can outside of the subsystem. Part of #30924 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-08hs: Initialize the INTRO2 bucket for legacy intro pointDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-06hs: Limit the amount of relayed INTRODUCE2David Goulet
This commit add the hs_dos.{c|h} file that has the purpose of having the anti-DoS code for onion services. At this commit, it only has one which is a function that decides if an INTRODUCE2 can be sent on the given introduction service circuit (S<->IP) using a simple token bucket. The rate per second is 25 and allowed burst to 200. Basic defenses on #15516. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-05Revert "hs: Implement a helper to repurpose a circuit"Mike Perry
This reverts commit 3789f22bcbfbc6de415a838e4c4bfb2555c7d6c3.
2019-06-05Don't access rend data after a circuit has been marked for close.George Kadianakis
This can cause issues if the circuit was repurposed into a padding circuit instead of closing, since in that case we will wipe off the rend_data.
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-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-30Use safe_mem_is_zero in a few more places.Nick Mathewson
I don't believe any of these represent a real timing vulnerability (remote timing against memcmp() on a modern CPU is not easy), but these are the ones where I believe we should be more careful.
2019-04-30Merge branch 'tor-github/pr/936'George Kadianakis
2019-04-19Initialize rate_limited to false in directory_get_from_hs_dir()Neel Chauhan
2019-04-19Make rate_limited and is_rate_limited a boolNeel Chauhan
2019-04-11On failure to create extend info for an introduction point, don't leak.Nick Mathewson
This is CID 1438152. No backport needed: this path is already inside a BUG() guard.
2019-04-11Make repeated/rate limited HSFETCH queries fail with QUERY_RATE_LIMITEDNeel Chauhan
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-02-27Set CIRCLAUNCH_NEED_UPTIME in rend_service_relaunch_rendezvous() on a ↵Neel Chauhan
hs_service_requires_uptime_circ()
2019-02-26Merge branch 'tor-github/pr/611'George Kadianakis
2019-01-18Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-18Merge branch 'maint-0.3.4' into maint-0.3.5Nick Mathewson
2019-01-17Fix users of base32_decode to check for expected length in return.Nick Mathewson
Also, when we log about a failure from base32_decode(), we now say that the length is wrong or that the characters were invalid: previously we would just say that there were invalid characters. Follow-up on 28913 work.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-11Merge branch 'maint-0.3.5'Nick Mathewson
2018-12-20base32_decode(): Return number of bytes written on success.Nick Mathewson
This makes it consistent with base64_decode(). Closes ticket 28913.
2018-12-04conn: Use connection_ap_mark_as_waiting_for_renddesc()David Goulet
Use the helper function connection_ap_mark_as_waiting_for_renddesc() introduced in previous commit everywhere in the code where an AP connection state is transitionned to AP_CONN_STATE_RENDDESC_WAIT. Part of #28669 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-11-13Comment for rend_cache_failure in feature/rend/rendcache.c: "usuable" should ↵Neel Chauhan
be "usable"
2018-10-21clean up a tor2web commentRoger Dingledine
2018-10-18hs-v3: Close client intro circuits if the descriptor is replacedDavid Goulet
When storing a descriptor in the client cache, if we are about to replace an existing descriptor, make sure to close every introduction circuits of the old descriptor so we don't have leftovers lying around. Ticket 27471 describes a situation where tor is sending an INTRODUCE1 cell on an introduction circuit for which it doesn't have a matching intro point object (taken from the descriptor). The main theory is that, after a new descriptor showed up, the introduction points changed which led to selecting an introduction circuit not used by the service anymore thus for which we are unable to find the corresponding introduction point within the descriptor we just fetched. Closes #27471. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Move v2 hs parsing into feature/rendNick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-25Move key-loading and crosscert-checking out of feature/relayNick Mathewson
This is also used by onion services, so it needs to go in another module.
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.