Commit Graph

9996 Commits

Author SHA1 Message Date
Nick Mathewson
d159bdb0f4 Add a colon to ticket40249 changes entry 2021-02-08 10:31:18 -05:00
Neel Chauhan
2391c60c5c Add stream ID to ADDRMAP control event 2021-02-08 10:23:41 -05:00
George Kadianakis
d4255253b0 Merge remote-tracking branch 'tor-gitlab/mr/212' 2021-02-08 13:03:07 +02:00
Alexander Færøy
49c61c1bb8 Delete changes/40241_v2 as it breaks CI.
Unreviewed build fix. Discussed the cnage on IRC with Nick.
2021-02-05 19:18:13 +00:00
George Kadianakis
0ba0d738a8 Merge remote-tracking branch 'tor-gitlab/mr/279' 2021-02-02 15:25:22 +02:00
Nick Mathewson
1eec42dee4 Remove changes files merged in 0455-rc 2021-01-29 17:11:13 -05:00
David Goulet
b2434d30d2 Merge branch 'tor-gitlab/mr/285' into ticket2667_044_01 2021-01-29 14:54:21 -05:00
David Goulet
705fd37875 Merge branch 'tor-gitlab/mr/284' into ticket2667_043_01 2021-01-29 14:51:38 -05:00
David Goulet
ec9575944a Merge branch 'maint-0.4.5' 2021-01-29 14:40:56 -05:00
Roger Dingledine
632688c797 exit: Deny re-entry into the network
Exit relays now reject exit attempts to known relay addresses + ORPort and
also to authorities on the ORPort and DirPort.

Closes #2667

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29 14:28:54 -05:00
Roger Dingledine
93ac6ec4d3 exit: Deny re-entry into the network
Exit relays now reject exit attempts to known relay addresses + ORPort and
also to authorities on the ORPort and DirPort.

Closes #2667

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29 14:19:17 -05:00
David Goulet
ea38016202 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:46:31 -05:00
David Goulet
79cb47cfc2 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:46:31 -05:00
David Goulet
9556276f07 Merge branch 'tor-gitlab/mr/50' into maint-0.3.5 2021-01-28 12:46:24 -05:00
David Goulet
be81ecba3a Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:42:31 -05:00
David Goulet
f058db1f3d Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:42:31 -05:00
David Goulet
290007e3c4 Merge branch 'tor-gitlab/mr/239' into maint-0.3.5 2021-01-28 12:42:26 -05:00
David Goulet
a3f2bc8f13 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:36:42 -05:00
David Goulet
f3da5f88d7 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:36:42 -05:00
David Goulet
02bd135cb1 Merge branch 'tor-gitlab/mr/243' into maint-0.3.5 2021-01-28 12:36:35 -05:00
David Goulet
1887231afb Merge branch 'tor-gitlab/mr/256' into maint-0.4.4 2021-01-28 12:12:01 -05:00
David Goulet
5c89197c9f Merge branch 'tor-gitlab/mr/255' into maint-0.4.3 2021-01-28 12:11:33 -05:00
David Goulet
1bdccc03a9 Merge branch 'tor-gitlab/mr/254' into maint-0.3.5 2021-01-28 12:10:39 -05:00
David Goulet
6186288eb6 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:08:20 -05:00
David Goulet
045db909c2 Merge remote-tracking branch 'tor-gitlab/mr/140' into maint-0.3.5 2021-01-28 12:08:14 -05:00
David Goulet
737cd79c42 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:04:42 -05:00
David Goulet
a17be1b5b6 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:04:42 -05:00
David Goulet
c6fb26695b Merge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5 2021-01-28 12:04:37 -05:00
Neel Chauhan
a82b4eb305 src/core/mainloop: Put brackets around IPv6 addresses in log messages 2021-01-27 08:23:39 -08:00
David Goulet
a634f6b64c dos: Move config options within the subsystem
Closes #40261

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-27 10:37:36 -05:00
Nick Mathewson
b019c83853 Merge branch 'maint-0.4.5' 2021-01-27 09:36:39 -05:00
David Goulet
2e600019ea relay: Don't trigger an address discovery without an ORPort
We would before do an address discovery and then a lookup in the cache if not
found which is now simplified by calling relay_find_addr_to_publish() directly
which does all those combined.

Furthermore, by doing so, we won't trigger an address discovery every minute
if we have no ORPort configured for the family.

