Commit Graph

7642 Commits

Author SHA1 Message Date
Neel Chauhan
d18a167ff3 sr: Switch from tor_assert() to BUG()
Closes #19566

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-11-30 12:16:18 -05:00
teor
7a45bc74a4 Dir: when Tor's clock is behind, use a future consensus to bootstrap
When Tor's clock is behind the clocks on the authorities, allow Tor to
bootstrap successfully.

Fixes bug 28591; bugfix on 0.2.0.9-alpha.
2018-11-29 00:50:24 +10:00
Nick Mathewson
9c2b114b2e Merge branch 'maint-0.3.5' 2018-11-27 12:03:50 -05:00
Nick Mathewson
72c1303cef Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-27 12:03:50 -05:00
Alexander Færøy
36c3235534 Explicitly specify path to OpenSSL for Appveyor.
This patch explicitly specifies the path to our OpenSSL dependency and
disables the installation of an external OpenSSL version and instead
uses the OpenSSL version available from the MinGW environments.

See: https://bugs.torproject.org/28574
2018-11-27 14:53:50 +01:00
Nick Mathewson
8a15d0f69b Merge branch 'maint-0.3.5' 2018-11-26 17:25:28 -05:00
Nick Mathewson
feb41b7c30 Merge remote-tracking branch 'teor/bug28096-035-squashed' into maint-0.3.5 2018-11-26 17:24:41 -05:00
Nick Mathewson
fc1ad9ab65 Merge remote-tracking branch 'tor-github/pr/495' 2018-11-26 17:17:40 -05:00
Nick Mathewson
e12fdeb181 Changes file for "Dormant Mode" (28335, 2149). 2018-11-26 16:39:44 -05:00
David Goulet
2b9a907bdc Merge branch 'maint-0.3.5' 2018-11-26 14:59:24 -05:00
David Goulet
056ffdec4c Merge remote-tracking branch 'dgoulet/ticket28128_035_01' into maint-0.3.5 2018-11-26 14:59:10 -05:00
David Goulet
d37dbb09c2 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>
2018-11-26 14:45:53 -05:00
rl1987
d6eafd06a9 Add changes file 2018-11-26 17:46:27 +02:00
Nick Mathewson
439ffcefd5 changes file for prop293 / ticket 26770 2018-11-25 10:19:08 -05:00
Nick Mathewson
7da06e43da No longer exit for missing required protocolversions on an old consensus
Specifically, if the consensus is older than the (estimted or
measured) release date for this version of tor, we assume that the
required versions may have changed in between that consensus and
this release.

Implements ticket 27735 and proposal 297.
2018-11-24 20:44:37 -05:00
Nick Mathewson
05dee063c8 Emit router families in canonical form
This patch has routers use the same canonicalization logic as
authorities when encoding their family lists.  Additionally, they
now warn if any router in their list is given by nickname, since
that's error-prone.

