]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Fri, 9 Nov 2018 15:49:47 +0000 (10:49 -0500)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

7 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

7 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.

7 years agoBump to 0.3.4.9-dev
Nick Mathewson [Fri, 2 Nov 2018 17:01:32 +0000 (13:01 -0400)] 
Bump to 0.3.4.9-dev

7 years agoBump to 0.3.4.9
Nick Mathewson [Fri, 2 Nov 2018 13:08:45 +0000 (09:08 -0400)] 
Bump to 0.3.4.9

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

7 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

7 years agoMerge branch 'bug26896_034' into maint-0.3.4
Nick Mathewson [Fri, 2 Nov 2018 13:05:14 +0000 (09:05 -0400)] 
Merge branch 'bug26896_034' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Fri, 2 Nov 2018 13:04:25 +0000 (09:04 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

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

7 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

7 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

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 30 Oct 2018 13:34:04 +0000 (09:34 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Mon, 29 Oct 2018 19:57:31 +0000 (15:57 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

7 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.

7 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.

7 years agonode: Make node_supports_v3_rendezvous_point() also check for the key
David Goulet [Thu, 20 Sep 2018 12:50:27 +0000 (08:50 -0400)] 
node: Make node_supports_v3_rendezvous_point() also check for the key

It is not enough to look at protover for v3 rendezvous support but also we
need to make sure that the curve25519 onion key is present or in other words
that the descriptor has been fetched and does contain it.

Fixes #27797.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 23 Oct 2018 23:50:53 +0000 (19:50 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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".

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 23 Oct 2018 23:18:23 +0000 (19:18 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

7 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.

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Thu, 18 Oct 2018 13:12:58 +0000 (09:12 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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.

7 years agoconn: Stop writing when our write bandwidth limist is exhausted
David Goulet [Wed, 17 Oct 2018 16:25:12 +0000 (12:25 -0400)] 
conn: Stop writing when our write bandwidth limist is exhausted

Commit 488e2b00bf881b97bcc8e4bbe304845ff1d79a03 introduced an issue, most
likely introduced by a bad copy paste, that made us stop reading on the
connection if our write bandwidth limit was reached.

The problem is that because "read_blocked_on_bw" was never set, the connection
was never reenabled for reading.

This is most likely the cause of #27813 where bytes were accumulating in the
kernel TCP bufers because tor was not doing reads. Only relays with
RelayBandwidthRate would suffer from this but affecting all relays connecting
to them. And using that tor option is recommended and best practice so many
many relays have it enabled.

Fixes #28089.

7 years agomainloop: Set client role if ControlPort is set
David Goulet [Wed, 26 Sep 2018 12:36:08 +0000 (08:36 -0400)] 
mainloop: Set client role if ControlPort is set

It turns out that if _only_ the ControlPort is set and nothing else, tor would
simply not bootstrap and thus not start properly. Commit 67a41b63063370c2
removed that requirement for tor to be considered a "client".

Unfortunately, this made the mainloop enable basically nothing if only the
ControlPort is set in the torrc.

This commit now makes it that we also consider the ControlPort when deciding
if we are a Client or not. It does not revert 67a41b63063370c2 meaning
options_any_client_port_set() stays the same, not looking at the control port.

Fixes #27849.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agotest: Update approx_time before the test starts
David Goulet [Mon, 24 Sep 2018 13:48:28 +0000 (09:48 -0400)] 
test: Update approx_time before the test starts

This way we have the same time source when the IP is created and tested later.

Fixes #27810

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Mon, 15 Oct 2018 16:52:54 +0000 (12:52 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

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

7 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

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

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Mon, 15 Oct 2018 14:48:35 +0000 (10:48 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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().

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

7 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

7 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

7 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

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

7 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

7 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

7 years agoMerge branch 'bug27738-033' into bug27738-034
Taylor Yu [Wed, 10 Oct 2018 20:13:02 +0000 (15:13 -0500)] 
Merge branch 'bug27738-033' into bug27738-034

7 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

7 years agoMerge branch 'appveyor_pacman_fixes_034' into maint-0.3.4
Nick Mathewson [Wed, 10 Oct 2018 18:27:24 +0000 (14:27 -0400)] 
Merge branch 'appveyor_pacman_fixes_034' into maint-0.3.4

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

7 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

7 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.

7 years agofixup! Changes file for apveyor changes
Nick Mathewson [Wed, 10 Oct 2018 15:10:29 +0000 (11:10 -0400)] 
fixup! Changes file for apveyor changes

7 years agoChanges file for apveyor changes
Nick Mathewson [Wed, 10 Oct 2018 14:20:01 +0000 (10:20 -0400)] 
Changes file for apveyor changes

7 years agoAppveyor: Don't try to install the mingw openssl package
Nick Mathewson [Wed, 10 Oct 2018 13:49:02 +0000 (09:49 -0400)] 
Appveyor: Don't try to install the mingw openssl package

This package conflicts with a preinstalled mingw openssl.

Fixes bug 27943. I think this was an appveyor change, not a Tor bug.

7 years agoInstall only one of the two mingw architectures in appveyor
Nick Mathewson [Wed, 10 Oct 2018 13:44:36 +0000 (09:44 -0400)] 
Install only one of the two mingw architectures in appveyor

Closes ticket 27765

This commit also changes the appveyor file to a unified line ending
style, since the old one was pretty confused.  Use "-b" to see the
real differences.

7 years agoFix the 0.3.4 part of bug 27781 (arm compilation)
Nick Mathewson [Mon, 24 Sep 2018 15:08:27 +0000 (11:08 -0400)] 
Fix the 0.3.4 part of bug 27781 (arm compilation)

Because with arm on OpenSSL <1.1 we don't define USE_EVP_AES_CTR, we
need to include crypto_util.h here.

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

7 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

7 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

7 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.

7 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.

7 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>
7 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

7 years agoMerge remote-tracking branch 'github/bug27139_034' into maint-0.3.4
Nick Mathewson [Thu, 20 Sep 2018 14:43:05 +0000 (10:43 -0400)] 
Merge remote-tracking branch 'github/bug27139_034' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 18 Sep 2018 12:31:14 +0000 (08:31 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 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

7 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.

7 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.

7 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.

7 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.

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

7 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

7 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>
7 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.

7 years agorust/protover: delete ProtoSet::retain
cypherpunks [Wed, 15 Aug 2018 03:23:08 +0000 (03:23 +0000)] 
rust/protover: delete ProtoSet::retain

As the comment noted, it was horribly inefficient.

7 years agorust/protover: use .and_not_in() instead of .retain() in all_supported()
cypherpunks [Thu, 9 Aug 2018 21:26:10 +0000 (21:26 +0000)] 
rust/protover: use .and_not_in() instead of .retain() in all_supported()

.retain() would allocating a Vec of billions of integers and check them
one at a time to separate the supported versions from the unsupported.
This leads to a memory DoS.

Closes ticket 27206. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.

7 years agorust/protover: add ProtoSet::and_not_in()
cypherpunks [Thu, 9 Aug 2018 21:25:18 +0000 (21:25 +0000)] 
rust/protover: add ProtoSet::and_not_in()

This is a way more efficient version of retain().

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Fri, 14 Sep 2018 14:48:01 +0000 (10:48 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoIf options_act() fails, restore the previous value of global_options
Nick Mathewson [Fri, 14 Sep 2018 14:34:45 +0000 (10:34 -0400)] 
If options_act() fails, restore the previous value of global_options

Before 0.3.3.1-alpha, we would exit() in this case immediately.  But
now that we leave tor_main() more conventionally, we need to make
sure we restore things so as not to cause a double free.

Fixes bug 27708; bugfix on 0.3.3.1-alpha.

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Fri, 14 Sep 2018 13:25:34 +0000 (09:25 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoChanges file for the 32-bit msec conversion fixes of #27139
Nick Mathewson [Fri, 14 Sep 2018 12:49:27 +0000 (08:49 -0400)] 
Changes file for the 32-bit msec conversion fixes of #27139

7 years agoMake circuitmux ewma timing test more tolerant on 32bit osx
Nick Mathewson [Fri, 14 Sep 2018 12:40:10 +0000 (08:40 -0400)] 
Make circuitmux ewma timing test more tolerant on 32bit osx

Since we use a 32-bit approximation for millisecond conversion here,
we can't expect so much precision.

Fixes part of bug 27139; bugfix on 0.3.4.1-alpha.

7 years agoAvoid integer overflow on fast 32-bit millisecond conversion.
Nick Mathewson [Fri, 14 Sep 2018 12:36:33 +0000 (08:36 -0400)] 
Avoid integer overflow on fast 32-bit millisecond conversion.

Multiply-then-divide is more accurate, but it runs into trouble when
our input is above INT32_MAX/numerator.  So when our value is too
large, do divide-then-multiply instead.

Fixes part of bug 27139; bugfix on 0.3.4.1-alpha.

7 years agoUse a slightly more accurate formula for OSX 32-bit msec conversion
Nick Mathewson [Fri, 14 Sep 2018 12:30:24 +0000 (08:30 -0400)] 
Use a slightly more accurate formula for OSX 32-bit msec conversion

We use an optimized but less accurate formula for converting coarse
time differences to milliseconds on 32-bit OSX platforms, so that we
can avoid 64-bit division.

The old numbers were off by 0.4%.  The new numbers are off by .006%.

This should make the unit tests a bit cleaner, and our tolerances a
bit closer.

7 years agoprotover: reject invalid protocol names
cypherpunks [Sun, 26 Aug 2018 01:20:44 +0000 (01:20 +0000)] 
protover: reject invalid protocol names

The spec only allows the characters [A-Za-z0-9-].

Fix on b2b2e1c7f24d9b65059e3d089768d6c49ba4f58f.
Fixes #27316; bugfix on 0.2.9.4-alpha.

7 years agorust/protover: validate unknown protocol names use only allowed characters
cypherpunks [Thu, 13 Sep 2018 16:33:58 +0000 (16:33 +0000)] 
rust/protover: validate unknown protocol names use only allowed characters

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.2
Nick Mathewson [Thu, 13 Sep 2018 15:46:04 +0000 (11:46 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Thu, 13 Sep 2018 15:46:04 +0000 (11:46 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 13 Sep 2018 15:46:04 +0000 (11:46 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'bug27658_029' into maint-0.2.9
Nick Mathewson [Thu, 13 Sep 2018 15:45:58 +0000 (11:45 -0400)] 
Merge branch 'bug27658_029' into maint-0.2.9

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Wed, 12 Sep 2018 21:24:41 +0000 (17:24 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agofixup! changes file
cypherpunks [Wed, 12 Sep 2018 14:22:31 +0000 (14:22 +0000)] 
fixup! changes file

7 years agoCheck waitpid return value and exit status in tinytest.c
Nick Mathewson [Wed, 12 Sep 2018 12:57:18 +0000 (08:57 -0400)] 
Check waitpid return value and exit status in tinytest.c

It's possible for a unit test to report success via its pipe, but to
fail as it tries to clean up and exit.  Notably, this happens on a
leak sanitizer failure.

Fixes bug 27658; bugfix on 0.2.2.4-alpha when tinytest was
introduced.

7 years agoMerge remote-tracking branch 'teor/bug27464-034' into maint-0.3.4
Nick Mathewson [Wed, 12 Sep 2018 12:17:42 +0000 (08:17 -0400)] 
Merge remote-tracking branch 'teor/bug27464-034' into maint-0.3.4

7 years agorust/protover: fix check for overlapping ranges
cypherpunks [Wed, 12 Sep 2018 02:14:29 +0000 (02:14 +0000)] 
rust/protover: fix check for overlapping ranges

Closes ticket 27649. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.

7 years agorust/protover: remove version zero from tests
cypherpunks [Sat, 18 Aug 2018 20:05:19 +0000 (20:05 +0000)] 
rust/protover: remove version zero from tests

This isn't legal according to dir-spec.txt.

We can write separate tests for it if the spec
is changed to make it legal.

7 years agotest/protover: remove version zero from tests
cypherpunks [Sat, 18 Aug 2018 16:54:09 +0000 (16:54 +0000)] 
test/protover: remove version zero from tests

This isn't legal according to dir-spec.txt.

We can write separate tests for it if the spec
is changed to make it legal.

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 11 Sep 2018 19:53:06 +0000 (15:53 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoBug 25505: Check circuitmux queues before padding.
Mike Perry [Tue, 13 Mar 2018 13:50:35 +0000 (13:50 +0000)] 
Bug 25505: Check circuitmux queues before padding.

7 years agoMerge branch 'maint-0.3.2' of https://git.torproject.org/tor into maint-0.3.2
David Goulet [Tue, 11 Sep 2018 19:36:48 +0000 (15:36 -0400)] 
Merge branch 'maint-0.3.2' of https://git.torproject.org/tor into maint-0.3.2