Fixes #40254

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-27 09:36:17 -05:00
George Kadianakis
dbbd603313 Merge remote-tracking branch 'tor-gitlab/mr/248' 2021-01-27 15:43:01 +02:00
George Kadianakis
a7ca089343 Merge remote-tracking branch 'tor-gitlab/mr/247' 2021-01-27 15:39:29 +02:00
Nick Mathewson
930a17f347 Remove changes files for entries that have appeared in an 045 changelog. 2021-01-22 15:25:04 -05:00
Alexander Færøy
d2c2204b2a Slightly reword the changes file and rename it. 2021-01-22 13:22:14 +00:00
Hello71
2e76b02401 path: fix directory special case 2021-01-22 13:19:52 +00:00
George Kadianakis
74cfe3611f Merge branch 'maint-0.4.5' 2021-01-22 00:21:21 +02:00
George Kadianakis
4cbd22f1a7 Merge branch 'mr/251' into maint-0.4.5 2021-01-22 00:21:09 +02:00
George Kadianakis
5d711450dd Changes file for #40238. 2021-01-21 23:17:31 +02:00
David Goulet
e06a0e904c Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-21 16:07:16 -05:00
David Goulet
2a3cf37450 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-21 16:06:54 -05:00
David Goulet
c09f8da8a9 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-21 16:06:54 -05:00
David Goulet
8500700aa4 build: Add "make lsp" command
Generates the compile_commands.json file using the "bear" application so the
ccls server can be more efficient with our code base.

Closes #40227

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-21 16:06:31 -05:00
David Goulet
9be33755ef Merge branch 'maint-0.4.5' 2021-01-21 14:58:39 -05:00
David Goulet
c54f4b81da Merge branch 'tor-gitlab/mr/270' into maint-0.4.5 2021-01-21 14:58:31 -05:00
Roger Dingledine
633b68bfe2 log more during consensus voting process
Give more visibility to directory authority operators during the consensus
voting process.

Closes ticket 40245.
2021-01-21 13:46:56 -05:00
Nick Mathewson
b2536c97f9 Merge branch 'maint-0.4.5' 2021-01-21 13:40:46 -05:00
Nick Mathewson
08c0ef61d8 fix changes file 2021-01-21 13:39:40 -05:00
Nick Mathewson
3d952b461d Merge remote-tracking branch 'tor-gitlab/mr/269' into maint-0.4.5 2021-01-21 13:37:21 -05:00
Nick Mathewson
2243fc3ad1 Merge branch 'maint-0.4.5' 2021-01-21 13:19:49 -05:00
Nick Mathewson
9390e2bf83 Merge remote-tracking branch 'tor-gitlab/mr/268' into maint-0.4.5 2021-01-21 13:10:16 -05:00
David Goulet
8a27860720 Merge branch 'maint-0.4.5' 2021-01-21 12:27:34 -05:00
David Goulet
7b102d53e3 Merge branch 'tor-gitlab/mr/265' into maint-0.4.5 2021-01-21 12:27:27 -05:00
David Goulet
2c4355fcec changes: Align text in bug40236
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 16:26:28 -05:00
David Goulet
61803775e8 Merge branch 'tor-gitlab/mr/264' 2021-01-20 16:22:36 -05:00
David Goulet
7692f443d4 config: Remove Bridge <-> ClientTransportPlugin validation
This validation was only done if DisableNetwork was off because we would use
the global list of transports/bridges and DisableNetwork would not populate
it.

This was a problem for any user using DisableNetwork which includes Tor
Browser and thus leading to the Bug() warning.

Without a more in depth refactoring, we can't do this validation without the
global list.

The previous commit makes it that any connection to a bridge without a
transport won't happen thus we keep the security feature of not connecting to
a bridge without its corresponding transport.

Related to #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 15:56:19 -05:00
Alexander Færøy
c38c36e5f1 Limit the number of items in the consdiffmgr on Windows.
This patch limits the number of items in the consensus diff cache to 64
on the Windows platform. Hopefully, this will allow us to investigate a
smarter fix while avoiding the situation reported in tor#24857 where
Windows relay operators report Tor using 100% CPU.

See: tor#24857
2021-01-20 16:33:17 +00:00
Nick Mathewson
b0af4ddc7c Merge branch 'maint-0.4.5' 2021-01-19 13:20:43 -05:00
Nick Mathewson
27ee12836d Merge remote-tracking branch 'tor-gitlab/mr/261' into maint-0.4.5 2021-01-19 13:20:31 -05:00
Nick Mathewson
b7f886beb4 Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.3 2021-01-19 12:53:44 -05:00
Nick Mathewson
faf7b550e7 Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5 2021-01-19 12:53:30 -05:00
Nick Mathewson
5f53e013cd Merge branch 'maint-0.4.5' 2021-01-19 12:49:31 -05:00
Nick Mathewson
6c1bc570cf Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-19 12:49:31 -05:00
Nick Mathewson
4c82c2d1d4 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-19 12:49:22 -05:00
Nick Mathewson
a22bfe04bc Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-19 12:45:07 -05:00
Alexander Færøy
13cf964453 Remove unnecessary non-fatal assertion.
This patch removes a call to `tor_assert_nonfatal()` if
`extend_info_from_node()` returns NULL. This is unnecessary as we
already handle the case where `info` is NULL in the next `if (!info) {
... }` block in the code.

