aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2020-02-12Lowercase the BridgeDistribution value from torrc in descriptors.Alexander Færøy
This patch ensures that we always lowercase the BridgeDistribution from torrc in descriptors before submitting it. See: https://bugs.torproject.org/32753
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-11-06Merge remote-tracking branch 'tor-github/pr/1340' 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 remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5teor
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-09-18Avoid a crash if our "current" and "old" ntor onion keys are equalNick Mathewson
Our dimap code asserts if you try to add the same key twice; this can't happen if everything is running smoothly, but it's possible if you try to start a relay where secret_onion_key_ntor is the same as secret_onion_key_ntor.old. Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were introduced.
2019-09-18Extract expressions in construct_ntor_key_map()Nick Mathewson
No behavioral change here: this is just refactoring.
2019-09-06entrynodes: Make routine descriptor expiry notice logs less alarmingteor
When tor is missing descriptors for some primary entry guards, make the log message less alarming. It's normal for descriptors to expire, as long as tor fetches new ones soon after. Fixes bug 31657; bugfix on 0.3.3.1-alpha.
2019-09-02Change loglevel of message 'Hash of session info was not as expected'rl1987
2019-08-30Merge remote-tracking branch 'tor-github/pr/1181' into maint-0.3.5teor
2019-08-30Merge remote-tracking branch 'tor-github/pr/1117' into maint-0.3.5teor
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-08-23Merge branch 'bug23818_029' into bug23818_035teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1066' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1034' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/987' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/937' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/848' into maint-0.3.5teor
2019-08-09Merge remote-tracking branch 'tor-github/pr/1080' into maint-0.3.5teor
2019-08-08Merge branch 'ticket31343_029' into ticket31343_035Nick Mathewson
2019-07-19Set 'routerlist' global to NULL before freeing it.Nick Mathewson
There is other code that uses this value, and some of it is apparently reachable from inside router_dir_info_changed(), which routerlist_free() apparently calls. (ouch!) This is a minimal fix to try to resolve the issue without causing other problems. Fixes bug 31003. I'm calling this a bugfix on 0.1.2.2-alpha, where the call to router_dir_info_changed() was added to routerlist_free().
2019-06-19guard: Ignore marked for close circuit when changing state to openDavid Goulet
When we consider all circuits in "waiting for guard" state to be promoted to an "open" state, we were considering all circuits, even the one marked for close. This ultiamtely triggers a "circuit_has_opened()" called on the circuit that is marked for close which then leads to possible undesirable behaviors within a subsystem. For instance, the HS subsystem would be unable to find the authentication key of the introduction point circuit leading to a BUG() warning and a duplicate mark for close on the circuit. This commit also adds a unit test to make sure we never select marked for close circuits when upgrading its guard state from waiting for guard to open. Fixes #30871 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-06Merge branch 'bug30781_034' into bug30781_035teor
Moved fix from src/or/routerparse.c to src/feature/dirparse/routerparse.c.
2019-05-31num_bridges_usable(): only count configured bridges.Nick Mathewson
When this function was implemented, it counted all the entry guards in the bridge set. But this included previously configured bridges, as well as currently configured ones! Instead, only count the _filtered_ bridges (ones that are configured and possibly reachable) as maybe usable. Fixes bug 29875; bugfix on 0.3.0.1-alpha.
2019-05-22Merge remote-tracking branch 'nickm/ticket30454_034_01_squashed' into ↵David Goulet
ticket30454_035_01
2019-05-17OOM-purge the DNS cache one part at a timeNick Mathewson
Previously we purged it in 1-hour increments -- but one-hour is the maximum TTL for the cache! Now we do it in 25%-TTL increments. Fixes bug 29617; bugfix on 0.3.5.1-alpha.
2019-05-14Add a --list-modules commandNick Mathewson
Closes ticket 30452.
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-04-29Move bandwidth-file-headers line to appear in the correct vote sectionNick Mathewson
Fixes bug 30316; bugfix on 0.3.5.1-alpha.
2019-04-19Merge branch 'maint-0.3.4' into maint-0.3.5teor
2019-03-21Merge branch 'ticket29806_034_squashed' into ticket29806_035_squashed_mergedteor
Copy and paste the vote=0 code from the old src/or/dirserv.c to the new src/feature/dirauth/bwauth.c.
2019-03-20Merge branch 'maint-0.3.4' into maint-0.3.5teor
2019-03-15Stop logging a BUG() warning when tor is waiting for exit descriptorsteor
Fixes bug 28656; bugfix on 0.3.5.1-alpha.
2019-02-14Merge branch 'tor-github/pr/536' into maint-0.3.5George Kadianakis
2019-02-08Merge branch 'ticket29040_1_changes' into maint-0.3.5Nick Mathewson
2019-01-24hs-v3: add an option param to safe log functionsSuphanat Chunhapanya
We add an option param to safe_str and safe_str_client because in some case we need to use those functions before global_options is set.
2019-01-24hs-v3: fix use after free in client auth configSuphanat Chunhapanya
We accidentally use `auth` after freeing it in client_service_authorization_free. The way to solve it is to free after using it.
2019-01-23Log an HSDesc we failed to parse at Debug loglevelrl1987
2019-01-18Merge branch 'maint-0.3.4' into maint-0.3.5Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-14Rework rep_hist_log_link_protocol_counts()rl1987
2019-01-11Merge remote-tracking branch 'tor-github/pr/563' into maint-0.3.5Nick Mathewson
2019-01-09Stop logging 'Your Guard' in circpathbias.crl1987