Commit Graph

9624 Commits

Author SHA1 Message Date
Nick Mathewson
5cd85feaa7 Merge remote-tracking branch 'tor-gitlab/mr/68' into maint-0.4.4 2020-07-21 09:29:03 -04:00
Nick Mathewson
2ee33765ae Merge branch 'maint-0.4.4' 2020-07-21 09:24:27 -04:00
Nick Mathewson
95d4bff784 Merge remote-tracking branch 'tor-gitlab/mr/67' into maint-0.4.4 2020-07-21 09:24:15 -04:00
Daniel Pinto
d75e7daaab Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
2020-07-20 22:35:05 +01:00
Daniel Pinto
d28bfb2cd5 Fix seccomp sandbox rules for opening directories #40020
Different versions of glibc use either open or openat for the
opendir function. This commit adds logic to use the correct rule
for each glibc version, namely:
- Until 2.14 open is used
- From 2.15 to to 2.21 openat is used
- From 2.22 to 2.26 open is used
- From 2.27 onwards openat is used
2020-07-20 22:30:13 +01:00
Daniel Pinto
c79b4397d3 Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
2020-07-20 22:30:00 +01:00
Nick Mathewson
d6570eaf5d Merge remote-tracking branch 'tor-gitlab/mr/59' 2020-07-20 16:37:11 -04:00
Daniel Pinto
29307c0625 Add running glibc version to the log. #40047
Also adds the compiled and running glibc version when using the
--library-versions flag.
2020-07-17 18:45:57 +01:00
Nick Mathewson
7b3bd45cfe or_connection_t: replace real_addr with canonical_orport.
Instead of replacing connection_t.{addr,port} with a canonical
orport, and tracking the truth in real_addr, we now leave
connection_t.addr alone, and put the canonical address in
canonical_orport.

Closes #40042

Closes #33898
2020-07-17 11:42:49 -04:00
Nick Mathewson
ff68aeb492 When choosing an orport from an extendinfo, pick randomly.
(This is not fully general yet: we only pick randomly among
_supported_ addresses, and each extendinfo contains at most one IPv4
address and at most one IPv6 address, no matter what the extend cell
had.)

This change will help dual-stack relays do IPv6 reachability tests,
in theory, by having them sometimes do IPv4 connections and
sometimes do ipv6 connections.

Closes ticket 33220.
2020-07-17 09:15:08 -04:00
David Goulet
f6fc062119 Merge branch 'tor-gitlab/mr/54' 2020-07-16 12:55:26 -04:00
Nick Mathewson
f0204a3c34 Changes file for CONST_TO_*() functions.
Closes #40046.
2020-07-16 12:55:21 -04:00
Alexander Færøy
39b54bf1dd Merge branch 'tor-gitlab/merge-requests/53' 2020-07-16 14:19:18 +00:00
David Goulet
9c653e58b4 doc: Document circuit subsystem tracing events
Create a doc/tracing/ directory to contain a top level README.md which is the
previously named Tracing.md and add the EventsCircuit.md which describes the
circuit subsystem tracing events in depth.

Closes #40036

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-16 14:19:04 +00:00
Nick Mathewson
ae8072e8ff Changes file for 40041.
Closes #40041.
2020-07-16 09:02:10 -04:00
Daniel Pinto
ac2c4b1e4a Changes file for #25140 2020-07-15 22:01:08 +01:00
Nick Mathewson
a7226ca06e Merge remote-tracking branch 'tor-gitlab/mr/50' 2020-07-14 14:50:30 -04:00
Alexander Færøy
abe7196c53 Strip '\r' characters when reading text files on Unix.
This patch ensures that we strip "\r" characters on both Windows as well
as Unix when we read text files. This should prevent the issue where
some Tor state files have been moved from a Windows machine, and thus
contains CRLF line ending, to a Unix machine where only \n is needed.

We add a test-case to ensure that we handle this properly on all our
platforms.

See: https://bugs.torproject.org/tpo/core/tor/33781
2020-07-14 17:41:51 +00:00
Alexander Færøy
aba0ff4cb5 Merge remote-tracking branch 'tor-gitlab/merge-requests/48' 2020-07-14 16:07:36 +00:00
Alexander Færøy
1d554e4baf Merge branch 'maint-0.4.4' 2020-07-14 14:48:21 +00:00
Alexander Færøy
07f3345e11 Merge remote-tracking branch 'tor-gitlab/merge-requests/43' into maint-0.4.4 2020-07-14 14:47:48 +00:00
David Goulet
e594195aa2 Merge branch 'tor-gitlab/mr/47' 2020-07-14 10:36:30 -04:00
David Goulet
15860c8846 addr: Use tor_addr_t instead of uint32_t for IPv4
This changes a LOT of code but in the end, behavior is the same.
Unfortunately, many functions had to be changed to accomodate but in majority
of cases, to become simpler.