See: tor#32666.
2021-01-19 17:08:01 +00:00
Nick Mathewson
4961645254 Merge branch 'maint-0.4.5' 2021-01-19 12:02:28 -05:00
Nick Mathewson
f79a31f6d5 Merge remote-tracking branch 'tor-gitlab/mr/260' into maint-0.4.5 2021-01-19 12:02:21 -05:00
Nick Mathewson
85c4087de9 Merge branch 'maint-0.4.5' 2021-01-19 12:00:06 -05:00
Ali Raheem
07f37c64f8 Bugfix for 40236
Make configure script minireport accurate automatic detection and usage of liblzma and libzstd
2021-01-18 19:37:26 +00:00
David Goulet
691c717187 Revert "IPv6 sybil: consider addresses in the same /64 to be equal."
This reverts commit d07f17f676.

We don't want to consider an entire routable IPv6 network as sybil if more
than 2 relays happen to be on it. For path selection it is very important but
not for selecting relays in the consensus.

Fixes #40243
2021-01-15 12:57:57 -05:00
David Goulet
f0c29f0883 relay: Don't BUG() if we can't find authority descriptor
We can end up trying to find our address from an authority while we don't have
yet its descriptor.

In this case, don't BUG() and just come back later.

Closes #40231

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-14 10:02:03 -05:00
Nick Mathewson
fa8ecf8820 Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
This one should work on GCC _and_ on Clang.  The previous version
made Clang happier by not having unreachable "fallthrough"
statements, but made GCC sad because GCC didn't think that the
unconditional failures were really unconditional, and therefore
_wanted_ a FALLTHROUGH.

This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that
seems to please both GCC and Clang in this case: ordinarily it is a
FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an
abort().

Fixes bug 40241 again.  Bugfix on earlier fix for 40241, which was
merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
2021-01-13 09:54:43 -05:00
David Goulet
c5817a0daf m4: Change LIBS order of TOR_SEARCH_LIBRARY()
Some gcc versions do explode if the order of the linker flags are not correct.
One issue was statically building OpenSSL which would require that "-lssl
-lcrypto" be put _before_ the "-lpthread -ldl" flags.

I have not such problem with GCC 10 but does with GCC 9.

Closes #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-13 09:52:10 -05:00
George Kadianakis
cc30c09f7c Merge branch 'mr/236' 2021-01-13 15:23:54 +02:00
Nick Mathewson
fb3704b459 New consensus method to find bwweightscale & maxunmeasuredbw correctly.
Our original code for parsing these parameters out of our list of
parameters pre-dated us having the
dirvote_get_intermediate_param_value() function... and it was buggy.
Specifically, it would reject any " ... K=V ..." value
where there were additional unconverted characters after the V, and
use the default value instead,

We haven't run into this yet because we've never voted for
bwweightscale to be anything besides the default 10000, or
maxunmeasuredbw to be anything besides the default 20.

This requires a new consensus method because it is a change in how
consensuses are computed.

Fixes bug 19011; bugfix on 0.2.2.10-alpha.
2021-01-13 15:23:27 +02:00
George Kadianakis
42e95c8d85 Merge branch 'maint-0.4.5' 2021-01-12 18:05:32 +02:00
David Goulet
9b59ede8d3 Merge branch 'ticket40237_044_01' into ticket40237_045_01 2021-01-12 10:55:21 -05:00
David Goulet
b3652f2104 Merge branch 'ticket40237_043_01' into ticket40237_044_01 2021-01-12 10:54:31 -05:00
David Goulet
60da5d6222 Merge branch 'ticket40237_035_01' into ticket40237_043_01 2021-01-12 10:46:25 -05:00
David Goulet
04b0263974 hs-v3: Require reasonably live consensus
Some days before this commit, the network experienced a DDoS on the directory
authorities that prevented them to generate a consensus for more than 5 hours
straight.

That in turn entirely disabled onion service v3, client and service side, due
to the subsystem requiring a live consensus to function properly.

We know require a reasonably live consensus which means that the HSv3
subsystem will to its job for using the best consensus tor can find. If the
entire network is using an old consensus, than this should be alright.

If the service happens to use a live consensus while a client is not, it
should still work because the client will use the current SRV it sees which
might be the previous SRV for the service for which it still publish
descriptors for.

If the service is using an old one and somehow can't get a new one while
clients are on a new one, then reachability issues might arise. However, this
is a situation we already have at the moment since the service will simply not
work if it doesn't have a live consensus while a client has one.