This patch also adds some long-overdue tests for family formatting.
2018-11-24 16:35:58 -05:00
Nick Mathewson
0a0c612b79 Add a consensus method in which md families get canonicalized.
Implements prop298. Closes ticket 28266.
2018-11-24 12:01:09 -05:00
teor
657618ba9b
Entry Nodes: Mark outdated dirservers in reasonably live consensuses
Fixes bug 28569; bugfix on Tor 0.3.2.5-alpha.
2018-11-22 16:54:34 +10:00
teor
d1ac5613fc
Entry Nodes: Use a reasonably live consensus to select guards
Fixes bug 24661; bugfix on 0.3.0.1-alpha.
2018-11-22 16:54:22 +10:00
teor
ffc7b81b5d
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.
2018-11-22 16:42:32 +10:00
Nick Mathewson
a9820f072b Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-20 13:10:38 -05:00
Nick Mathewson
56f24889a2 Merge branch 'maint-0.3.5' 2018-11-20 13:10:38 -05:00
Nick Mathewson
9da8cd0bc3 Merge remote-tracking branch 'teor/ticket28459-034' into maint-0.3.4 2018-11-20 13:10:18 -05:00
rl1987
befcd6ab7f Add changes file for #28012 2018-11-20 17:00:32 +02:00
Nick Mathewson
34cadefe34 Merge branch 'maint-0.3.5' 2018-11-20 09:04:35 -05:00
rl1987
ffee0a6384 Add pre-push git hook to prevent fixup and squash commits from ending up in master 2018-11-20 15:40:52 +02:00
Taylor Yu
0489288aa2 Update control_free_all() for #27169
Reset the added bootstrap tracking state introduced by ticket 27169.
Fixes bug 28524; bugfix on 0.3.5.1-alpha.
2018-11-19 15:48:08 -06:00
Alexander Færøy
d020124138 Add changes file for #28518.
See: https://bugs.torproject.org/28518
2018-11-19 16:33:06 +01:00
Nick Mathewson
8183640ada Merge branch 'maint-0.3.5' 2018-11-19 10:18:57 -05:00
Alexander Færøy
3260914db0 Add missing library to build tor-print-ed-signing-cert.
To succesful compile tor-print-ed-signing-cert.exe on Windows we
sometimes need to include the @TOR_LIB_GDI@ library.

See: https://bugs.torproject.org/28485
2018-11-19 10:18:44 -05:00
Nick Mathewson
a8df39e955 Merge remote-tracking branch 'tor-github/pr/519' 2018-11-19 08:47:03 -05:00
Nick Mathewson
26539ec3ae Merge remote-tracking branch 'tor-github/pr/518' 2018-11-19 08:45:41 -05:00
Nick Mathewson
48b08f0592 Merge branch 'ticket27359_v2_squashed' 2018-11-19 08:26:49 -05:00
Nick Mathewson
426c9561c5 Use nodefamily_t in microdescriptors.
Closes ticket 27359.
2018-11-19 08:26:10 -05:00
rl1987
c8c4c3dffa fixup! Make ROUTERLIST_PRUNING_INTERVAL 1 hr. 2018-11-17 10:27:10 +02:00
Nick Mathewson
35558c39dd Merge remote-tracking branch 'dgoulet/ticket27471_035_02' into maint-0.3.5 2018-11-16 08:57:56 -05:00
Nick Mathewson
80a6228aac Merge branch 'bug25573-034-typefix' into maint-0.3.4 2018-11-15 16:58:16 -05:00
Nick Mathewson
15e752e6b1 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:54:56 -05:00
Nick Mathewson
cbe04d4550 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-15 16:54:16 -05:00
Nick Mathewson
63312e0299 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:47:25 -05:00
Nick Mathewson
aebe8a82c9 Merge branch 'bug26913_033' into maint-0.3.3 2018-11-15 16:47:22 -05:00
Nick Mathewson
8569166c70 Merge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9
Resolved conflicts with the 26269 fix in 015fcd0e11.
2018-11-15 16:43:50 -05:00
Nick Mathewson
1e6ffeaeaa Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:37:41 -05:00
Nick Mathewson
34e4d5a783 Merge remote-tracking branch 'dgoulet/bug27550_033_01' into maint-0.3.3 2018-11-15 16:37:02 -05:00
David Goulet
f41bec1290 man: ClientOnionAuthDir can't be reloaded with Sandbox 1
By adding a file to the ClientOnionAuthDir and sending a HUP signal, tor would
load the new file and use it. However, that doesn't work with the Sandbox
since post initilization, nothing can be changed.

Document in the manpage that limitation within the Sandbox description.

Closes #28128

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-11-15 14:36:39 -05:00
rl1987
d9f7cb3f62 Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086 2018-11-15 19:37:07 +02:00
rl1987
8cb817cc5e Add changes file 2018-11-15 19:35:56 +02:00
Nick Mathewson
92f71b8e88 Merge branch 'maint-0.3.5' 2018-11-15 09:06:18 -05:00
Nick Mathewson
a9db07f325 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-15 09:06:18 -05:00
teor
b8ce1de4bf
Appveyor: always show the logs, and upload them as build artifacts
Always show the configure and test logs, and upload them as build
artifacts, when building for Windows using Appveyor CI.