Functions are also removed specifically those that were there to convert an
IPv4 as a host format to a tor_addr_t. Those are not needed anymore.

The IPv4 address field has been standardized to "ipv4_addr", the ORPort to
"ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport".

This is related to Sponsor 55 work that adds IPv6 support for relays and this
work is needed in order to have a common interface between IPv4 and IPv6.

Closes #40043.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14 10:36:08 -04:00
David Goulet
456be93956 doc: Move manpages into doc/man/
Closes #40044

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14 09:02:03 -04:00
David Goulet
29a474294c Merge branch 'maint-0.4.4' 2020-07-13 15:04:13 -04:00
David Goulet
515d4f1e93 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-13 15:03:34 -04:00
Nick Mathewson
ecb43ce21c Merge branch 'maint-0.4.4' 2020-07-13 10:45:04 -04:00
Nick Mathewson
eb427f309c Changes file for ticket 31812. 2020-07-13 10:44:39 -04:00
MrSquanchee
c84ce716dc Added tests
Added tests for channel_matches_target_addr_for_extend().
Ticket #33919.
2020-07-13 09:46:11 -04:00
Nick Mathewson
0acc3ae879 Remove check-cocci from check-local target.
check-cocci is still a good idea -- perhaps as a cron job?  But
doing it as part of our regular tests has just been confusing,
especially to volunteers who shouldn't have to become coccinelle
experts in order to get their patches through our CI.

Closes #40030.
2020-07-13 09:24:26 -04:00
Nick Mathewson
40eb6b19a3 NSS: Tell NSS that our SSL sockets are nonblocking.
Closes ticket 40035.
2020-07-10 13:14:33 -04:00
David Goulet
063cdb3142 Merge branch 'tor-gitlab/mr/39' 2020-07-10 13:12:22 -04:00
Nick Mathewson
6fb1637255 Merge remote-tracking branch 'tor-gitlab/mr/29' 2020-07-10 12:53:46 -04:00
David Goulet
dfaa0a82ac changes: Add changes file for #32910
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-10 12:12:26 -04:00
Nick Mathewson
fae19df985 Changes file for ipv6 bidi (ticket 33264) 2020-07-10 09:52:35 -04:00
Nick Mathewson
1a4e475d5d Changes file for ticket 33263 2020-07-10 09:25:28 -04:00
Nick Mathewson
7207b4f2e4 Merge remote-tracking branch 'tor-gitlab/mr/21' 2020-07-09 14:30:15 -04:00
George Kadianakis
b1a32761be Merge branch 'maint-0.4.4' 2020-07-09 17:08:34 +03:00
George Kadianakis
e500ea2eae Merge branch 'tor-github/pr/1989' into maint-0.4.4 2020-07-09 17:08:07 +03:00
Nick Mathewson
be6b30e642 Merge branch 'maint-0.4.4' 2020-07-09 09:59:54 -04:00
Nick Mathewson
8dd89e4330 Merge remote-tracking branch 'dgoulet/ticket33796_044_01' into maint-0.4.4 2020-07-09 09:59:45 -04:00
Nick Mathewson
af08dad6d1 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-09 09:28:53 -04:00
Nick Mathewson
283ce30c53 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-09 09:28:53 -04:00
Nick Mathewson
b0399c6026 Merge branch 'maint-0.4.4' 2020-07-09 09:28:53 -04:00
Nick Mathewson
0f39cc10f6 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-09 09:28:53 -04:00
Nick Mathewson
7142f3e435 Merge branch 'trove_2020_001_035' into maint-0.3.5 2020-07-09 09:28:36 -04:00
David Goulet
63a54858c3 hs-v3: Remove a possible BUG() condition
When receiving an introduction NACK, the client either decides to close or
re-extend the circuit to another intro point.

In order to do this, the service descriptor needs to exists but it is possible
that it gets removed from the cache between the establishement of the
introduction circuit and the reception of the (N)ACK.

For that reason, the BUG(desc == NULL) is removed because it is a possible
normal use case. Tor recovers gracefully already.