Fixes #40237

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-12 09:46:35 -05:00
Nick Mathewson
9c268b66ba Merge branch 'maint-0.4.5' 2021-01-11 14:46:13 -05:00
Nick Mathewson
5a822b462a Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-11 14:37:29 -05:00
Nick Mathewson
d1f4741606 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-11 14:37:29 -05:00
Nick Mathewson
4b39f46a61 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-11 14:37:28 -05:00
Nick Mathewson
ccdbbae4ec Fix warnings in current debian-hardened CI.
We're getting "fallback annotation annotation in unreachable code"
warnings when we build with ALL_BUGS_ARE_FATAL. This patch fixes
that.

Fixes bug 40241.  Bugfix on 0.3.5.4-alpha.
2021-01-11 14:25:56 -05:00
Neel Chauhan
3d993d4d85 Do not require a valid torrc for 2021-01-06 10:41:27 -08:00
Neel Chauhan
1811bded77 Downgrade the severity of a few rendezvous circuit-related warnings. 2020-12-24 11:32:03 -08:00
David Goulet
e7da681034 Merge branch 'maint-0.4.5' 2020-12-21 14:55:44 -05:00
David Goulet
aae9a05a01 relay: Log address suggested by directory authorities
If we get an address suggestion from a directory authority and we have no
address configured or discovered, log it at notice level so the operator can
learn what address will be used by Tor.

Fixes #40201

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-21 14:41:52 -05:00
Nick Mathewson
ad00da663e Merge branch 'mr_240_squashed' into maint-0.4.5 2020-12-21 13:25:52 -05:00
Nick Mathewson
cce7d1edaf Merge branch 'mr_240_squashed' 2020-12-21 13:23:42 -05:00
David Goulet
c934fced31 relay: Report the entire content of a stats file
It turns out that 9 years ago, we stopped appending data into stats file and
rather overwrite everytime we have new stats (see commit
a6a127c833)

The load_stats_file() function was still thinking that we could have the same
line many times in the file which turns out to be false since 9 years ago.
However, that did not cause problem until IPv6 connection stats came along
which introduced a new line in conn-stats: "ipv6-conn-bi-direct ...".

Before, that file contained a single line starting with the tag
"conn-bi-direct".  That very tag appears also in the IPv6 tag (see above) so
the load_stats_file() function would consider that the IPv6 line as the last
tag to be appeneded to the file and fail to report the line above (for IPv4).
It would actually truncate the IPv6 line and report it (removing the "ipv6-"
part).

In other words, "conn-bi-direct" was not reported and instead
"ipv6-conn-bi-direct" was used without the "ipv6-" part.

This commit refactors the entire function so that now it looks for a
"timestamp tag" to validate and then if everything is fine, returns the entire
content of the file. The refactor simplifies the function, adds logging in
case of failures and modernize it in terms of coding standard.

Unit tests are also added that makes sure the loaded content matches the
entire file if timestamp validation passes.

Fixes #40226

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-21 13:18:20 -05:00
Alexander Færøy
db5f7b4250 Merge remote-tracking branch 'tor-gitlab/mr/211' 2020-12-18 14:22:23 +00:00
Alexander Færøy
b645fbdb54 Merge remote-tracking branch 'tor-gitlab/mr/207' 2020-12-18 14:19:24 +00:00
David Goulet
5527aef56f Merge branch 'maint-0.4.5' 2020-12-17 08:25:29 -05:00
David Goulet
d45354d5ea Merge branch 'tor-gitlab/mr/243' into maint-0.4.5 2020-12-17 08:25:18 -05:00
George Kadianakis
d89974c5c6 Fix Keccak undefined behavior on exotic platforms.
Bug reported and diagnosed in:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975977

Fixes bug #40210.
2020-12-17 13:49:17 +02:00
Alexander Færøy
0bd4cd8101 Merge remote-tracking branch 'tor-gitlab/mr/230' 2020-12-16 20:55:03 +00:00
Alexander Færøy
66597b9291 Merge branch 'maint-0.4.5' 2020-12-16 20:39:01 +00:00
Alexander Færøy
5a2d01ae57 Merge branch 'tor-gitlab/mr/234' into maint-0.4.5 2020-12-16 20:38:23 +00:00
David Goulet
ee6ad0e592 config: Catch missing Bridge for ClientTransportPlugin
When making sure we have a Bridge line with a ClientTransportPlugin, we
now check in the managed proxy list and so we can catch any missing
ClientTransportPlugin for a Bridge line.