Implements 28459.
2018-11-15 21:04:17 +10:00
teor
83c1baca16
Appveyor: manually add zstd flags to configure
The mingw zstd from MSYS2 doesn't come with a pkg-config file.

Fixes 28454 on Tor 0.3.4.1-alpha.
2018-11-15 19:23:37 +10:00
teor
540c833f20
Appveyor: remove incorrect OpenSSL path
Fixes 28399 on 0.3.4.1-alpha.
2018-11-15 19:23:33 +10:00
teor
44ced9b750 Merge branch 'bug28096-029-squashed' into bug28096-035-squashed
Move the get_uname() changes from src/common/compat.c to
src/lib/osinfo/uname.c
2018-11-15 12:23:29 +10:00
teor
2fbc58cf07 Windows: fix uname on recent Windows versions
Correctly identify Windows 8.1, Windows 10, and Windows Server 2008
and later from their NT versions.

On recent Windows versions, the GetVersionEx() function may report
an earlier Windows version than the running OS. To avoid user
confusion, add "[or later]" to Tor's version string on affected
versions of Windows.

Remove Windows versions that were never supported by the
GetVersionEx() function.

Stop duplicating the latest Windows version in get_uname().

Fixes bug 28096; bugfix on 0.2.2.34; reported by Keifer Bly.
2018-11-15 12:19:11 +10:00
Nick Mathewson
5090fecaca changes file for no-circular-dependencies stuff (28362) 2018-11-14 16:07:36 -05:00
Nick Mathewson
12175987fc Merge branch 'maint-0.3.5' 2018-11-14 15:43:49 -05:00
Nick Mathewson
d598d834f5 Merge branch 'ticket27750_034_01_squashed' into maint-0.3.5 2018-11-14 15:43:46 -05:00
David Goulet
c99f220f78 conn: Close the read side of a closing connection when write limit is reached
In conn_close_if_marked(), we can decide to keep a connection open that still
has data to flush on the wire if it is being rate limited on the write side.

However, in this process, we were also looking at the read() side which can
still have token in its bucket and thus not stop the reading. This lead to a
BUG() introduced in 0.3.4.1-alpha that was expecting the read side to be
closed due to the rate limit but which only applies on the write side.

This commit removes any bandwidth check on the read side and simply stop the
read side on the connection regardless of the bucket state. If we keep the
connection open to flush it out before close, we should not read anything.

Fixes #27750

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-11-14 15:42:52 -05:00
Nick Mathewson
cec58ae55c Merge branch 'maint-0.3.5' 2018-11-14 07:56:52 -05:00
Nick Mathewson
a58b19465d Merge remote-tracking branch 'teor/bug28441-035' into maint-0.3.5 2018-11-14 07:56:48 -05:00
Nick Mathewson
1043532a51 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-14 07:55:07 -05:00
Nick Mathewson
3deb01e1a4 Merge branch 'maint-0.3.5' 2018-11-14 07:55:07 -05:00
Nick Mathewson
eba989bf0e Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-14 07:55:07 -05:00
Nick Mathewson
26fd7c1d9c Changes file for bug 28419 2018-11-14 07:51:36 -05:00
Nick Mathewson
c7f09554eb Merge branch 'maint-0.3.5' 2018-11-14 07:45:58 -05:00
Taylor Yu
763ccd0928 Fix Doxyfile for 0.3.5 source tree moves
Make Doxygen work again after the 0.3.5 source tree moves.  Fixes bug
28435; bugfix on 0.3.5.1-alpha.
2018-11-14 07:45:55 -05:00
teor
16ca6fdfdb
log: stop talking about the Named flag in log messages
Clients have ignored the Named flag since 0.3.2.