Fixes #34087

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-09 08:32:53 -04:00
David Goulet
32a0bc2a84 Merge branch 'maint-0.4.4' 2020-07-09 07:27:25 -04:00
David Goulet
1af7f40dad Merge branch 'tor-github/pr/1988' into maint-0.4.4 2020-07-09 07:27:13 -04:00
David Goulet
d7f3d1196c Merge branch 'maint-0.4.4' 2020-07-09 07:25:26 -04:00
George Kadianakis
e0da64fd27 Handle a failure edge-case when a client-side intro circ opens. 2020-07-09 10:10:57 +03:00
Neel Chauhan
60f699c859 Send a control port event when a stream enters the AP_CONN_STATE_CONTROLLER_WAIT state 2020-07-08 20:22:02 -07:00
Guinness
562957e0db socks: Returns 0xF6 only if BAD_HOSTNAME
This commit modifies the behavior of `parse_extended_address` in such a way
that if it fails, it will always return a `BAD_HOSTNAME` value, which is then
used to return the 0xF6 extended error code.  This way, in any case that is
not a valid v2 address, we return the 0xF6 error code, which is the expected
behavior.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-08 16:20:31 -04:00
Alexander Færøy
c364e0e83b Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-08 00:36:48 +00:00
Alexander Færøy
e4bfa734a6 Merge branch 'maint-0.4.4' 2020-07-08 00:36:48 +00:00
Alexander Færøy
9603d8af0b Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-08 00:36:48 +00:00
Alexander Færøy
b81e24cda6 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-08 00:36:47 +00:00
Nick Mathewson
3e08dd9df1 Resolve a compiler warning from a 32-bit signed/unsigned comparison
This warning only affects platforms (like win32) with 32-bit time_t.

Fixes bug 40028; bugfix on 0.3.2.8-rc.
2020-07-07 15:05:38 -04:00
David Goulet
66d5292ee6 Revert "config: Make clients tell dual-stack exits they prefer IPv6"
This reverts commit bf2a399fc0.

Don't set by default the prefer IPv6 feature on client ports because it breaks
the torsocks use case. The SOCKS resolve command is lacking a mechanism to ask
for a specific address family (v4 or v6) thus prioritizing IPv6 when an IPv4
address is asked on the resolve SOCKS interface resulting in a failure.

Tor Browser explicitly set PreferIPv6 so this should not affect the majority
of our users.

Closes #33796

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-07 12:58:41 -04:00
David Goulet
640a777c9b Merge branch 'ticket33236_045_01' 2020-07-07 11:01:26 -04:00
David Goulet
809c864707 addr: Attempt to learn our address with ORPort
If no Address statement are found in the configuration file, attempt to learn
our address by looking at the ORPort address if any. Specifying an address is
optional so if we can't find one, it is fine, we move on to the next discovery
mechanism.

Note that specifying a hostname on the ORPort is not yet supported at this
commit.

Closes #33236

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-07 10:52:43 -04:00
Alexander Færøy
a213d27938 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-07 14:48:36 +00:00
Alexander Færøy
d4c79cae76 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-07 14:48:36 +00:00
Alexander Færøy
aa80f73fc4 Merge branch 'maint-0.4.4' 2020-07-07 14:48:36 +00:00
Alexander Færøy
19d579e8cb Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-07 14:48:35 +00:00
David Goulet
15be1ff8ad changes: Add a changes file for #40022
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-07 10:41:10 -04:00
David Goulet
d9cc2b2928 CI: Fix Appveyor printf format error
For some reasons, Appveyor started to use the stdio printf format for 64 bit
values (PRIu64, ...). Mingw doesn't like that so force it to use the Windows
specific macros by setting D__USE_MINGW_ANSI_STDIO=0.

Fixes #40026
2020-07-07 09:53:54 -04:00
Bartosz Duszel
9cefc47231 add changes file for ticket31699 2020-07-07 08:00:30 -04:00
Alexander Færøy
b46984e97e Fix out-of-bound memory read in tor_tls_cert_matches_key() for NSS.
This patch fixes an out-of-bound memory read in
`tor_tls_cert_matches_key()` when Tor is compiled to use Mozilla's NSS
instead of OpenSSL.

The NSS library stores some length fields in bits instead of bytes, but
the comparison function found in `SECITEM_ItemsAreEqual()` needs the
length to be encoded in bytes. This means that for a 140-byte,
DER-encoded, SubjectPublicKeyInfo struct (with a 1024-bit RSA public key
in it), we would ask `SECITEM_ItemsAreEqual()` to compare the first 1120
bytes instead of 140 (140bytes * 8bits = 1120bits).

This patch fixes the issue by converting from bits to bytes before
calling `SECITEM_ItemsAreEqual()` and convert the `len`-fields back to
bits before we leave the function.