Fixes #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-16 20:37:57 +00:00
Alexander Færøy
2d68fdc94c Merge branch 'maint-0.4.5' 2020-12-16 20:29:19 +00:00
Alexander Færøy
7998ea2f18 Merge remote-tracking branch 'tor-gitlab/mr/237' into maint-0.4.5 2020-12-16 20:29:03 +00:00
David Goulet
8b2d32435d build: Add "make lsp" command
Generates the compile_commands.json file using the "bear" application so the
ccls server can be more efficient with our code base.

Closes #40227

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-16 19:19:12 +02:00
David Goulet
1430d5ff63 Merge branch 'maint-0.4.5' 2020-12-15 11:58:22 -05:00
David Goulet
4a77aa6e82 Merge branch 'tor-gitlab/mr/239' into maint-0.4.5 2020-12-15 11:58:13 -05:00
Nick Mathewson
c4fe66e342 Socks5: handle truncated client requests correctly
Previously, our code would send back an error if the socks5 request
parser said anything but DONE.  But there are other non-error cases,
like TRUNCATED: we shouldn't send back errors for them.

This patch lowers the responsibility for setting the error message
into the parsing code, since the actual type of the error message
will depend on what problem was encountered.

Fixes bug 40190; bugfix on 0.3.5.1-alpha.
2020-12-14 10:14:03 -05:00
Nick Mathewson
34baa1bdc3 Tweak the documentation for approved-routers
Document !badexit, and improve the documentation for !invalid.

Closes #40188.
2020-12-09 14:08:55 -05:00
Nick Mathewson
2bfb76b927 Merge branch 'mr_224_squashed' 2020-12-09 10:03:45 -05:00
Alexander Færøy
ed3f46a385 Announce URL to bridge status page when starting Tor as a bridge relay.
This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
2020-12-09 10:03:11 -05:00
David Goulet
6e83a52077 Merge branch 'maint-0.4.5' 2020-12-08 14:51:43 -05:00
David Goulet
e74f168bb4 relay: Avoid log reachability test for bandwidth test circuit
Fixes #40205

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-08 14:51:31 -05:00
George Kadianakis
f280c171e2 Merge branch 'mr/233' 2020-12-08 16:54:18 +02:00
Nick Mathewson
558aaf1c32 Command-line arguments: be better at detecting absent optional args.
Previously, "--list-fingerprint --quiet" was an error.  Now, the
handler for optional arguments to "--list-fingerprint" can tell that
"--quiet" is a flag, not an argument.

This only affects flags that take an _optional_ argument, so you can
still put your torrc file in a location starting with "-".

Closes #40223.
2020-12-08 16:53:57 +02:00
David Goulet
2d0a7f2e89 Merge branch 'maint-0.4.5' 2020-12-08 09:15:06 -05:00
David Goulet
c618c4f279 configure: Fix the --enable-static-tor switch
The "-static" compile flag was set globally which means that all autoconf test
were attempting to be built statically and lead to failures of detecting
OpenSSL libraries and others.

This commit adds this flag only to the "tor" binary build.

There is also a fix on where to find libevent.a since it is using libtool, it
is in .libs/.

At this commit, there are still warnings being emitted that informs the user
that the built binary must still be linked dynamically with glibc.

Fixes #40111

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-08 09:14:49 -05:00
Nick Mathewson
b50fcdc2e7 Changes file for #40213 / !227 2020-12-02 10:32:39 -05:00
Nick Mathewson
6c602026e8 Detect extra bytes in HAProxy inbuf when transitioning to OR handshake
This shouldn't be possible, but let's add it for defense-in-depth.

Closes #40017.
2020-12-02 10:07:26 -05:00
Nick Mathewson
94fc207d42 Remove changes files for things that went out in 0.4.5.2-alpha or earlier 2020-11-23 14:15:31 -05:00
Alexander Færøy
9bc0306b8c Merge branch 'maint-0.4.5' 2020-11-19 17:44:00 +00:00
Alexander Færøy
b274e46309 Merge branch 'maint-0.4.4' into maint-0.4.5 2020-11-19 17:44:00 +00:00
Alexander Færøy
77bb4b0838 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-19 17:43:59 +00:00
Alexander Færøy
2e7cbd7a9c Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3 2020-11-19 17:43:44 +00:00
Alexander Færøy
6ce2550468 Merge branch 'maint-0.4.5' 2020-11-19 17:41:05 +00:00
Nick Mathewson
ad4a68bf35 Mention bug number in changes file. 2020-11-19 10:46:29 -05:00
Nick Mathewson
c4e0b28ecb Merge remote-tracking branch 'tor-gitlab/mr/214' into master 2020-11-19 10:42:04 -05:00
David Goulet
ea52705e4b config: Bridge line with a transport must have a ClientTransportPlugin
Fixes #25528

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-18 11:31:37 -05:00
George Kadianakis
34feedea60 Merge remote-tracking branch 'tor-gitlab/mr/216' 2020-11-18 12:37:02 +02:00
David Goulet
16351d655d sendme: Turn log warning into debug
When sending the stream level SENDME, it is possible the cirucit was marked
for close or any other failures that can occur. These events can occur
naturally.

