summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2016-12-19Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-12-19Merge branch 'bug21018_024' into maint-0.2.8Nick Mathewson
2016-12-19Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-12-19Update the fallback directory mirror list in December 2016teor
Replace the 81 remaining fallbacks of the 100 originally introduced in Tor 0.2.8.3-alpha in March 2016, with a list of 177 fallbacks (123 new, 54 existing, 27 removed) generated in December 2016. Resolves ticket 20170.
2016-12-18Make log message warn about detected attempts to exploit 21018.Nick Mathewson
2016-12-18Fix parsing bug with unecognized token at EOSNick Mathewson
In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remaining case of not-NUL-terminated potentially hostile data gets NUL-terminated. Fix for bug 21018, TROVE-2016-12-002, and CVE-2016-1254
2016-12-09Downgrade a harmless bug warning to info.Nick Mathewson
Makes 19926 less annoying in 0.2.9. In 0.3.0, we should actually fix this.
2016-12-09router: Fix memory leak in signed_descriptor_move()David Goulet
The signed_descriptor_move() was not releasing memory inside the destination object before overwriting it with the source object. This commit adds a reset function that free that memory inside a signed descriptor object and zero it. Closes #20715. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-07Netbsd doesn't have ipfw, only the regular pf transport stuff.Nick Mathewson
Attempted fix for 19960. Also, fixes a typo.
2016-12-07Fix a BUG() warning from next_random_exponential_delay().Nick Mathewson
Fixes 20875; this code is as suggested by teor on the ticket. Thanks!
2016-12-05Test for .git as readable instead of a dir to support worktreesJ. Ryan Stinnett
Fixes #20492.
2016-12-02protover: Fix old tor hardcoded version checkDavid Goulet
When computing old Tor protocol line version in protover, we were looking at 0.2.7.5 twice instead of the specific case for 0.2.9.1-alpha. Fixes #20810 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-02Merge branch 'bug20716_026' into maint-0.2.9Nick Mathewson
2016-12-01Fix memory leak in bug 20716overcaffeinated
newconn->address is strdup'ed twice when new_type == CONN_TYPE_AP and conn->socket_family == AF_UNIX. Whilst here, juggle code to make sure newconn->port is assigned from an initialised value in the above case.
2016-12-01Merge branch 'bug20638_029_v2_squashed' into maint-0.2.9Nick Mathewson
2016-12-01Stop ignoring hidden service key anonymity when first starting torteor
Instead, refuse to start tor if any hidden service key has been used in a different hidden service anonymity mode. Fixes bug 20638; bugfix on 17178 in 0.2.9.3-alpha; reported by ahf. The original single onion service poisoning code checked poisoning state in options_validate, and poisoned in options_act. This was problematic, because the global array of hidden services had not been populated in options_validate (and there were ordrering issues with hidden service directory creation). This patch fixes this issue in rend_service_check_dir_and_add, which: * creates the directory, or checks permissions on an existing directory, then * checks the poisoning state of the directory, then * poisons the directory. When validating, only the permissions checks and the poisoning state checks are perfomed (the directory is not modified).
2016-12-01Update unit tests for 20484, 20529teor
Add extra logging and extra validity checks for hidden services.
2016-11-18Refactor rend_service_check_dir_and_addteor
Make the function flatter, and prepare for #20559. No behaviour change.
2016-11-18Refactor duplicate code out of rend_config_servicesteor
Put that code in rend_service_check_dir_and_add. No behaviour change. This is a defence in depth measure against similar bugs to 20529.
2016-11-18Create HS directories in rend_config_services, then check before useteor
(We only create HS directories if we are acting on the config.) Log a BUG warning if the directories aren't present immediately before they are used, then fail.
2016-11-16don't attempt a resolve when the cached answer will doRoger Dingledine
For relays that don't know their own address, avoid attempting a local hostname resolve for each descriptor we download. Also cut down on the number of "Success: chose address 'x.x.x.x'" log lines. Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha.
2016-11-16refactor router_pick_published_address to have another argRoger Dingledine
no change in behavior except fewer log entries in the case where we use a cached result.
2016-11-09Stop logging single onion and Tor2web long-term one-hop circuitsteor
Single onion services and Tor2web deliberately create long-term one-hop circuits to their intro and rend points, respectively. These log messages are intended to diagnose issue 8387, which relates to circuits hanging around forever for no reason. Fixes bug 20613; bugfix on 0.2.9.1-alpha. Reported by "pastly".
2016-11-09Call get_options() once at the top of circuit_log_ancient_one_hop_circuits()teor
Refactoring, no behaviour change.
2016-11-08Merge remote-tracking branch 'public/bug20306_029' into maint-0.2.9Nick Mathewson
2016-11-08When using exponential backoff in test networks, use a lower exponentteor
Lower exponents mean that delays do not vary as much. This helps test networks bootstrap consistently. Bugfix on 20499.
2016-11-07Merge remote-tracking branch 'teor/bug20484_029_v2' into maint-0.2.9Nick Mathewson
2016-11-07Reduce multiplier to 3, per teor's recommendation on #20534Nick Mathewson
(Three _is_ a good number for anonymity!)
2016-11-07Always increment delays by at least 1.Nick Mathewson
2016-11-07Avoid integer overflow in delay calculation.Nick Mathewson
2016-11-07Count HTTP 503 as a download failure.Nick Mathewson
Because as Teor puts it: "[Resetting on 503] is exactly what we don't want when relays are busy - imagine clients doing an automatic reset every time they DoS a relay..." Fixes bug 20593.
2016-11-07Adjust download schedules per teor's #20534 recommendataionsNick Mathewson
2016-11-07Merge branch '20499_part1_029_squashed', remote-tracking branches ↵Nick Mathewson
'teor/bug20591_029' and 'teor/bug20533_029' into maint-0.2.9
2016-11-07Allow infinitely long delays in exponential-backoff downloadsNick Mathewson
It's only safe to remove the failure limit (per 20536) if we are in fact waiting a bit longer each time we try to download. Fixes bug 20534; bugfix on 0.2.9.1-alpha.
2016-11-08When downloading certificates, check for related failuresteor
If a consensus expires while we are waiting for certificates to download, stop waiting for certificates. If we stop waiting for certificates less than a minute after we started downloading them, do not consider the certificate download failure a separate failure. Fixes bug 20533; bugfix on commit e0204f21 in 0.2.0.9-alpha.
2016-11-07Ensure relays don't make multiple connections during bootstrapteor
Relays do not deliberately launch multiple attempts, so the impact of this bug should be minimal. This fix also defends against bugs like #20499. Bugfix on 0.2.8.1-alpha.
2016-11-06Finish a sentence in a comment. Close 20576.Nick Mathewson
2016-11-06Do not apply 'max_failures' to random-exponential schedules.Nick Mathewson
Fixes bug 20536; bugfix on 0.2.9.1-alpha.
2016-11-06Change a BUG warning to be a warning, not an info.Nick Mathewson
2016-11-06Fix get_delay() code to avoid TIME_MAX overflow, not INT_MAX.Nick Mathewson
Fixes bug 20587; bugfix on 35bbf2e4a4e8ccb in 0.2.8.1-alpha.
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-02Use the latest options in rend_service_check_private_dirteor
Fixup on both: * Refactor, adding a create argument... and * Check every hidden service directory's permissions...
2016-11-02Check every hidden service directory's permissions when configuringteor
Previously, we would only check the last hidden service directory. Fixes #20529, bugfix on ticket 13942 commit 85bfad1 in 0.2.6.2-alpha.
2016-11-02Improve comments in check_private_dir and onion poisoningteor
Comment changes only
2016-11-02fixup! Refactor, adding a create argument to rend_service_check_private_dirteor
2016-11-02Remove redundant group permission code from rend_service_check_private_dirteor
check_private_dir already does this for existing directories.
2016-11-02Refactor, adding a create argument to rend_service_check_private_dirteor
It used to be rend_service_check_and_create_private_dir, which always created the directory. No behaviour change.
2016-11-01Always call connection_ap_attach_pending() once a second.Nick Mathewson
Fixes bug 19969; bugfix on b1d56fc58. We can fix this some more in later Tors, but for now, this is probably the simplest fix possible. This is a belt-and-suspenders fix, where the earlier fix ("Ask event_base_loop to finish when we add a pending stream") aims to respond to new streams as soon as they arrive, and this one aims to make sure that we definitely respond to all of the streams.
2016-11-01Ask event_base_loop to finish when we add a pending streamRoger Dingledine
Fixes bug 19969; bugfix on b1d56fc58. We can fix this some more in later Tors, but for now, this is probably the right fix for us.
2016-11-01refactor out the tor_event_base_loopexit() callRoger Dingledine
no actual changes