This patch is part of the fix for TROVE-2020-001.

See: https://bugs.torproject.org/33119
2020-07-06 16:19:16 -04:00
Nick Mathewson
ac3bc88343 Merge remote-tracking branch 'tor-github/pr/1938/head' 2020-07-06 09:34:13 -04:00
George Kadianakis
00f921edb9 Merge branch 'maint-0.4.4' 2020-07-03 15:54:41 +03:00
George Kadianakis
05ca50c9a3 Merge branch 'tor-github/pr/1962' into maint-0.4.4 2020-07-03 15:54:24 +03:00
David Goulet
6ff4596753 hs-v2: Add deprecation warning for service
If at least one service is configured as a version 2, a log warning is emitted
once and only once.

Closes #40003

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-03 15:52:54 +03:00
George Kadianakis
3bb9b7e743 Merge branch 'tor-github/pr/1934' 2020-07-03 10:50:47 +03:00
David Goulet
a73049d1a0 changes: Add changes file for ticket #40019
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-02 14:39:44 -04:00
Nick Mathewson
a34b9a0b62 Merge branch 'ticket33238_045_01_squashed' 2020-07-02 11:00:48 -04:00
David Goulet
45afb31e1c addr: Prioritize interface lookup over local hostname
The find_my_address() function now prioritize the local interface over the
local hostname when guessing the IP address.

See proposal 312, section 3.2.1, general case:
https://gitweb.torproject.org/torspec.git/tree/proposals/312-relay-auto-ipv6-addr.txt#n359

The entire unit tests had to be refactored to make this possible. Instead of
hot patching it, it has been rewritten to cover all possible cases and the
test interface has been changed to accomodate both IPv4 and IPv6 in order for
them to be tested identically.

Closes #33238

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-02 11:00:42 -04:00
Nick Mathewson
2e98e88117 Merge branch 'maint-0.4.4' 2020-07-02 10:15:04 -04:00
Nick Mathewson
18fa53fdf4 Merge branch 'ticket32622_044_squashed' into maint-0.4.4 2020-07-02 10:14:55 -04:00
Nick Mathewson
65b05b12ab Changes file for #32622. 2020-07-02 10:14:48 -04:00
Nick Mathewson
20d1a1cdbd Merge remote-tracking branch 'dgoulet/ticket32822_045_01' 2020-07-02 09:47:43 -04:00
David Goulet
9b560ea714 Merge branch 'maint-0.4.4' 2020-07-02 07:20:58 -04:00
David Goulet
8da10e8237 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-02 07:20:58 -04:00
David Goulet
5a5ff3d8c5 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-02 07:20:57 -04:00
David Goulet
07d8d398ca Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-02 07:20:57 -04:00
teor
1f58b0ca26 router: Authorities add their own IPv6 to trusted dir servers
Authorities currently add themselves to the trusted dir servers list,
but if they have an IPv6 ORPort, they leave it out.

This commit makes authorities add their own IPv6 ORPort to the trusted
dir servers list.

Closes ticket 32822.
2020-07-02 07:09:02 -04:00
David Goulet
f30f53e099 Merge branch 'tor-github/pr/1907' 2020-07-01 12:26:19 -04:00
Neel Chauhan
b558971c07 Add changes file for Ticket #28279 2020-07-01 12:00:53 -04:00
Nick Mathewson
368156fcb7 Merge branch 'ticket34137' 2020-07-01 10:34:39 -04:00
David Goulet
b039d3e803 Merge branch 'tor-github/pr/1953' 2020-07-01 09:47:26 -04:00
George Kadianakis
0d02c053f8 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-01 12:55:03 +03:00
George Kadianakis
7f999203ce Merge branch 'maint-0.4.4' 2020-07-01 12:55:03 +03:00
George Kadianakis
1932a84ef5 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-01 12:55:02 +03:00
George Kadianakis
38208185be Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-01 12:55:02 +03:00
George Kadianakis
9beae02713 Merge branch 'tor-github/pr/1766' into maint-0.3.5 2020-07-01 12:54:29 +03:00
Nick Mathewson
39830b6408 Downgrade "Bug: No entry found in extrainfo map" message.
This is not actually a bug!  It can happen for a bunch of reasons,
which all boil down to "trying to add an extrainfo for which we no
longer have the corresponding routerinfo".

Fixes #16016; bugfix on 0.2.6.3-alpha.
2020-06-30 11:54:13 -04:00
Nick Mathewson
2238b6320b Refactor reachability test logging: log exactly what we launch.
Previously we had two chains of logic for reachability tests: one
for launching them, and one for telling the user that we had
launched them.  Now, we simply have the launch code inform the user:
this way, we can't get out of sync.