Fixes #40142

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 13:23:34 -05:00
David Goulet
0921fdf633 Merge branch 'maint-0.4.5' into master 2020-11-17 12:25:56 -05:00
David Goulet
07006785fd Merge branch 'tor-gitlab/mr/203' into maint-0.4.5 2020-11-17 12:25:48 -05:00
Neel Chauhan
1588767e65 Allow listing ed25519 fingerprints on the command line 2020-11-17 11:23:08 -05:00
Nick Mathewson
3900b19379 Merge branch 'maint-0.4.5' into master 2020-11-17 10:53:39 -05:00
David Goulet
7c06707750 Merge branch 'tor-gitlab/mr/182' into master 2020-11-17 10:36:05 -05:00
David Goulet
d04a27bed2 config: Really ignore non ORPorts when removing duplicates
The function in charge of removing duplicate ORPorts from our configured ports
was skipping all non ORPorts port but only for the outer loop thus resulting
in comparing an ORPort with a non-ORPort which lead to problems.

For example, tor configured with the following would fail:

  ORPort auto
  DirPort auto

Both end up being the same configuration except that one is a OR listener and
one is a Dir listener. Thus because of the missing check in the inner loop,
they looked exactly the same and thus one is removed.

Fixes #40195

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 09:40:16 -05:00
Nick Mathewson
6c61011781 Merge remote-tracking branch 'tor-gitlab/mr/184' into master 2020-11-17 08:22:44 -05:00
Nick Mathewson
b13f32ee97 Merge branch 'ticket40071_045_01_squashed' into master 2020-11-17 07:58:37 -05:00
David Goulet
9aaac94cc3 changes: Add file for #40071
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 07:58:26 -05:00
Guinness
4382e977f7
Add the compiler name, version and libs used to compile
This changes the behaviour of `tor --version` in such a way.
```console
src/app/tor --version
Tor version 0.4.5.1-alpha-dev (git-46ccde66a97d7985).
Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1h, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.5 and Glibc 2.31 as libc.
Tor compiled with GCC version 10.2.0
```

Fixes #32102
2020-11-17 10:43:00 +01:00
Nick Mathewson
c79957581e Merge branch 'maint-0.4.4' into master 2020-11-16 22:42:23 -05:00
Nick Mathewson
9001732394 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-16 22:42:22 -05:00
Nick Mathewson
7c0778ef7e Merge branch 'maint-0.3.5' into maint-0.4.3 2020-11-16 22:42:22 -05:00
Nick Mathewson
fcae26adf7 Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5 2020-11-16 22:42:15 -05:00
Neel Chauhan
8785a75e2f Give a descriptive error message with "tor-gencert --create-identity-key" 2020-11-16 09:35:23 -08:00
Neel Chauhan
3057671a38 Add changes file for ticket 40084 2020-11-15 16:03:04 -08:00
David Goulet
d425dbf04a port: Don't ignore ports of a different family
Commit c3a0f75796 added this feature for ORPort
that we ignore any port that is not the family of our default address when
parsing the port. So if port_parse_config() was called with an IPv4 default
address, all IPv6 address would be ignored.

That makes sense for ORPort since we call twice port_parse_config() for
0.0.0.0 and [::] but for the rest of the ports, it is not good since a
perfectly valid configuration can be:

  SocksPort 9050
  SocksPort [::1]:9050

Any non-ORPort only binds by default to an IPv4 except the ORPort that binds
to both IPv4 and IPv6 by default.

The fix here is to always parse all ports within port_parse_config() and then,
specifically for ORPort, remove the duplicates or superseding ones. The
warning is only emitted when a port supersedes another.

A unit tests is added to make sure SocksPort of different family always exists
together.

Fixes #40183

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-13 08:38:22 -05:00
Daniel Pinto
877dbfc056 Use SRWLocks to implement locking on Windows #17927
Replace the Windows locking implementation which used critical
sections with the faster SRWLocks available since Vista.
2020-11-12 19:50:55 +00:00
Neel Chauhan
d1494d140c Remove orconn_ext_or_id_map and related functions 2020-11-12 11:19:21 -08:00
Neel Chauhan
46ccde66a9 Use connection_or_change_state() in v3 handshaking state change 2020-11-12 12:06:34 -05:00
Nick Mathewson
ffa7b15950 Deliberately close OR connections if proxies leave extra data
We already did this, but we did it by accident, which is pretty
risky: if we hadn't, then our code would have treated extra data in
the inbuf as having been transmitted as TLS-authenticated data.

