Commit Graph

8649 Commits

Author SHA1 Message Date
Nick Mathewson fbd2fef220 Merge branch 'maint-0.4.2' of git-rw.torproject.org:/tor into maint-0.4.2 2019-10-18 12:25:55 -04:00
teor f73c8bd786 Merge remote-tracking branch 'tor-github/pr/1407' into maint-0.4.2 2019-10-18 12:05:07 +10:00
teor 92c4dc9b14 Merge remote-tracking branch 'tor-github/pr/1373' into maint-0.4.2 2019-10-17 14:51:30 +10:00
David Goulet 09e6c0f7c7 hs-v3: Fix possible memory leak in error code path
Found by coverity CID 1454769.

There were a second possible leak that is also fixed in this commit.

Fixes #32063

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-15 08:54:11 -04:00
Nick Mathewson eebd2d44a1 Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2 2019-10-14 15:55:13 -04:00
Nick Mathewson 2e5724d153 Merge branch 'ticket31682_042_01_squashed' 2019-10-11 10:21:58 -04:00
David Goulet b356b3907a hs-v3: Fix implicit ssize_t to size_t conversion
Found by Coverity.

Fixes #31682

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-11 10:20:36 -04:00
Nick Mathewson 0d82a8be77 Merge remote-tracking branch 'tor-github/pr/1394' 2019-10-09 16:44:12 -04:00
Nick Mathewson ab064cf762 Merge remote-tracking branch 'tor-github/pr/1399' 2019-10-09 16:37:47 -04:00
Nick Mathewson 755f001600 Merge remote-tracking branch 'tor-github/pr/1401' 2019-10-09 16:29:46 -04:00
Nick Mathewson 99809834a7 Merge branch 'bug30344_squashed_035' 2019-10-09 16:26:31 -04:00
George Kadianakis 841cff6e4f Stop libevent from reading data from closed connections.
Code adapted from Rob's proposed patch in #30344.

Also add a comment in connection_mark_for_close_internal_() on why we should
not be adding extra code there without a very good reason.
2019-10-09 16:24:49 -04:00
David Goulet f50de3a918 hs-v3: Do not remove intro point if circuit exists
When considering introduction point of a service's descriptor, do not remove
an intro point that has an established or pending circuit.

Fixes #31652

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-08 17:02:47 -04:00
David Goulet 1f60337da4 Merge branch 'tor-github/pr/1381' 2019-10-08 14:49:39 -04:00
George Kadianakis 081bd37315 Fix flapping of test_service_intro_point() unittest. 2019-10-08 19:00:43 +03:00
Nick Mathewson 7a26f14a37 Merge remote-tracking branch 'tor-github/pr/1317' 2019-10-07 10:23:44 -04:00
Nick Mathewson 56e8d84ea3 Merge branch 'ticket31548_035_01_squashed' 2019-10-07 10:21:40 -04:00
David Goulet 984a28f3e5 hs-v3: Make service pick the exact amount of intro points
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-10-07 10:20:09 -04:00
Nick Mathewson 58b87a2c59 Merge remote-tracking branch 'tor-github/pr/1379' 2019-10-07 10:15:46 -04:00
Nick Mathewson 52194c8681 Merge remote-tracking branch 'tor-github/pr/1390' 2019-10-07 10:13:32 -04:00
Nick Mathewson fdfb4b196b Use {mock,unmock}_hostname_resolver() in relevant tests
These tests all invoke the hostname resolver in one way or another,
and therefore potentially block if our DNS server is missing,
absent, or extremely slow.  Closes ticket 31841.
2019-10-04 08:03:19 -04:00
teor ff304f3be7 tls: Log TLS read buffer length bugs once
Rather than filling the logs with similar warnings.

Fixes bug 31939; bugfix on 0.3.0.4-rc.
2019-10-04 12:33:34 +10:00
David Goulet 52b7ae71b3 hs: ADD_ONION NEW:BEST now defaults to ED25519-V3
From RSA1024 (v2) to v3 now.

Closes #29669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-03 15:43:03 -04:00
Nick Mathewson 519afb0ece Sort changes entries into a changelog for 0.4.2.2-alpha 2019-10-03 12:22:46 -04:00
George Kadianakis 9309eaf8ea Merge branch 'tor-github/pr/1377' 2019-10-03 19:13:57 +03:00
George Kadianakis 3778b97cab Merge branch 'tor-github/pr/1276' 2019-10-03 19:13:02 +03:00
Nick Mathewson 4d4e2abd2f Authorities reject relays running unsupported Tor release series.
Our minimum version is now 0.2.9.5-alpha.  Series 0.3.0, 0.3.1,
0.3.2, 0.3.3, and 0.3.4 are now rejected.

Also, extract this version-checking code into a new function, so we
can test it.