Closes ticket 34137.
2020-06-30 11:12:46 -04:00
Alexander Færøy
dbb70d85bf Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 14:23:41 +00:00
Alexander Færøy
8697205be4 Merge branch 'tor-github/pr/1909' into maint-0.3.5 2020-06-30 14:23:17 +00:00
Alexander Færøy
5a38c73f70 Merge branch 'tor-github/pr/1887' into maint-0.4.3 2020-06-30 14:19:28 +00:00
Alexander Færøy
881f50a9a9 Merge branch 'tor-github/pr/1806' into maint-0.4.2 2020-06-30 14:15:57 +00:00
Alexander Færøy
c9c4a3d0f6 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 14:03:04 +00:00
Alexander Færøy
8444fbe904 Merge branch 'tor-github/pr/1793' into maint-0.3.5 2020-06-30 13:55:39 +00:00
Alexander Færøy
483082b57b Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 13:48:49 +00:00
Alexander Færøy
c3ad2a1d23 Merge branch 'tor-github/pr/1785' into maint-0.3.5 2020-06-30 13:47:55 +00:00
Alexander Færøy
b0bfee8c78 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 13:37:20 +00:00
Alexander Færøy
bebdd2888f Merge remote-tracking branch 'nickm-github/bug32884_035' into maint-0.3.5 2020-06-30 13:35:13 +00:00
Nick Mathewson
d235e523d5 Merge branch 'ticket33290_v2_042' into maint-0.4.2 2020-06-29 13:57:13 -04:00
Nick Mathewson
a692b87f82 Merge remote-tracking branch 'tor-github/pr/1696/head' into maint-0.4.2 2020-06-29 13:53:27 -04:00
Nick Mathewson
0575a182a6 Merge remote-tracking branch 'tor-github/pr/1697/head' into maint-0.4.2 2020-06-29 13:48:25 -04:00
Nick Mathewson
216456299f Merge remote-tracking branch 'tor-github/pr/1722/head' into maint-0.4.2 2020-06-29 12:58:23 -04:00
Nick Mathewson
3008255aea Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3 2020-06-29 12:56:39 -04:00
Nick Mathewson
fd8ce812b0 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-29 12:55:35 -04:00
Nick Mathewson
0c0214bcc0 Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5 2020-06-29 12:55:27 -04:00
Nick Mathewson
e269e081a1 Remove changes files that appeared in tor 0.4.4.1-alpha. 2020-06-26 09:50:57 -04:00
Nick Mathewson
a7aa97298b Remove special authority semantics for AssumeReachable.
AssumeReachable should only be about whether a relay thinks that it
is reachable itself.  But previously, we've had it also turn off
reachability checking of _other_ relays on authorities.
(Technically, reachability tests were still run, but we would ignore
the results.)

With this patch, there is a new AuthDirTestReachability option
(default 1) that controls whether authorities run reachability
tests.

Making this change allows us to have test networks where authorities
set AssumeReachable without disabling their reachability testing
entirely.