Fixes bug 28441; bugfix on 0.3.2.1-alpha.
2018-11-14 18:16:34 +10:00
Nick Mathewson
a6a7a1f3ed Merge branch 'maint-0.3.5' 2018-11-13 16:48:26 -05:00
Nick Mathewson
021187f915 Merge branch 'bug28183_029' into maint-0.3.5 2018-11-13 16:48:21 -05:00
David Goulet
8fb318860e Merge branch 'maint-0.3.5' 2018-11-13 10:43:03 -05:00
David Goulet
6f2151be9a Merge branch 'tor-github/pr/487' into maint-0.3.5 2018-11-13 10:37:25 -05:00
Nick Mathewson
42be1c668b Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-13 08:27:29 -05:00
Nick Mathewson
d000e798ac Merge branch 'maint-0.3.5' 2018-11-13 08:27:29 -05:00
Nick Mathewson
ae4c94bb64 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-13 08:27:29 -05:00
Nick Mathewson
54d1a2d805 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-13 08:27:17 -05:00
Nick Mathewson
1a11702a9a 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.
2018-11-12 15:39:28 -05:00
Nick Mathewson
0e5378feec seccomp2: Add "shutdown" to the list of permitted system calls.
We don't use this syscall, but openssl apparently does.

(This syscall puts a socket into a half-closed state. Don't worry:
It doesn't shut down the system or anything.)

Fixes bug 28183; bugfix on 0.2.5.1-alpha where the sandbox was
introduced.
2018-11-12 08:23:58 -05:00
rl1987
100136ca86 Create new periodic event for pruning old info about Tor routers 2018-11-11 20:31:24 +02:00
Nick Mathewson
e27dff08a3 Merge branch 'maint-0.3.5' 2018-11-11 11:57:54 -05:00
Nick Mathewson
6b2ff4fff8 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-11 11:57:53 -05:00
Nick Mathewson
76ed869ff9 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-11 11:57:53 -05:00
Nick Mathewson
d0c3723c38 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-11 11:57:52 -05:00
Karsten Loesing
5ba3d09a89 Update geoip and geoip6 to the November 6 2018 database. 2018-11-11 11:25:59 +01:00
Nick Mathewson
bf4f55a13d Merge branch 'subsystems' 2018-11-09 15:01:49 -05:00
Nick Mathewson
5d73f87ced Merge branch 'maint-0.3.5' 2018-11-09 10:49:48 -05:00
Nick Mathewson
591a189fa4 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-09 10:49:47 -05:00
Nick Mathewson
2ac2d0a426 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-09 10:49:47 -05:00
Nick Mathewson
c06b7f090c Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-09 10:49:47 -05:00
Nick Mathewson
1ba1a1ceca 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.
2018-11-09 10:10:25 -05:00
Nick Mathewson
c7b6ed1d80 Merge remote-tracking branch 'tor-github/pr/271' 2018-11-07 11:21:13 -05:00
Nick Mathewson
3eeb7c6e26 Merge branch 'maint-0.3.5' 2018-11-07 11:17:32 -05:00
Nick Mathewson
aea2b04467 Merge remote-tracking branch 'teor/ticket28318-035' into maint-0.3.5 2018-11-07 11:16:52 -05:00
Nick Mathewson
9807da9c20 Merge branch 'ticket27225_squashed' 2018-11-07 10:47:29 -05:00
Nick Mathewson
6d93820499 Memoize summarize_protover_flags()
Our tests showed that this function is responsible for a huge number
of our malloc/free() calls.  It's a prime candidate for being
memoized.

Closes ticket 27225.
2018-11-07 10:47:07 -05:00
Neel Chauhan
f89f14802e At intro points, don't close circuits on NACKs 2018-11-06 17:04:08 -05:00
Nick Mathewson
c8892b53ec Merge remote-tracking branch 'tor-github/pr/466' 2018-11-06 15:35:45 -05:00
Nick Mathewson
8020d6fb05 Merge remote-tracking branch 'tor-github/pr/464' 2018-11-06 15:33:25 -05:00
Nick Mathewson
ba28704b29 Merge branch 'maint-0.3.5' 2018-11-06 15:22:11 -05:00
Nick Mathewson
c60f3ea607 Merge remote-tracking branch 'tor-github/pr/474' into maint-0.3.5 2018-11-06 15:21:45 -05:00
Nick Mathewson
bb9044381e Merge branch 'maint-0.3.5' 2018-11-06 15:20:01 -05:00
Nick Mathewson
8a5590ebac Merge remote-tracking branch 'tor-github/pr/484' into maint-0.3.5 2018-11-06 15:19:04 -05:00
Nick Mathewson
bcba6a4918 Merge branch 'maint-0.3.5' 2018-11-06 15:17:52 -05:00
Nick Mathewson
67abf55d6b Add a changes file for bug 28303 2018-11-06 15:17:19 -05:00
Roger Dingledine
3a2cb83685 refuse to start with relative paths + RunAsDaemon
Resume refusing to start with relative file paths and RunAsDaemon
set (regression from the fix for bug 22731).

Fixes bug 28298; bugfix on 0.3.3.1-alpha.
2018-11-06 15:50:56 +01:00
Nick Mathewson
313b5b956c Merge branch 'maint-0.3.5' 2018-11-06 09:16:25 -05:00
Nick Mathewson
9431d35074 Merge branch 'bug28348_034' into bug28348_035 2018-11-06 07:42:55 -05:00
Nick Mathewson
2aff02eb3d Actually disable NEED_NET periodic events when DisableNetwork is set
Fixes bug 28348; bugfix on 0.3.4.1-alpha
2018-11-06 07:40:02 -05:00
Nick Mathewson
adecda7539 changes file for subsystems api (28330) 2018-11-05 09:42:16 -05:00
Neel Chauhan
45b28167d7 In count_acceptable_nodes(), count direct and indirect nodes with node_has_preferred_descriptor() 2018-11-05 08:26:02 -05:00
teor
368aeaadff
Appveyor: Add Windows Server 2016 to tor's build matrix
Build tor on Windows Server 2012 R2 and Windows Server 2016 using
Appveyor's CI.

Closes ticket 28318.
2018-11-05 16:21:58 +10:00
teor
bd0e38dcfe
systemd: allow tor some time to shut down after ShutdownWaitLength expires
This commit upstreams the Debian package setting of 60 seconds for
TimeoutStopSec, but applies it to startup and shutdown.

Part of 28113.
2018-11-05 11:49:19 +10:00
Alex Xu (Hello71)
0d6d3e1f26
Notify systemd of ShutdownWaitLength 2018-11-05 11:46:28 +10:00
Nick Mathewson
865514e66e Merge branch 'ticket28100_squashed' 2018-11-02 13:19:24 -04:00
Alex Xu (Hello71)
1b75de85b3 Don't overwrite the Content-Type when compressing 2018-11-02 13:19:14 -04:00
Nick Mathewson
f0bd6c2c9d Merge branch 'maint-0.3.5' 2018-11-02 13:14:37 -04:00
Nick Mathewson
996f24fcd3 Merge branch 'bug27968_squashed' into maint-0.3.5 2018-11-02 13:14:32 -04:00
teor
8f43b8fb47 Avoid a race condition in test_rebind.py
If tor terminates due to SIGNAL HALT before test_rebind.py calls
tor_process.terminate(), an OSError 3 (no such process) is thrown.

Fixes part of bug 27968 on 0.3.5.1-alpha.
2018-11-02 13:14:23 -04:00
Nick Mathewson
f27279f857 Merge remote-tracking branch 'tor-github/pr/449' 2018-11-02 13:11:26 -04:00
Nick Mathewson
d671e3f513 Merge remote-tracking branch 'tor-github/pr/448' 2018-11-02 13:09:45 -04:00
Nick Mathewson
f57fd0318a Merge remote-tracking branch 'tor-github/pr/397' 2018-11-02 10:01:26 -04:00
Nick Mathewson
a6c7e01584 Merge branch 'bug27963_wallclock' into maint-0.3.5 2018-11-02 09:39:13 -04:00
Nick Mathewson
084a5a13c7 Merge branch 'bug27963_wallclock' 2018-11-02 09:38:26 -04:00
Nick Mathewson
bfe8f50cc8 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-02 09:06:37 -04:00
Nick Mathewson
6bd069630a Merge branch 'bug26470_032' into maint-0.3.3 2018-11-02 09:06:32 -04:00
Nick Mathewson
f288f2478a Merge branch 'bug26896_034' into maint-0.3.4 2018-11-02 09:05:14 -04:00
Nick Mathewson
8ed4f1ee84 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-02 09:04:25 -04:00
Nick Mathewson
e847909b71 Merge remote-tracking branch 'dgoulet/ticket27410_032_01' into maint-0.3.3 2018-11-02 09:04:20 -04:00
George Kadianakis
a0402c6f33 Add changes file for #27707. 2018-11-01 12:40:52 +02:00
Nick Mathewson
383b44553c Merge branch 'ticket24393_036_01_squashed' 2018-10-31 11:07:15 -04:00
Nick Mathewson
0d124488f8 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-10-31 11:02:58 -04:00
Nick Mathewson
158db532eb Merge branch 'maint-0.3.3' into maint-0.3.4 2018-10-31 11:01:41 -04:00
Nick Mathewson
2a4506776e Merge branch 'maint-0.3.5' 2018-10-31 11:01:41 -04:00
Nick Mathewson
59043665f8 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-10-31 11:01:41 -04:00
Nick Mathewson
bcc1a71808 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-10-31 11:01:40 -04:00
Nick Mathewson
0a824bd889 Merge remote-tracking branch 'tor-github/pr/436' into maint-0.2.9 2018-10-31 11:01:36 -04:00
Nick Mathewson
988d4903a3 Merge branch 'networkstatus_mmap' into networkstatus_mmap_merge 2018-10-31 09:04:12 -04:00
Neel Chauhan
067b16eae2 Check IPv6 subnets as well as IPv4 subnets where possible when choosing client paths 2018-10-30 15:02:43 -04:00
David Goulet
aa1ae1343a Merge branch 'maint-0.3.5' 2018-10-30 11:44:14 -04:00
David Goulet
488969fe9c Merge branch 'tor-github/pr/438' into maint-0.3.5 2018-10-30 11:43:54 -04:00
David Goulet
124c43704c Merge branch 'maint-0.3.5' 2018-10-30 11:37:44 -04:00
David Goulet
95559279e1 Merge branch 'tor-github/pr/415' into maint-0.3.5 2018-10-30 11:36:36 -04:00
David Goulet
1c5c3f353a Merge branch 'maint-0.3.5' 2018-10-30 11:29:30 -04:00
David Goulet
6c9d678ff6 hs-v3: Add changes file for 28026
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-30 11:28:53 -04:00
David Goulet
cdb065d6b2 Merge branch 'maint-0.3.5' 2018-10-30 10:55:10 -04:00
Neel Chauhan
9b72dca953 Add changes file for Bug #28127 2018-10-30 10:49:03 -04:00
Nick Mathewson
6ba7f9f0a4 Merge branch 'maint-0.3.5' 2018-10-30 09:35:11 -04:00
Nick Mathewson
97324a731f Merge remote-tracking branch 'tor-github/pr/431' into maint-0.3.5 2018-10-30 09:35:07 -04:00
Nick Mathewson
cf2cb783b7 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-10-30 09:34:04 -04:00
Nick Mathewson
038bc21f88 Merge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3 2018-10-30 09:33:36 -04:00
Nick Mathewson
30d853a906 Merge remote-tracking branch 'tor-github/pr/425' 2018-10-30 09:16:55 -04:00
Nick Mathewson
084924360a Merge branch 'ticket23082_squashed' 2018-10-30 09:05:42 -04:00
Nick Mathewson
c19bb4d62e Merge branch 'maint-0.3.5' 2018-10-30 08:45:49 -04:00
Nick Mathewson
ee1cc0feae Add a changes file for Alex Crichton's rust fixes. 2018-10-30 08:45:37 -04:00
Nick Mathewson
f6faa76817 Merge branch 'maint-0.3.5' 2018-10-29 15:59:11 -04:00
Nick Mathewson
709cd447f0 Merge branch '27913_rebased_035' into maint-0.3.5 2018-10-29 15:59:06 -04:00
Nick Mathewson
c4b6b57388 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-10-29 15:57:31 -04:00
Nick Mathewson
fda8b5de78 Merge branch 'maint-0.3.5' 2018-10-29 15:57:31 -04:00
rl1987
cf434b6c80 Add changes file 2018-10-29 15:18:07 -04:00
rl1987
5a3cb495ce Add changes file 2018-10-29 11:41:36 +02:00
rl1987
4af27e0168 Add changes file 2018-10-29 11:05:55 +02:00
rl1987
b64e1e602b Add changes file 2018-10-26 12:58:42 +03:00
Nick Mathewson
e9ff3e7d4a Merge branch 'bug28202_033' into bug28202_035 2018-10-25 09:16:08 -04:00
Nick Mathewson
8013e3e8b6 Merge branch 'bug28202_029' into bug28202_033 2018-10-25 09:14:06 -04:00
Nick Mathewson
368413a321 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.
2018-10-25 09:06:13 -04:00
David Goulet
b063ca0604 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>
2018-10-24 10:30:26 -04:00
Nick Mathewson
b77889fc5f Merge branch 'maint-0.3.5' 2018-10-24 10:20:53 -04:00
Nick Mathewson
6851a08090 Merge branch 'ticket28115_035' into maint-0.3.5 2018-10-24 10:20:41 -04:00
Nick Mathewson
c6d3bebb1e Merge remote-tracking branch 'tor-github/pr/409' 2018-10-24 09:06:29 -04:00
Nick Mathewson
3dc5cce749 Merge branch 'maint-0.3.5' 2018-10-24 08:57:28 -04:00
Nick Mathewson
98e28efa8c Merge branch 'nss-travis' into maint-0.3.5 2018-10-24 08:57:22 -04:00
Nick Mathewson
05d65cb067 Merge branch 'maint-0.3.5' 2018-10-23 19:22:05 -04:00
Nick Mathewson
289a7dbac3 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-10-23 19:21:44 -04:00
Nick Mathewson
7edc594ee7 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-10-23 19:18:23 -04:00
Nick Mathewson
169bc670dd Merge remote-tracking branch 'onionk/rust-allsupportednull1' into maint-0.3.3 2018-10-23 19:17:48 -04:00
teor
939657771c
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.
2018-10-23 11:21:10 +10:00
cypherpunks
f874ab2640 dircache: make dirauths reject non UTF-8 descriptors and extrainfo
Ticket #27367.
2018-10-23 00:33:51 +00:00
David Goulet
81c466c34a hs-v3: Create desc signing key cert before uploading
Before this commit, we would create the descriptor signing key certificate
when first building the descriptor.

In some extreme cases, it lead to the expiry of the certificate which triggers
a BUG() when encoding the descriptor before uploading.

Ticket #27838 details a possible scenario in which this can happen. It is an
edge case where tor losts internet connectivity, notices it and closes all
circuits. When it came back up, the HS subsystem noticed that it had no
introduction circuits, created them and tried to upload the descriptor.

However, in the meantime, if tor did lack a live consensus because it is
currently seeking to download one, we would consider that we don't need to
rotate the descriptors leading to using the expired signing key certificate.

That being said, this commit does a bit more to make this process cleaner.
There are a series of things that we need to "refresh" before uploading a
descriptor: signing key cert, intro points and revision counter.

A refresh function is added to deal with all mutable descriptor fields. It in
turn simplified a bit the code surrounding the creation of the plaintext data.

We keep creating the cert when building the descriptor in order to accomodate
the unit tests. However, it is replaced every single time the descriptor is
uploaded.

Fixes #27838

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-22 16:34:41 -04:00
rl1987
1a1b088f8c Add changes file 2018-10-20 20:34:08 +03:00
Nick Mathewson
1ae9116601 Merge remote-tracking branch 'onionk/rust-protocommas1' into maint-0.3.5 2018-10-19 14:20:57 -04:00
Nick Mathewson
a05a113062 Merge remote-tracking branch 'onionk/rust-protocommas1' 2018-10-19 14:20:43 -04:00
Nick Mathewson
f8a1dc64f9 Fix a misspelled macro test that was breaking big-endian OPE
Fixes bug 28115; bugfix on 0.3.5.1-alpha.
2018-10-19 08:41:25 -04:00
Nick Mathewson
62401812c7 Merge remote-tracking branch 'dgoulet/ticket27471_035_02' 2018-10-18 13:01:41 -04:00
David Goulet
9ba16c4d03 hs-v3: Close client intro circuits if the descriptor is replaced
When storing a descriptor in the client cache, if we are about to replace an
existing descriptor, make sure to close every introduction circuits of the old
descriptor so we don't have leftovers lying around.

Ticket 27471 describes a situation where tor is sending an INTRODUCE1 cell on
an introduction circuit for which it doesn't have a matching intro point
object (taken from the descriptor).

The main theory is that, after a new descriptor showed up, the introduction
points changed which led to selecting an introduction circuit not used by the
service anymore thus for which we are unable to find the corresponding
introduction point within the descriptor we just fetched.

Closes #27471.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-18 12:56:51 -04:00
David Goulet
56f713b8a4 hs-v3: Always generate the descriptor cookie
It won't be used if there are no authorized client configured. We do that so
we can easily support the addition of a client with a HUP signal which allow
us to avoid more complex code path to generate that cookie if we have at least
one client auth and we had none before.

Fixes #27995

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-18 11:46:07 -04:00
Nick Mathewson
0a41d17c15 Merge branch 'ticket27549_035_01_squashed' 2018-10-18 10:16:30 -04:00
David Goulet
3a8f32067d hs-v3: Consolidate descriptor cookie computation code
Both client and service had their own code for this. Consolidate into one
place so we avoid duplication.

Closes #27549

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-18 10:16:07 -04:00
Nick Mathewson
d1eac7830f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-10-18 09:12:58 -04:00
Taylor Yu
7f6c0fce46 Merge branch 'bug27800-034' into bug27800-035 2018-10-17 16:00:11 -05:00
Taylor Yu
4e7f65ee5d Merge branch 'bug27800-033' into tor-034 2018-10-17 15:42:58 -05:00
Taylor Yu
93fd924bdb 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.
2018-10-17 15:39:55 -05:00
Nick Mathewson
498a852bba Fold in the entry for 28089 2018-10-17 13:12:24 -04:00
Nick Mathewson
b1891068f1 Merge branch 'maint-0.3.4' 2018-10-17 13:02:23 -04:00
David Goulet
2000d04cb6 conn: Stop writing when our write bandwidth limist is exhausted
Commit 488e2b00bf 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.
2018-10-17 12:25:12 -04:00
Nick Mathewson
e2bfffefb0 Fold changes file into changelog 2018-10-17 09:25:43 -04:00
cypherpunks
2f0744b3e6 rust/tor_util: drop unsafe block in cstr!
This is unnecessary just to get an empty string, there's Default::default().

Fix on 8fff331bb0.
2018-10-17 00:16:21 +00:00
Nick Mathewson
56a3cef4d7 Merge branch 'bug27849_redux' 2018-10-16 17:33:58 -04:00
Nick Mathewson
698629f5a9 Merge remote-tracking branch 'tor-github/pr/404' 2018-10-16 17:29:50 -04:00
rl1987
65864be9bc Add changes file 2018-10-16 18:04:54 +03:00
David Goulet
b5731cdf2e 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 67a41b6306
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 67a41b6306 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>
2018-10-16 08:11:49 -04:00
Nick Mathewson
b7fbd1f329 Merge branch 'maint-0.3.4' 2018-10-16 08:04:34 -04:00