Commit Graph
17197 Commits
Author SHA1 Message Date
Nick Mathewson b0a842913a Merge branch 'maint-0.2.9' 2016-12-07 11:09:27 -05:00
Nick Mathewson fce425e3ff Increase tolerances in util/monotonic_time tests
This is an attempt to fix #19974.
2016-12-07 11:08:54 -05:00
Nick Mathewson 129cee1c75 Merge branch 'maint-0.2.9' 2016-12-07 10:52:28 -05:00
Nick Mathewson d6ca36defa Merge branch 'bug20710_025' into maint-0.2.9 2016-12-07 10:52:12 -05:00
Nick Mathewson 41adfd6fa3 Fix a couple more crypto_digest() calls to be explicit < 0 2016-12-05 10:31:31 -05:00
Nick Mathewson daeb633825 whitespace fix 2016-12-05 10:31:10 -05:00
Nick Mathewson f92630941a Merge remote-tracking branch 'chelseakomlo/20717_hashing_api_bug' 2016-12-05 10:27:16 -05:00
Nick Mathewson 5923418eff Merge remote-tracking branch 'jryans/service_is_ephemeral' 2016-12-05 08:57:00 -05:00
Nick Mathewson f96f4c0e42 Merge remote-tracking branch 'chelseakomlo/circuituse' 2016-12-05 08:25:22 -05:00
Nick Mathewson 0ded72322c Merge branch 'maint-0.2.9' 2016-12-05 08:21:46 -05:00
J. Ryan Stinnett cf2f36b8b4 Test for .git as readable instead of a dir to support worktrees
Fixes #20492.
2016-12-05 08:21:17 -05:00
Nick Mathewson 8230cf7ea6 Merge remote-tracking branch 'jryans/local-hostname' 2016-12-05 08:17:01 -05:00
Nick Mathewson f7e8bd640a Merge branch 'maint-0.2.9' 2016-12-05 08:13:14 -05:00
J. Ryan Stinnett 63d3ba96f9 Use rend_service_is_ephemeral for all service checks in rendservice.c
Fixes #20853.
2016-12-04 14:35:09 -06:00
J. Ryan Stinnett 7ffa95abd9 Clarify that ClientRejectInternalAddresses also rejects mDNS *.local hosts
Fixes #17070.
2016-12-03 21:10:40 -06:00
teor 8a0ea3ee43 Use a temporary service list when validating and adding hidden services
This resolves two issues:
* the checks in rend_add_services were only being performed when adding
  the service, and not when the service was validated,
  (this meant that duplicate checks were not being performed, and some SETCONF
  commands appeared to succeed when they actually failed), and
* if one service failed while services were being added, then the service
  list would be left in an inconsistent state (tor dies when this happens,
  but the code is cleaner now).

Fixes #20860.
2016-12-03 09:10:46 +11:00
teor 93c62f5ac1 Add a missing rend_service_free in rend_service_add 2016-12-03 08:24:47 +11:00
teor 0446188674 Clarify the function documentation for rend_get_service_list_mutable
Comment-only change
2016-12-03 08:23:01 +11:00
teor e8ce57e6e8 Move a comment in test_single_onion_poisoning 2016-12-03 06:30:58 +11:00
teor 8d42aab3f6 Add a missing return value check in test_single_onion_poisoning 2016-12-03 06:30:06 +11:00
teor fdd368d656 Remove a double-free in test_single_onion_poisoning
We were freeing both dir{1,2} directly, and service_{1,2}->directory via
rend_service_free, even though they are the same pointer.
2016-12-03 06:27:32 +11:00
teor c100c5c69b Refactor poison_dir allocation and free in test_single_onion_poisoning
This pattern is much less error-prone when future changes are made.
2016-12-03 06:25:46 +11:00
Nick Mathewson e6facbfe7a Add accessor for inspecting timer callbacks. 2016-12-02 12:15:07 -05:00
Nick Mathewson ca4a0ae0b1 Merge branch 'maint-0.2.9' 2016-12-02 12:10:39 -05:00
David Goulet 907cd8a0cf protover: Fix old tor hardcoded version check
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-02 12:09:08 -05:00
Nick Mathewson ed4213fa08 Merge remote-tracking branch 'teor/bug20667' 2016-12-02 12:07:10 -05:00
Nick Mathewson d7ec1708b1 Merge branch 'maint-0.2.9' 2016-12-02 12:00:53 -05:00
Nick Mathewson 8b93cbc16d Merge branch 'bug20716_026' into maint-0.2.9 2016-12-02 12:00:46 -05:00
Nick Mathewson cf762c663d Bump to 0.2.9.6-rc-dev 2016-12-02 11:20:23 -05:00
Nick Mathewson e317a9cb7c Merge branch 'bug20599_030_v4' 2016-12-02 07:47:32 -05:00
Nick Mathewson 6f101f96a6 Merge branch 'maint-0.2.9' 2016-12-02 07:40:53 -05:00
Nick Mathewson 1221c5aa02 test_single_onion_poisoning: Free dir[12] on all paths
Coverity doesn't like it when there are paths to the end of the
function where something doesn't get freed, even when those paths
are only reachable on unit test failure.