Closes ticket #34445.
2020-06-26 08:37:36 -04:00
Nick Mathewson
dbc2b75009 Merge branch 'assume_reachable_revamp' 2020-06-26 08:34:56 -04:00
David Goulet
069566b40a Merge branch 'tor-github/pr/1951' 2020-06-25 13:41:45 -04:00
David Goulet
374626c09b Merge branch 'tor-github/pr/1917' 2020-06-25 13:35:34 -04:00
Neel Chauhan
ef563a8fef Add an fingerprint-ed25519 file to the data directory 2020-06-25 13:35:15 -04:00
David Goulet
dc4f3a219f Merge branch 'tor-github/pr/1948' 2020-06-25 10:13:04 -04:00
Nick Mathewson
62e1d983cf Deprecate the "--dump-config non-builtin" option
When it works, "non-builtin" doesn't do anything different from
"short".  (When it doesn't work, it gives an assertion failure.)

Closes ticket #33398.
2020-06-25 10:01:40 -04:00
David Goulet
c370b4a049 Merge branch 'maint-0.4.4' 2020-06-25 07:36:56 -04:00
David Goulet
fd5b2d0f1c Merge branch 'tor-github/pr/1935' 2020-06-24 15:48:47 -04:00
Neel Chauhan
c8fd7b7040 Make HSFETCH take the decoded length into account, not the base32 one 2020-06-24 15:47:57 -04:00
Nick Mathewson
edb023b1e7 Add an AssumeReachableIPv6 autobool option.
This option tells Tor that our IPv6 orport is reachable, and doesn't
need to be checked.

Closes the rest of 33224.
2020-06-24 15:25:34 -04:00
Nick Mathewson
6edf7f6710 Add two new networkstatus parameters to emulate AssumeReachable.
These parameters do not suppress checks, but they tell relays that
it's okay to publish even when those checks fail.

I have chosen lowercase hyphenated names, since these seem to be
more common in networkstatus params.

Closes #33224 and part of #34064.
2020-06-24 15:25:26 -04:00
Nick Mathewson
366c695020 Add a control event for launching IPv6 ORPort checks. 2020-06-24 14:00:34 -04:00
David Goulet
86da0cfd36 Merge branch 'tor-github/pr/1945' 2020-06-24 13:51:51 -04:00
David Goulet
901a2507e6 changes: Add changes file for ticket #33233
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24 13:51:37 -04:00
Nick Mathewson
fd3e0c561d Merge branch 'pr_1931_squashed' 2020-06-24 13:38:32 -04:00
Neel Chauhan
6209939e86 Add changes file for ticket #34065 2020-06-24 13:38:27 -04:00
David Goulet
bc50f082bd Merge branch 'tor-github/pr/1944' 2020-06-24 10:48:14 -04:00
David Goulet
3adabaf3e9 tls: Make buf_read_from_tls() read at most bytes
The buf_read_from_tls() function was designed to read up to a certain number
of bytes a TLS socket using read_to_chunk_tls() which boils down to SSL_read()
(with OpenSSL, common case).

However, at the end of the loop, the returned number of bytes from
read_to_chunk_tls() was treated like the syscall read() for which if less
bytes than the total asked are returned, it signals EOF.

But, with SSL_read(), it returns up to a TLS record which can be less than
what was asked. The assumption that it was EOF was wrong which made the while
loop exiting before it was able to consume all requested bytes (at_most
parameter).

The general use case that Tor sees is that it will ask the network layer to
give it at most 16KB (that is roughly 32 cells) but because of KIST scheduler,
the highest possible TLS record we currently observe is 4096 bytes (4KB or 8
cells). Thus the loop would at best always return 8 cells even though much
more could be on the TLS socket. See ticket #40006 for more details.

Fixes #40006

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24 10:47:53 -04:00
George Kadianakis
2eae59e475 Merge branch 'tor-github/pr/1939' 2020-06-24 17:22:53 +03:00
Neel Chauhan
1bd0494f8c Make summarize_protover_flags() handle NULL and empty string the same 2020-06-24 17:22:45 +03:00
David Goulet
2d91960540 Merge branch 'tor-github/pr/1942' 2020-06-24 07:44:41 -04:00
George Kadianakis
a3b573b392 Merge branch 'tor-github/pr/1943' 2020-06-23 20:31:44 +03:00
Mike Perry
8e7a069130 Changes file for DROPTIMEOUTS 2020-06-23 20:31:26 +03:00
George Kadianakis
68d848e244 Reinstate support for GUARD NEW/UP/DOWN control port events. 2020-06-23 19:48:37 +03:00
Nick Mathewson
65328fd4e7 Merge branch 'maint-0.4.4' 2020-06-23 12:29:47 -04:00
Nick Mathewson
318753f502 Merge branch 'ticket34382' into maint-0.4.4 2020-06-23 12:29:39 -04:00
David Goulet
d3bcbccab9 Merge branch 'maint-0.4.4' 2020-06-23 08:52:33 -04:00
David Goulet
5232315168 Merge branch 'tor-github/pr/1937' into maint-0.4.4 2020-06-23 08:52:16 -04:00
Nick Mathewson
ceddc39c59 Merge branch 'pr_1930_squashed' 2020-06-22 15:33:27 -04:00
Neel Chauhan
5a89fd2a04 Add changes file for ticket 33816 2020-06-22 15:33:03 -04:00
David Goulet
033f804429 Merge branch 'maint-0.4.4' 2020-06-22 14:57:50 -04:00
Miguel Jacq
3d0e1c42d9 Consistently use 'address' in Invalid v3 address responses to ONION_CLIENT_AUTH commands 2020-06-22 14:56:07 -04:00
Nick Mathewson
bc9979a670 Split "can reach ipv4 orport" from "can reach ipv6 orport".
I've managed to keep this change mainly contained to our
self-testing module.  The changes here are:

  * There are two different variables for tracking "is our orport
    reachable".

  * We have a new function that says whether we can skip a single
    family's orport reachability test; the old function for this now
    tells whether we can skip _all_ orport reachability testing.

    (The name, router_should_skip_orport_reachability_test, is not
    so good.  I will rename it later if I can think of a good
    replacement.)

  * The function that launches orport reachability tests now only
    launches the ones that haven't completed.

  * The function that notes that we're reachable on an ORPort now
    takes a family.

  * Various log messages are cleaned up.
2020-06-18 16:05:16 -04:00
Neel Chauhan
7cf031a0cc Reject Tor relays running the 0.4.1 series 2020-06-17 12:00:44 -07:00
Nick Mathewson
b67f7d722d Update the list of recommended protocol versions to match >=0.3.5.
Since Tor 0.2.9 has been unsupported since January, 0.3.5 is the
oldest supported version, and its features constitute the oldest
recommended feature-set.

This patch updates these recommendations:

   DirCache=2

      Support for consensus diffs.
      New in 0.3.1.1-alpha.

   HSDir=2

      Support for v3 onion service descriptors.
      New in 0.3.0.4-alpha.

   HSIntro=4

      Support for Ed25519 intropoint authentication keys.
      New in 0.3.0-4-alpha.

   HSRend=2

      Support for rendezvous cells longer than 20 bytes.
      New in 0.2.9.4-alpha.

   Link=5

      Link padding and link padding negotiation.
      New in 0.3.3.2-alpha.

   LinkAuth=3

       Ed25519 link authentication.
       New in 0.3.0.1-alpha.
2020-06-17 11:07:43 -04:00
Mike Perry
954421ab7c Bug 32040: Changes files
Not the whole story; machines still need to use this.
2020-06-16 12:26:18 -05:00
Nick Mathewson
9fdaede3f7 Remove AssumeReachable from TestingTorNetwork.
Closes ticket 34446.
2020-06-15 14:08:42 -04:00
George Kadianakis
3cb77a9cca Merge branch 'maint-0.4.4' 2020-06-11 17:29:54 +03:00
George Kadianakis
52edea121e Fold in a changes file and update exceptions.txt.
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11 16:13:25 +03:00
George Kadianakis
1797d05165 Merge branch 'tor-github/pr/1925' 2020-06-10 15:37:59 +03:00
Mike Perry
963c3591c8 Bug 30992: Changes file 2020-06-10 15:37:44 +03:00
Nick Mathewson
354f085e5f Merge remote-tracking branch 'tor-github/pr/1888/head' 2020-06-09 15:44:58 -04:00
Nick Mathewson
1fb9be5396 Merge remote-tracking branch 'tor-github/pr/1902/head' 2020-06-05 10:08:27 -04:00
Nick Mathewson
1e98d56617 sandbox: Do not require M_SYSCALL.
M_SYSCALL is used to report information about a sandbox violation,
but when we don't have a definition for it, it still makes sense to
compile.

Closes ticket 34382.
2020-06-04 12:08:02 -04:00
Nick Mathewson
b335ef1781 changes file for ticket 32888 2020-06-04 10:35:51 -04:00
George Kadianakis
6b05d447bb Merge branch 'tor-github/pr/1909' into maint-0.4.3 2020-06-02 14:05:33 +03:00
George Kadianakis
22a26a273e Merge branch 'tor-github/pr/1909' 2020-06-02 14:01:49 +03:00
Nick Mathewson
b6e60f26dd Merge branch 'maint-0.4.3' 2020-06-01 09:50:04 -04:00
Nick Mathewson
688d1b3f03 Merge remote-tracking branch 'tor-github/pr/1905/head' into maint-0.4.3 2020-06-01 09:47:37 -04:00
Roger Dingledine
39f2411b3f Preemptive circs should work with UseEntryGuards 0
Resume being willing to use preemptively-built circuits when
UseEntryGuards is set to 0. We accidentally disabled this feature with
that config setting (in our fix for #24469), leading to slower load times.

Fixes bug 34303; bugfix on 0.3.3.2-alpha.
2020-05-30 02:20:48 -04:00
George Kadianakis
6891d1bbcb Merge branch 'tor-github/pr/1792' into maint-0.4.3 2020-05-28 12:25:57 +03:00
David Goulet
ca356b952e changes: Add changes file for ticket 33458
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-28 12:25:42 +03:00
George Kadianakis
8d8a9d7f1d Merge branch 'tor-github/pr/1898' 2020-05-27 15:17:55 +03:00
Neel Chauhan
f6943d702c Add changes file for ticket #24844 2020-05-27 15:16:39 +03:00
Roger Dingledine
d6186c7435 Man page: MinUptimeHidServDirectoryV2 defaults to 96 hours
Bugfix on 0.2.6.3-alpha; fixes bug 34299.
2020-05-23 04:37:57 -04:00
Nick Mathewson
43f4324e29 Merge remote-tracking branch 'tor-github/pr/1899/head' 2020-05-21 10:08:48 -04:00
George Kadianakis
3121e5c103 Merge branch 'tor-github/pr/1850' 2020-05-21 16:24:32 +03:00
George Kadianakis
fb281daf29 Merge branch 'tor-github/pr/1861' 2020-05-21 16:22:47 +03:00
rl1987
17c4e489e9 Add changes file 2020-05-21 13:43:37 +03:00
Damon Harris
c4fb3bfed5 Add support for console control signals in Windows 2020-05-20 23:28:39 +05:30
Nick Mathewson
9b55a62e73 Merge branch 'maint-0.4.3' 2020-05-19 09:39:12 -04:00
Nick Mathewson
68fe8826dd Doxygen: fix unbalanced groups.
Closes ticket 34255.
2020-05-19 09:18:39 -04:00
teor
1df451aba1 changes: file for 34200 2020-05-18 22:12:26 +10:00
teor
3efe53562f rust/protover: Fix protocol version support error handling
Make Rust protocol version support checks consistent with the
undocumented error behaviour of the corresponding C code.

Fixes bug 34251; bugfix on 0.3.3.5-rc.
2020-05-18 21:50:35 +10:00
teor
f05c144d7c rust: declare HSIntro=5
Declare support for the onion service introduction point denial of
service extensions, when building tor with Rust.

Fixes bug 34248; bugfix on 0.4.2.1-alpha.
2020-05-18 20:16:11 +10:00
Nick Mathewson
db4815dd8e Merge branch 'maint-0.4.3' 2020-05-15 10:28:36 -04:00
Nick Mathewson
6f2b6ede1b Add a changes file for 34233.
This bug was merged back to 0.3.5 with our #34078 fix, but only
released in 0.4.3.5, so the changes file goes here.
2020-05-15 10:27:49 -04:00
Nick Mathewson
85cfd04c0c remove changes files that have already appeared in 0.4.3. 2020-05-14 20:29:00 -04:00
teor
4d2822ee74 changes: file for 33222 and 33226 2020-05-13 16:05:54 +10:00
Nick Mathewson
1557e73c82 Merge branch 'bug34130_035' 2020-05-12 12:58:19 -04:00
Daniel Pinto
2913dbd6d9 Fix crash when tor is compiled with NSS and seccomp sandbox is enabled
Adds seccomp rules for socket and getpeername used by NSS
2020-05-12 12:56:06 -04:00
Nick Mathewson
86b5bcd80a Merge remote-tracking branch 'tor-github/pr/1885/head' 2020-05-12 12:52:41 -04:00
Daniel Pinto
cc169eb120 Add documentation about %include and seccomp sandbox limitations 2020-05-08 00:21:12 +01:00
Nick Mathewson
b7a165228f Merge remote-tracking branch 'tor-github/pr/1880/head' 2020-05-07 08:19:11 -04:00
Neel Chauhan
0daa1da3ba Define and use TOR_ADDRPORT_BUF_LEN 2020-05-07 20:38:25 +10:00
Nick Mathewson
3a785dd5be Merge branch 'maint-0.4.3' 2020-05-06 17:17:19 -04:00
Nick Mathewson
b444096be5 Fix a boolean logic error when logging about invalid hostnames.
Fixes bug 34131; bugfix on 0.4.3.1-alpha.
2020-05-06 17:15:37 -04:00
Nick Mathewson
e39b35f1de Merge branch 'maint-0.4.3' 2020-05-06 16:58:12 -04:00
Nick Mathewson
ae1ebb5f44 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-05-06 16:58:12 -04:00
Nick Mathewson
d46f67ef0e Merge branch 'maint-0.4.1' into maint-0.4.2 2020-05-06 16:58:12 -04:00
Nick Mathewson
633366efcd Merge branch 'maint-0.3.5' into maint-0.4.1 2020-05-06 16:58:12 -04:00
Nick Mathewson
dd795fbee4 changes file for bug 34078. 2020-05-06 16:58:06 -04:00
Alex Xu (Hello71)
42dfcd0ae3 core/or: Lift slow call out of loop, #33977 2020-05-05 15:07:42 -04:00
David Goulet
2e519fbfb0 changes: File for #33789
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05 14:24:04 -04:00