Closes ticket 31549.

Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.
2019-10-03 19:12:46 +03:00
Nick Mathewson 05a324b564 Merge remote-tracking branch 'tor-github/pr/1376' 2019-10-03 09:19:37 -04:00
Nick Mathewson 5fd137c482 Merge remote-tracking branch 'tor-github/pr/1358' 2019-10-03 09:11:49 -04:00
Nick Mathewson de7fcae72a Merge remote-tracking branch 'tor-github/pr/1382' 2019-10-03 09:08:23 -04:00
teor f0993d3831 configure: Give a more useful message when pkg-config fails
When pkg-config is not installed, or a library that depends on
pkg-config is not found, tell the user what to do to fix the
problem.

Fixes bug 31922; bugfix on 0.3.1.1-alpha.
2019-10-03 16:31:20 +10:00
teor 3d17fafa04 control/control: Refactor some error handling code
Split some protocol error handling out of
connection_control_process_inbuf().

This refactor reduces the size of a practracker exception.

Closes 31840.
2019-10-03 11:35:42 +10:00
Nick Mathewson bca30bcb90 Merge remote-tracking branch 'tor-github/pr/1374' 2019-10-02 19:19:11 -04:00
David Goulet ca1f18c159 Merge branch 'tor-github/pr/1385' 2019-10-02 14:15:31 -04:00
David Goulet 014abf86e5 Merge branch 'tor-github/pr/1344' 2019-10-02 10:37:49 -04:00
David Goulet 40be20d542 Merge branch 'tor-github/pr/1363' 2019-10-02 10:34:46 -04:00
Nick Mathewson c81e1e4542 Merge branch 'maint-0.4.1' 2019-10-02 08:01:34 -04:00
Nick Mathewson 4dcbbe4166 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-02 08:01:34 -04:00
Nick Mathewson a74c180691 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-02 08:01:34 -04:00
Nick Mathewson 7b9cb4c47b Merge branch 'maint-0.2.9' into maint-0.3.5 2019-10-02 08:01:33 -04:00
Karsten Loesing 90de776ea9 Update geoip and geoip6 to the October 1 2019 database. 2019-10-02 11:11:27 +02:00
Nick Mathewson 2b825a1a2e Fix a crash bug in max_u16_in_sl()
The documentation for this function says that the smartlist can
contain NULLs, but the code only handled NULLs if they were at the
start of the list.

We didn't notice this for a long time, because when Tor is run
normally, the sequence of msg_id_t is densely packed, and so this
list (mapping msg_id_t to channel_id_t) contains no NULL elements.
We could only run into this bug:
  * when Tor was running in embedded mode, and starting more than once.
  * when Tor ran first with more pubsub messages enabled, and then
    later with fewer.
  * When the second run (the one with fewer enabled pubsub messages)
    had at least some messages enabled, and those messages were not
    the ones with numerically highest msg_id_t values.

Fixes bug 31898; bugfix on 47de9c7b0a
in 0.4.1.1-alpha.
2019-10-01 13:01:20 -04:00
teor 58746ad9ca Merge branch 'bug31859_041' into bug31859_master
Merge master's RUST_VERSION="nightly" into the macOS Rust job
from bug31859_041.

Drop master's RUST_VERSION="beta", because we only have two
Rust jobs now.
2019-10-02 00:20:38 +10:00
teor e5dda7f664 Merge branch 'bug31859_040' into bug31859_041
Merge TOR_TEST_RNG_SEED in maint-0.4.1 into the coverage line
from bug31859_040.
2019-10-01 23:50:24 +10:00
teor 07db4141ab Merge branch 'bug31859_035' into bug31859_040 2019-10-01 23:46:28 +10:00
George Kadianakis e8e42f4af9 Help users who try to use v2 client auth in v3 onions. 2019-10-01 13:41:21 +03:00
teor f368f5bc37 Merge branch 'bug31859_029' into bug31859_035
While merging:
* leave out some redundant jobs and build matrix entries
2019-10-01 17:31:55 +10:00
Nick Mathewson 6581f3e2fa Fix the documentation for GuardLifetime. 2019-09-30 14:54:52 -04:00
teor 1e0e23c1e4 Travis: Add a macOS chutney job, but don't wait for it to finish
Since Travis macOS has IPv6 support (and Travis Linux does not), chutney
will now run its IPv6 networks as part of Travis CI.

But since chutney is slow, don't wait for the macOS chutney to finish.
(Travis have fixed the duplicate notification bug in fast_finish. So we
can use fast_finish and allow_failure to finish early. Unfortunately,
allow_failure also means we ignore failures in macOS chutney.)

Also make sure that we have:
* a compile on each platform, with each compiler,
* a check on each platform, and
* a check on each compiler.

Finally, sort builds: allow fail last, macOS first, slowest first.

Closes ticket 30860.
Closes ticket 31859 for 0.2.9.
2019-09-30 23:58:38 +10:00
teor 4e4297830e Travis: Remove a redundant clang Linux job
Part of 31859.
2019-09-30 23:58:24 +10:00