Closes ticket 40017; Found by opara.
2020-11-12 11:07:33 -05:00
Nick Mathewson
f2168d28f7 Fake the current time when we're loading TEST_DESCRIPTORS.
Fixes bug 40187; bugfix on 0.4.5.1-alpha.
2020-11-12 09:28:27 -05:00
Nick Mathewson
7d8290f0ac Merge remote-tracking branch 'tor-gitlab/mr/183' into master 2020-11-12 08:47:05 -05:00
Nick Mathewson
9306ac5aa8 changes file for bug 40172. 2020-11-10 17:29:37 -05:00
Nick Mathewson
ec0f000445 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-09 16:17:42 -05:00
Nick Mathewson
0b2c64effd Merge branch 'maint-0.3.5' into maint-0.4.3 2020-11-09 16:13:42 -05:00
Nick Mathewson
52e439c13e Merge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5 2020-11-09 16:13:24 -05:00
Alexander Færøy
faa96f9a8e Merge remote-tracking branch 'tor-gitlab/mr/193' 2020-11-09 14:15:07 +00:00
Alexander Færøy
5e65a746aa Merge remote-tracking branch 'tor-gitlab/mr/190' 2020-11-09 14:12:45 +00:00
Nick Mathewson
4154158d79 Make config/parse_tcp_proxy_line work in the presence of DNS hijacking
We can use our existing mocking functionality to do this: We have
been in this position before.

Fixes part of #40179; bugfix on 0.4.3.1-alpha.
2020-11-05 09:47:32 -05:00
Nick Mathewson
31a6a101a0 Handle a change in the implementation of hashlib in Python 3.9
Previously, hashlib.shake_256 was a class (if present); now it can
also be a function.  This change invalidated our old
compatibility/workaround code, and made one of our tests fail.

Fixes bug 40179; bugfix on 0.3.1.6-rc when the workaround code was
added.
2020-11-05 09:34:36 -05:00
George Kadianakis
dd119b277b Merge remote-tracking branch 'tor-gitlab/mr/185' into master 2020-11-03 16:06:12 +02:00
David Goulet
486ddde2c4 configure: Check STAP_PROBEV macro when building with USDT tracing
It turns out that STAP_PROBEV() is not available on FreeBSD thus having
sdt/sdt.h is not enough. Look for it now at configure time.

Closes #40174

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03 09:05:53 -05:00
George Kadianakis
4f5a116618 Merge remote-tracking branch 'tor-gitlab/mr/187' into master 2020-11-03 13:04:09 +02:00
George Kadianakis
f2da7b05b0 Add changes file for v3 metrics.
Closes ticket #23126.
2020-11-03 11:12:17 +02:00
David Goulet
474369e3fa Merge branch 'tor-gitlab/mr/186' 2020-11-02 13:14:02 -05:00
David Goulet
8b240fbe40 Merge branch 'tor-gitlab/mr/188' 2020-11-02 13:09:15 -05:00
Nick Mathewson
7a75a1064f Fix another duplicate typedef.
Fixes #40177; bugfix on 0.4.5.1-alpha.
2020-11-02 07:15:10 -05:00
Daniel Pinto
f3b9be4422 Implement WIN32 tor_cond_wait using condition variables #30187
Fix bug where running a relay on Windows would use 100% CPU
after some time. Makes Windows >= Vista the required Windows
version to build and run tor.
2020-11-01 03:10:25 +00:00
Nick Mathewson
7e56f80376 Start a changelog for 0.4.5.1-alpha. 2020-10-30 10:57:21 -04:00
Nick Mathewson
148b5b03a3 Merge branch 'bug40080_035' 2020-10-30 10:51:20 -04:00
George Kadianakis
54e6109499 Merge remote-tracking branch 'tor-gitlab/mr/174' into master 2020-10-30 14:14:14 +02:00
Nick Mathewson
f7d0bde4f0 Remove "GETINFO network-status".
It was deprecated 0.3.1.1-alpha.

According to #22473, nothing uses it.

Closes #22473.
2020-10-28 11:48:23 -04:00
Alexander Færøy
b0e6ec627c Merge branch 'maint-0.4.3' into maint-0.4.4 2020-10-28 15:39:37 +00:00
Alexander Færøy
4876409c2a Merge branch 'maint-0.3.5' into maint-0.4.3 2020-10-28 15:39:37 +00:00
Nick Mathewson
3f442987f1 Log a warning if Tor was built with any "risky" compile-time options
These options are meant for testing builds only, and are likely to
cause trouble if used in a production environment.

