]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3 maint-0.3.3
Nick Mathewson [Wed, 6 Mar 2019 19:29:29 +0000 (14:29 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the March 4 2019 database.
Karsten Loesing [Wed, 6 Mar 2019 10:45:27 +0000 (11:45 +0100)] 
Update geoip and geoip6 to the March 4 2019 database.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
teor [Fri, 1 Mar 2019 04:15:59 +0000 (14:15 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge remote-tracking branch 'tor-github/pr/749' into maint-0.2.9
teor [Fri, 1 Mar 2019 04:15:00 +0000 (14:15 +1000)] 
Merge remote-tracking branch 'tor-github/pr/749' into maint-0.2.9

6 years agoMerge remote-tracking branch 'tor-github/pr/748' into maint-0.2.9
teor [Fri, 1 Mar 2019 04:14:51 +0000 (14:14 +1000)] 
Merge remote-tracking branch 'tor-github/pr/748' into maint-0.2.9

6 years agoMerge remote-tracking branch 'tor-github/pr/747' into maint-0.2.9
teor [Fri, 1 Mar 2019 04:14:26 +0000 (14:14 +1000)] 
Merge remote-tracking branch 'tor-github/pr/747' into maint-0.2.9

6 years agoMerge remote-tracking branch 'tor-github/pr/731' into maint-0.3.3
teor [Thu, 28 Feb 2019 00:48:46 +0000 (10:48 +1000)] 
Merge remote-tracking branch 'tor-github/pr/731' into maint-0.3.3

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
teor [Thu, 28 Feb 2019 00:45:30 +0000 (10:45 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agotest/shared-random: use sr_state_free_all() rather than sr_state_free()
teor [Wed, 27 Feb 2019 04:57:35 +0000 (14:57 +1000)] 
test/shared-random: use sr_state_free_all() rather than sr_state_free()

sr_state_free() was renamed to sr_state_free_all() between 0.2.9 and 0.3.3.

Part of 29599.

6 years agoMerge branch 'bug29599_029' into bug29599_033
teor [Wed, 27 Feb 2019 05:06:39 +0000 (15:06 +1000)] 
Merge branch 'bug29599_029' into bug29599_033

6 years agotest/shared-random: Stop leaking shared random state in the unit tests
teor [Tue, 26 Feb 2019 12:14:30 +0000 (22:14 +1000)] 
test/shared-random: Stop leaking shared random state in the unit tests

Stop leaking parts of the shared random state in the shared-random unit
tests.

Fixes bug 29599; bugfix on 0.2.9.1-alpha.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
teor [Tue, 26 Feb 2019 23:37:36 +0000 (09:37 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoBump to 0.3.3.12-dev
Nick Mathewson [Thu, 21 Feb 2019 18:22:56 +0000 (13:22 -0500)] 
Bump to 0.3.3.12-dev

6 years agokist: Don't write above the highwater outbuf mark
David Goulet [Thu, 24 Jan 2019 15:52:08 +0000 (10:52 -0500)] 
kist: Don't write above the highwater outbuf mark

KIST works by computing how much should be allowed to write to the kernel for
a given socket, and then it writes that amount to the outbuf.

The problem is that it could be possible that the outbuf already has lots of
data in it from a previous scheduling round (because the kernel is full/busy
and Tor was not able to flush the outbuf yet). KIST ignores that the outbuf
has been filling (is above its "highwater") and writes more anyway. The end
result is that the outbuf length would exceed INT_MAX, hence causing an
assertion error and a corresponding "Bug()" message to get printed to the
logs.

This commit makes it for KIST to take into account the outbuf length when
computing the available space.

Bug found and patch by Rob Jansen.

Closes #29168. TROVE-2019-001.

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoUpdate to 0.3.3.12
Nick Mathewson [Thu, 21 Feb 2019 14:49:48 +0000 (09:49 -0500)] 
Update to 0.3.3.12

6 years agoFix a compiler warning on OpenBSD
Kris Katterjohn [Mon, 21 Jan 2019 22:33:32 +0000 (16:33 -0600)] 
Fix a compiler warning on OpenBSD

malloc_options needs to be declared extern (and declaring it extern
means we need to initialize it separately)

Fixes bug 29145; bugfix on 0.2.9.3-alpha

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Tue, 12 Feb 2019 14:56:49 +0000 (09:56 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the February 5 2019 database.
Karsten Loesing [Tue, 12 Feb 2019 13:40:42 +0000 (14:40 +0100)] 
Update geoip and geoip6 to the February 5 2019 database.

6 years agoUpdate Cargo.lock with new comment; suppress 29244.
Nick Mathewson [Fri, 1 Feb 2019 15:38:23 +0000 (16:38 +0100)] 
Update Cargo.lock with new comment; suppress 29244.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Wed, 23 Jan 2019 14:50:38 +0000 (09:50 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

"ours" merge to avoid dropping non-broken changes files after
removal of merged 0.2.9 changes files.

6 years agomaint-0.2.9: remove changes files that are merged in 0.2.9 releases
Nick Mathewson [Wed, 23 Jan 2019 14:48:28 +0000 (09:48 -0500)] 
maint-0.2.9: remove changes files that are merged in 0.2.9 releases

Many of these files cause check-changes to fail, which will be a
long-term problem as we continue to support 0.2.9.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Fri, 18 Jan 2019 17:25:08 +0000 (12:25 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agorend: stop warning when clients send multiple rend establish cells
teor [Wed, 9 Jan 2019 08:00:34 +0000 (18:00 +1000)] 
rend: stop warning when clients send multiple rend establish cells

Stop logging "Tried to establish rendezvous on non-OR circuit..." as
a warning. Instead, log it as a protocol warning, because there is
nothing that relay operators can do to fix it.

Fixes bug 29029; bugfix on 0.2.5.7-rc.

6 years agoUpdate to 0.3.3.3.11-dev
Nick Mathewson [Tue, 8 Jan 2019 02:16:40 +0000 (21:16 -0500)] 
Update to 0.3.3.3.11-dev

6 years agoBump to 0.3.3.11
Nick Mathewson [Mon, 7 Jan 2019 15:21:59 +0000 (10:21 -0500)] 
Bump to 0.3.3.11

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Mon, 7 Jan 2019 13:43:45 +0000 (08:43 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the January 3 2019 database.
Karsten Loesing [Mon, 7 Jan 2019 08:00:29 +0000 (09:00 +0100)] 
Update geoip and geoip6 to the January 3 2019 database.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Fri, 4 Jan 2019 20:04:58 +0000 (15:04 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge branch 'bug21394_029_redux' into maint-0.2.9
Nick Mathewson [Fri, 4 Jan 2019 20:04:54 +0000 (15:04 -0500)] 
Merge branch 'bug21394_029_redux' into maint-0.2.9

6 years agoMerge remote-tracking branch 'dgoulet/ticket28619_033_01' into maint-0.3.3
Nick Mathewson [Fri, 4 Jan 2019 19:49:16 +0000 (14:49 -0500)] 
Merge remote-tracking branch 'dgoulet/ticket28619_033_01' into maint-0.3.3

6 years agoMerge branch 'ticket28973_033_squashed' into maint-0.3.3
Nick Mathewson [Thu, 3 Jan 2019 14:01:40 +0000 (09:01 -0500)] 
Merge branch 'ticket28973_033_squashed' into maint-0.3.3

6 years agoDetect openssl bug 7712 and work around it.
Nick Mathewson [Wed, 2 Jan 2019 19:23:42 +0000 (14:23 -0500)] 
Detect openssl bug 7712 and work around it.

In theory it would be better to detect this bug in advance, but this
approach is much simpler, and therefore safer to backport.

This closes tor issue 28973.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Tue, 11 Dec 2018 15:00:22 +0000 (10:00 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoNote ticket number in changes file for 24803
Nick Mathewson [Tue, 11 Dec 2018 15:00:19 +0000 (10:00 -0500)] 
Note ticket number in changes file for 24803

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Tue, 11 Dec 2018 14:41:04 +0000 (09:41 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoFallbacks: Update the hard-coded fallback list in December 2018
teor [Mon, 10 Dec 2018 06:56:29 +0000 (16:56 +1000)] 
Fallbacks: Update the hard-coded fallback list in December 2018

Merge Phoul's two lists into teor's list.

Replace the 150 fallbacks originally introduced in Tor 0.3.3.1-alpha in
January 2018 (of which ~115 were still functional), with a list of
157 fallbacks (92 new, 65 existing, 85 removed) generated in
December 2018.

Closes ticket 24803.

6 years agoFallbacks: Update the hard-coded fallback list in December 2018
teor [Fri, 7 Dec 2018 06:43:10 +0000 (16:43 +1000)] 
Fallbacks: Update the hard-coded fallback list in December 2018

Replace the 150 fallbacks originally introduced in Tor 0.3.3.1-alpha in
January 2018 (of which ~115 were still functional), with a list of
148 fallbacks (89 new, 59 existing, 91 removed) generated in
December 2018.

Closes ticket 24803.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Thu, 6 Dec 2018 14:26:32 +0000 (09:26 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the December 5 2018 database.
Karsten Loesing [Wed, 5 Dec 2018 20:02:39 +0000 (21:02 +0100)] 
Update geoip and geoip6 to the December 5 2018 database.

6 years agohs-v3: Do not close RP circuits when deleting an ephemeral service
David Goulet [Mon, 26 Nov 2018 19:40:22 +0000 (14:40 -0500)] 
hs-v3: Do not close RP circuits when deleting an ephemeral service

Bug reported on tor-dev@ and here is the detail explanation of the issue:
https://lists.torproject.org/pipermail/tor-dev/2018-November/013558.html

Fixes bug #28619

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoTest: Fix memory leaks and missing unmocks in entry guard tests
teor [Wed, 21 Nov 2018 05:56:30 +0000 (15:56 +1000)] 
Test: Fix memory leaks and missing unmocks in entry guard tests

test_entry_guard_outdated_dirserver_exclusion leaks memory, and is
missing some unmocks.

Fixes 28554; bugfix on 0.3.0.1-alpha.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Thu, 15 Nov 2018 21:54:16 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge branch 'bug26913_033' into maint-0.3.3
Nick Mathewson [Thu, 15 Nov 2018 21:47:22 +0000 (16:47 -0500)] 
Merge branch 'bug26913_033' into maint-0.3.3

6 years agoMerge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9
Nick Mathewson [Thu, 15 Nov 2018 21:43:50 +0000 (16:43 -0500)] 
Merge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9

Resolved conflicts with the 26269 fix in 015fcd0e1191aa6f.

6 years agoMerge remote-tracking branch 'dgoulet/bug27550_033_01' into maint-0.3.3
Nick Mathewson [Thu, 15 Nov 2018 21:37:02 +0000 (16:37 -0500)] 
Merge remote-tracking branch 'dgoulet/bug27550_033_01' into maint-0.3.3

6 years agoWork around check-spaces.
Nick Mathewson [Wed, 14 Nov 2018 12:54:57 +0000 (07:54 -0500)] 
Work around check-spaces.

6 years agoChanges file for bug 28419
Nick Mathewson [Wed, 14 Nov 2018 12:51:36 +0000 (07:51 -0500)] 
Changes file for bug 28419

6 years agolibtorrunner: fix memory leak in child() error path
Martin Kepplinger [Tue, 13 Nov 2018 09:09:29 +0000 (10:09 +0100)] 
libtorrunner: fix memory leak in child() error path

This avoids leaking memory in case libtorrunner's child() function fails.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Tue, 13 Nov 2018 13:27:17 +0000 (08:27 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge branch 'bug28413_029' into maint-0.2.9
Nick Mathewson [Tue, 13 Nov 2018 13:26:51 +0000 (08:26 -0500)] 
Merge branch 'bug28413_029' into maint-0.2.9

6 years agoFix a compiler warning in aes.c.
Nick Mathewson [Mon, 12 Nov 2018 20:39:28 +0000 (15:39 -0500)] 
Fix a compiler warning in aes.c.

Apparently some freebsd compilers can't tell that 'c' will never
be used uninitialized.

Fixes bug 28413; bugfix on 0.2.9.3-alpha when we added support for
longer AES keys to this function.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Sun, 11 Nov 2018 23:05:45 +0000 (18:05 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoFix a bug in usage of SSL_set1_groups_list()
Nick Mathewson [Sun, 11 Nov 2018 23:03:50 +0000 (18:03 -0500)] 
Fix a bug in usage of SSL_set1_groups_list()

Apparently, even though the manpage says it returns an int, it
can return a long instead and cause a warning.

Bug not in any released Tor.  Part of #28399

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Sun, 11 Nov 2018 16:57:52 +0000 (11:57 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the November 6 2018 database.
Karsten Loesing [Sun, 11 Nov 2018 10:25:59 +0000 (11:25 +0100)] 
Update geoip and geoip6 to the November 6 2018 database.

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Fri, 9 Nov 2018 15:49:47 +0000 (10:49 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge branch 'bug28245_029' into maint-0.2.9
Nick Mathewson [Fri, 9 Nov 2018 15:49:43 +0000 (10:49 -0500)] 
Merge branch 'bug28245_029' into maint-0.2.9

6 years agoAlways declare groups when building with openssl 1.1.1 APIs
Nick Mathewson [Fri, 9 Nov 2018 15:10:25 +0000 (10:10 -0500)] 
Always declare groups when building with openssl 1.1.1 APIs

Failing to do on clients was causing TLS 1.3 negotiation to fail.

Fixes bug 28245; bugfix on 0.2.9.15, when we added TLS 1.3 support.

6 years agoMerge branch 'bug26470_032' into maint-0.3.3
Nick Mathewson [Fri, 2 Nov 2018 13:06:32 +0000 (09:06 -0400)] 
Merge branch 'bug26470_032' into maint-0.3.3

6 years agoMerge remote-tracking branch 'dgoulet/ticket27410_032_01' into maint-0.3.3
Nick Mathewson [Fri, 2 Nov 2018 13:04:20 +0000 (09:04 -0400)] 
Merge remote-tracking branch 'dgoulet/ticket27410_032_01' into maint-0.3.3

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Wed, 31 Oct 2018 15:01:40 +0000 (11:01 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge remote-tracking branch 'tor-github/pr/436' into maint-0.2.9
Nick Mathewson [Wed, 31 Oct 2018 15:01:36 +0000 (11:01 -0400)] 
Merge remote-tracking branch 'tor-github/pr/436' into maint-0.2.9

6 years agoMerge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3
Nick Mathewson [Tue, 30 Oct 2018 13:33:36 +0000 (09:33 -0400)] 
Merge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3

6 years agoMerge branch 'bug28202_029' into bug28202_033
Nick Mathewson [Thu, 25 Oct 2018 13:14:06 +0000 (09:14 -0400)] 
Merge branch 'bug28202_029' into bug28202_033

6 years agoFix two other cases of (buf + N > end) pattern
Nick Mathewson [Thu, 25 Oct 2018 13:08:02 +0000 (09:08 -0400)] 
Fix two other cases of (buf + N > end) pattern

Related to fix for 28202.

6 years agoFix possible UB in an end-of-string check in get_next_token().
Nick Mathewson [Thu, 25 Oct 2018 13:06:13 +0000 (09:06 -0400)] 
Fix possible UB in an end-of-string check in get_next_token().

Remember, you can't check to see if there are N bytes left in a
buffer by doing (buf + N < end), since the buf + N computation might
take you off the end of the buffer and result in undefined behavior.

Fixes 28202; bugfix on 0.2.0.3-alpha.

6 years agoRemove a now-unused rust "use".
Nick Mathewson [Tue, 23 Oct 2018 23:50:45 +0000 (19:50 -0400)] 
Remove a now-unused rust "use".

6 years agoMerge remote-tracking branch 'onionk/rust-allsupportednull1' into maint-0.3.3
Nick Mathewson [Tue, 23 Oct 2018 23:17:48 +0000 (19:17 -0400)] 
Merge remote-tracking branch 'onionk/rust-allsupportednull1' into maint-0.3.3

6 years agoTreat backtrace test failures as expected on most BSD-derived systems
teor [Tue, 23 Oct 2018 01:21:10 +0000 (11:21 +1000)] 
Treat backtrace test failures as expected on most BSD-derived systems

Treat backtrace test failures as expected on NetBSD, OpenBSD, and
macOS/Darwin, until we solve bug 17808.

(FreeBSD failures have been treated as expected since 18204 in 0.2.8.)

Fixes bug 27948; bugfix on 0.2.5.2-alpha.

6 years agoLog more info for duplicate ed25519 IDs
Taylor Yu [Wed, 17 Oct 2018 20:39:55 +0000 (15:39 -0500)] 
Log more info for duplicate ed25519 IDs

Occasionally, key pinning doesn't catch a relay that shares an ed25519
ID with another relay.  Log the identity fingerprints and the shared
ed25519 ID when this happens, instead of making a BUG() warning.

Fixes bug 27800; bugfix on 0.3.2.1-alpha.

6 years agoFix another tor_assert(0) case
Nick Mathewson [Mon, 15 Oct 2018 16:52:48 +0000 (12:52 -0400)] 
Fix another tor_assert(0) case

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Mon, 15 Oct 2018 16:47:46 +0000 (12:47 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoFix make check-spaces.
Nick Mathewson [Mon, 15 Oct 2018 16:47:19 +0000 (12:47 -0400)] 
Fix make check-spaces.

6 years agoAdjust tor_assert_unreached()
Nick Mathewson [Mon, 15 Oct 2018 14:46:24 +0000 (10:46 -0400)] 
Adjust tor_assert_unreached()

This version of the macro makes it obvious to the compiler that
"tor_assert_unreached()" will always abort().

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Mon, 15 Oct 2018 14:37:49 +0000 (10:37 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge branch 'bug27709_029' into maint-0.2.9
Nick Mathewson [Mon, 15 Oct 2018 14:34:39 +0000 (10:34 -0400)] 
Merge branch 'bug27709_029' into maint-0.2.9

6 years agoExplain a bit more about branch prediction in the unit-test case
Nick Mathewson [Mon, 15 Oct 2018 14:16:34 +0000 (10:16 -0400)] 
Explain a bit more about branch prediction in the unit-test case

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Wed, 10 Oct 2018 21:12:34 +0000 (17:12 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoMerge remote-tracking branch 'tor-github/pr/392' into maint-0.2.9
Nick Mathewson [Wed, 10 Oct 2018 21:12:11 +0000 (17:12 -0400)] 
Merge remote-tracking branch 'tor-github/pr/392' into maint-0.2.9

6 years agoMerge remote-tracking branch 'teor/bug27738-032' into bug27738-033
Taylor Yu [Wed, 10 Oct 2018 20:01:59 +0000 (15:01 -0500)] 
Merge remote-tracking branch 'teor/bug27738-032' into bug27738-033

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.3
Nick Mathewson [Wed, 10 Oct 2018 15:34:48 +0000 (11:34 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.3

6 years agoUpdate geoip and geoip6 to the October 9 2018 database.
Karsten Loesing [Wed, 10 Oct 2018 15:26:41 +0000 (17:26 +0200)] 
Update geoip and geoip6 to the October 9 2018 database.

6 years agohs-v3: Silence some logging for client authorization
David Goulet [Mon, 10 Sep 2018 19:04:22 +0000 (15:04 -0400)] 
hs-v3: Silence some logging for client authorization

If a tor client gets a descriptor that it can't decrypt, chances are that the
onion requires client authorization.

If a tor client is configured with client authorization for an onion but
decryption fails, it means that the configured keys aren't working anymore.

In both cases, we'll log notice the former and log warn the latter and the
rest of the decryption errors are now at info level.

Two logs statement have been removed because it was redundant and printing the
fetched descriptor in the logs when 80% of it is encrypted wat not helping.

Fixes #27550

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoMerge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3
David Goulet [Mon, 24 Sep 2018 16:44:59 +0000 (12:44 -0400)] 
Merge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3

6 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Fri, 21 Sep 2018 13:35:51 +0000 (09:35 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.2 maint-0.3.2
Nick Mathewson [Fri, 21 Sep 2018 13:35:23 +0000 (09:35 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

6 years agorust/protover: return C-allocated string in protover_all_supported()
cypherpunks [Fri, 21 Sep 2018 05:16:22 +0000 (05:16 +0000)] 
rust/protover: return C-allocated string in protover_all_supported()

The result of CString::into_raw() is not safe to free
with free() except under finicky and fragile circumstances
that we definitely don't meet right now.

This was missed in be583a34a3815c2c10e86094ab0610e4b7f9c869.

6 years agorust/protover: fix null deref in protover_all_supported()
cypherpunks [Fri, 21 Sep 2018 04:57:26 +0000 (04:57 +0000)] 
rust/protover: fix null deref in protover_all_supported()

Fortunately with the current callers it couldn't happen in practice.

Fix on d1820c1516a31a149fc51a9e5126bf899e4c4e08.

6 years agoMerge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3
David Goulet [Thu, 20 Sep 2018 20:31:18 +0000 (16:31 -0400)] 
Merge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3

6 years agohs-v3: Close all SOCKS request on descriptor failure
David Goulet [Wed, 19 Sep 2018 14:56:15 +0000 (10:56 -0400)] 
hs-v3: Close all SOCKS request on descriptor failure

Client side, when a descriptor is finally fetched and stored in the cache, we
then go over all pending SOCKS request for that descriptor. If it turns out
that the intro points are unusable, we close the first SOCKS request but not
the others for the same .onion.

This commit makes it that we'll close all SOCKS requests so we don't let
hanging the other ones.

It also fixes another bug which is having a SOCKS connection in RENDDESC_WAIT
state but with a descriptor in the cache. At some point, tor will expire the
intro failure cache which will make that descriptor usable again. When
retrying all SOCKS connection (retry_all_socks_conn_waiting_for_desc()), we
won't end up in the code path where we have already the descriptor for a
pending request causing a BUG().

Bottom line is that we should never have pending requests (waiting for a
descriptor) with that descriptor in the cache (even if unusable).

Fixees #27410.

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoMerge branch 'maint-0.3.2' of https://git.torproject.org/tor into maint-0.3.2
David Goulet [Thu, 20 Sep 2018 14:59:23 +0000 (10:59 -0400)] 
Merge branch 'maint-0.3.2' of https://git.torproject.org/tor into maint-0.3.2

6 years agoMerge remote-tracking branch 'onionk/rust-allsupported1' into maint-0.3.3
Nick Mathewson [Tue, 18 Sep 2018 12:31:08 +0000 (08:31 -0400)] 
Merge remote-tracking branch 'onionk/rust-allsupported1' into maint-0.3.3

6 years agoTravis: use the Homebrew addon for xz and zstd
teor [Tue, 18 Sep 2018 09:36:28 +0000 (19:36 +1000)] 
Travis: use the Homebrew addon for xz and zstd

xz and zstd were added as optional dependencies in 0.3.1.1-alpha.

Implements ticket 27738.

6 years agoMerge branch 'bug27738-029' into bug27738-032
teor [Tue, 18 Sep 2018 09:34:53 +0000 (19:34 +1000)] 
Merge branch 'bug27738-029' into bug27738-032

Resolve conflicts due to modified comments, and deleted lines.

6 years agoTravis: use the Homebrew addon
teor [Tue, 18 Sep 2018 09:26:54 +0000 (19:26 +1000)] 
Travis: use the Homebrew addon

Use the Travis Homebrew addon to install packages on macOS. The package
list is the same, but the Homebrew addon does not do a `brew update` by
default.

This makes builds faster, at the cost of using slightly older packages.

Implements ticket 27738.

6 years agoRemove extraneous argument from Rust protover_compute_vote()
Nick Mathewson [Mon, 17 Sep 2018 15:50:46 +0000 (11:50 -0400)] 
Remove extraneous argument from Rust protover_compute_vote()

This argument was added to match an older idea for the C api, but we
decided not to do it that way in C.

Fixes bug 27741; bugfix on 0.3.3.6 / TROVE-2018-005 fix.

6 years agoMake CacheDirectoryGroupReadable an autobool.
Nick Mathewson [Mon, 17 Sep 2018 15:36:59 +0000 (11:36 -0400)] 
Make CacheDirectoryGroupReadable an autobool.

Since the default cache directory is the same as the default data
directory, we don't want the default CacheDirectoryGroupReadable
value (0) to override an explicitly set "DataDirectoryGroupReadable
1".

To fix this, I'm making CacheDirectoryGroupReadable into an
autobool, and having the default (auto) value mean "Use the value of
DataDirectoryGroupReadable if the directories are the same, and 0
otherwise."

Fixes bug 26913; bugfix on 0.3.3.1-alpha when the CacheDirectory
option was introduced.

6 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Fri, 14 Sep 2018 16:56:30 +0000 (12:56 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

6 years agohs-v3: Don't BUG() on directory permission check failure
David Goulet [Fri, 14 Sep 2018 14:56:34 +0000 (10:56 -0400)] 
hs-v3: Don't BUG() on directory permission check failure

In hs_config.c, we do validate the permission of the hidden service directory
but we do not try to create it. So, in the event that the directory doesn't
exists, we end up in the loading key code path which checks for the
permission and possibly creates the directory. On failure, don't BUG() since
there is a perfectly valid use case for that function to fail.

Fixes #27335

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoRevise our assertion and bug macros to work with -Wparentheses
Nick Mathewson [Fri, 14 Sep 2018 15:39:37 +0000 (11:39 -0400)] 
Revise our assertion and bug macros to work with -Wparentheses

On GCC and Clang, there's a feature to warn you about bad
conditionals like "if (a = b)", which should be "if (a == b)".
However, they don't warn you if there are extra parentheses around
"a = b".

Unfortunately, the tor_assert() macro and all of its kin have been
passing their inputs through stuff like PREDICT_UNLIKELY(expr) or
PREDICT_UNLIKELY(!(expr)), both of which expand to stuff with more
parentheses around "expr", thus suppressing these warnings.

To fix this, this patch introduces new macros that do not wrap
expr.  They're only used when GCC or Clang is enabled (both define
__GNUC__), since they require GCC's "({statement expression})"
syntax extension.  They're only used when we're building the
unit-test variant of the object files, since they suppress the
branch-prediction hints.

I've confirmed that tor_assert(), tor_assert_nonfatal(),
tor_assert_nonfatal_once(), BUG(), and IF_BUG_ONCE() all now give
compiler warnings when their argument is an assignment expression.

Fixes bug 27709.

Bugfix on 0.0.6, where we first introduced the "tor_assert()" macro.