Fixes CID 1372899 and CID 1372900. Bug not in any released Tor.
2016-12-02 07:39:14 -05:00
Nick Mathewson 9e297f8197 Bump to 0.2.9.6-rc 2016-12-01 13:36:38 -05:00
Nick Mathewson 6a069959c6 Fix major errors in freeing getaddrinfo sandbox cache
Patch from cypherpunks. Fixes bug 20710; bugfix on 0.2.5.5-alpha.
2016-12-01 10:36:02 -05:00
overcaffeinated 3b6da3f90c Fix memory leak in bug 20716
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-01 10:14:42 -05:00
teor b917b3875e Stop ignoring misconfigured hidden services
Instead, refuse to start tor until the misconfigurations have been corrected.

Fixes bug 20559; bugfix on multiple commits in 0.2.7.1-alpha and earlier.
2016-12-01 09:51:33 -05:00
teor 36bb900def Refactor rend_service_list substitute list selection code
Remove duplicate code.
No behaviour change.
2016-12-01 09:51:24 -05:00
teor 1e8f68a9c7 Add an extra warning message to check_private_dir 2016-12-01 09:51:19 -05:00
Nick Mathewson 5efbd41daa Merge branch 'maint-0.2.9' 2016-12-01 09:50:17 -05:00
Nick Mathewson f8a7972b29 Merge branch 'bug20638_029_v2_squashed' into maint-0.2.9 2016-12-01 09:45:14 -05:00
teor f80a43d16f Stop ignoring hidden service key anonymity when first starting tor
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-01 09:44:53 -05:00
teor 91abd60cad Update unit tests for 20484, 20529
Add extra logging and extra validity checks for hidden services.
2016-12-01 09:44:53 -05:00
Nick Mathewson a7762930c3 Merge remote-tracking branch 'dgoulet/ticket20568_030_01' 2016-12-01 09:23:36 -05:00
Nick Mathewson c1e8dfd6cf Fix compilation 2016-12-01 09:20:04 -05:00
teor 04f7944891 Stop discarding downloaded full descriptors when using microdescs for circuits
This affects clients with FetchUselessDescriptors 1.

It might also cause subtle bugs on directory mirrors and authorities,
causing them to consider all full descriptors as failed or old.
2016-11-30 12:20:28 +11:00
teor e061cf4d1d Remove an unneccessary FetchUselessDescriptors check in client_would_use_router 2016-11-30 11:43:04 +11:00
teor 65d793fab2 Fetch unknown certificates if FetchUselessDescriptors is true 2016-11-30 11:07:48 +11:00
teor e5c608e535 Stop discarding consensus flavors and descriptors we wanted to fetch
Instead, fetch and store consensus flavors and descriptors we wanted to
fetch.

And serve them if we are a directory cache (or authority).
2016-11-30 11:06:36 +11:00
s7r 215cc0d527 Improve log messages related to identity key
Improve the messages logged when Tor wants or needs to load the master ed25519 identity key so the user is explicitly informed when further action is required or not. Fixes ticket #20650.
2016-11-27 13:07:43 +00:00
Chelsea H. Komlo e01b09d5ce crypto_digest512 returns expected error value of -1 2016-11-24 12:14:54 -05:00