Closes #18888.
2020-10-28 11:34:30 -04:00
Alexander Færøy
c37d05d0c6 Merge remote-tracking branch 'tor-gitlab/mr/171' 2020-10-28 15:15:39 +00:00
Nick Mathewson
c48d25ac8d Fix a previously overstrict log message check.
OpenSSL doesn't seem to report error locations in the same way as
before, which broke one of our tests.

Fixes bug 40170; bugfix on 0.2.8.1-alpha.
2020-10-28 10:47:39 -04:00
Nick Mathewson
59f76a8a1f Changes file for #40165 (openssl deprecation warnings) 2020-10-28 10:34:22 -04:00
Nick Mathewson
511822529a Revise fix for bug 32178 (spaces at end of log msg).
The loop in the earlier patch would invoke undefined behavior in two
ways: First, it would check whether it was looking at a space before
it checked whether the pointer was in-range.  Second, it would let a
pointer reach a position _before_ the start of a string, which is
not allowed.

I've removed the assertion about empty messages: empty messages can
be their own warning IMO.

I've also added tests for this formatting code, to make sure it
actually works.
2020-10-28 09:41:51 -04:00
Amadeusz Pawlik
4520fbc05e adds change file 2020-10-28 09:09:00 -04:00
Neel Chauhan
09b3af578d Stop forcing IPv4 and IPv6 traffic on non-SOCKSPorts 2020-10-27 17:57:48 -07:00
Neel Chauhan
0c79cddc6b Avoid asserts with flag 2020-10-27 14:47:42 -07:00
David Goulet
f2e4204590 changes: File for ticket 40063, the MetricsPort
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
26cfac1880 Merge branch 'tor-gitlab/mr/176' into maint-0.4.4 2020-10-27 10:18:16 -04:00
David Goulet
6338fc2afa Merge branch 'tor-gitlab/mr/173' 2020-10-27 09:43:04 -04:00
David Goulet
683c794273 Merge branch 'tor-gitlab/mr/176' 2020-10-27 09:36:16 -04:00
Nick Mathewson
c90535c539 Merge branch 'maint-0.4.4' 2020-10-26 16:39:31 -04:00
Nick Mathewson
c1bcc1da03 Make ticket40164 compliant with style 2020-10-26 16:39:24 -04:00
George Kadianakis
07f2a06c61 Merge remote-tracking branch 'tor-gitlab/mr/169' into master 2020-10-26 17:04:58 +02:00
Nick Mathewson
f43fe890dd Merge remote-tracking branch 'tor-gitlab/mr/127' 2020-10-23 11:47:40 -04:00
Nick Mathewson
fd58e74ddc Update required/recommended protocol lists more systematically
First I began with a set of candidates:

  The client's _required_ list starts with all the protocols
  supported by every release in 0.2.9-stable through current
  master.

  The client's _required_ list starts with all the protocols
  supported by every release in 0.3.5-stable through current
  master.

  Everybody's _recommended_ list starts with all the protocols
  supported by every release in 0.3.5-stable through current master.

Then I removed the protocol versions that we do not actually want to
require or recommend:

  DirCache=1 (deprecated)
  HSDir=1, HSIntro=1-3, HSRend=1 (deprecated)
  (All HS* protocol requirements for clients)
  Link=1-3 (deprecated)
  LinkAuth=1 (obsolete)
  Relay=1 (obsolete)
2020-10-23 11:23:08 -04:00
Nick Mathewson
2908086694 Merge branch 'combined_libs' 2020-10-23 10:33:07 -04:00
Nick Mathewson
e834702f9d Changes file for ticket 40127 2020-10-23 10:32:08 -04:00
Roger Dingledine
00118355f5 Turn ConsensusParams into a Linelist
Make it possible to specify multiple ConsensusParams torrc
lines.

Now directory authority operators can for example put the
main ConsensusParams config in one torrc file and then add to it
from a different torrc file.

Closes ticket 40164.
2020-10-22 03:26:03 -04:00
Nick Mathewson
c9ddf191cf Make "check-changes" work on bug32671. 2020-10-21 07:44:54 -04:00
Daniel Pinto
bb9707420e Allow mutiple lines on configuration for ROUTERSET entries. #28361
Affected entries are: EntryNodes, ExcludeNodes, ExcludeExitNodes,
ExitNodes, MiddleNodes, HSLayer2Nodes and HSLayer3Nodes.
2020-10-21 01:53:50 +01:00
Guinness
0668437b58
Set is_padding_timer_scheduled to 0
When calling `circpad_send_padding_cell_for_callback()`, the flag
`is_padding_timer_scheduled` was not resetted to 0 which caused an issue
in the circpad simulator.
This commit fixes this problem.

Fixes #32671.
2020-10-20 21:04:33 +02:00
Nick Mathewson
66cd12e044 reindent changes/ticket40053 2020-10-20 09:03:51 -04:00