Commit Graph

37778 Commits

Author SHA1 Message Date
David Goulet
ef7a64e3b8 hs-v2: Disable version 2 HSPOST and HSFETCH command
Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 11:18:08 -04:00
David Goulet
59bae7cbee hs-v2: Disable version 2 directory
Relay do not accept both stores and lookups of version 2 descriptor.
This effectively disable version 2 HSDir supports for relays.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:46:17 -04:00
David Goulet
ff3ac02702 hs-v2: Disable version 2 introduction point
Upon receiving a v2 introduction request, the relay will close the
circuit and send back a tor protocol error.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:40:19 -04:00
David Goulet
765bdb9c33 hs-v2: Disable version 2 service
The minimum service version is raised from 2 to 3 which effectively
disable loading or creating an onion service v2.

As for ADD_ONION, for version 2, a 551 error is returned:

  "551 Failed to add Onion Service"

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:38:08 -04:00
David Goulet
13b2b1108f hs-v2: Disable SOCKS connection for v2 addresses
This effectively turns off the ability of tor to use HSv2 as a client by
invalidating the v2 onion hostname passed through a SOCKS request.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:26:37 -04:00
Mike Perry
33d8974f4d Export the n_ewma function for flow control use. 2021-09-28 21:39:36 +00:00
Mike Perry
8f9cf1ec43 Export a global notion of monotime clock stall/jump.
Monotime clock functionality is a global property, and flow control
also needs to know if it can trust the clock.
2021-09-28 21:39:36 +00:00
Mike Perry
6868f30ced Add trunnel definitions for xon/xoff cells. 2021-09-28 21:26:10 +00:00
skaluzka
3f016bba12
Fix scripts/README file
Use "update_versions.py" instead of "updateVersions.pl" as a tool
for updating version numbers.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2021-09-28 22:07:59 +02:00
Simon South
1a10948260 test: Add sandbox unit tests 2021-09-28 11:06:52 -04:00
Simon South
3bc3a10895 configure.ac: Define ENABLE_COVERAGE macro
Allow conditional compilation based on whether the "--enable-coverage"
configure option was specified.
2021-09-28 11:06:52 -04:00
Simon South
fbf2e7e921 sandbox: Allow use with fragile hardening
When building with --enable-fragile-hardening, add or relax Linux
seccomp rules to allow AddressSanitizer to execute normally if the
process terminates with the sandbox active.

Further resolves issue 11477.
2021-09-28 11:06:50 -04:00
Simon South
352677556e configure.ac: Define ENABLE_FRAGILE_HARDENING macro
Allow conditional compilation based on whether the
"--enable-fragile-hardening" configure option was specified.
2021-09-27 12:13:47 -04:00
Neel Chauhan
b7992d4f79 bwauth: Add AuthDirDontVoteOnDirAuthBandwidth option to avoid giving weights to dirauths 2021-09-27 08:58:00 -07:00
Roger Dingledine
ecb91e75e4 one more pass over the changelog 2021-09-17 11:01:37 -04:00
Nick Mathewson
0877eee18c Run format_changelog. 2021-09-17 10:50:40 -04:00
Nick Mathewson
46094d1ec0 Edit changelog with a few grammar and simplicity fixes. 2021-09-17 10:50:23 -04:00
David Goulet
927f9a12a6 Bump version to 0.4.7.1-alpha
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-17 09:42:45 -04:00
David Goulet
9a7fe5d131 changelog: ChangeLog for 0.4.7.1-alpha release
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-17 09:42:45 -04:00
Nick Mathewson
2c10cc3080 Merge remote-tracking branches 'tor-gitlab/mr/439' and 'tor-gitlab/mr/441' 2021-09-16 08:53:28 -04:00
skaluzka
515ccc4a42
Update Tor's man 1 page
Add few missing periods, convert tabs to spaces.
No new significant content added.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2021-09-15 19:17:41 +02:00
Neel Chauhan
17ceeb7f92 tor.1 man page: Add mention of fingerprint-ed25519, and clarify differences 2021-09-14 11:10:11 -07:00
David Goulet
f728e09ebe Merge branch 'maint-0.4.5' into maint-0.4.6 2021-09-13 13:34:48 -04:00
David Goulet
7440a38846 Merge branch 'maint-0.4.6' 2021-09-13 13:34:48 -04:00
David Goulet
0dbb2f53b9 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-09-13 13:34:44 -04:00
Guinness
bd68668ac0
Fix changes file 2021-09-13 19:02:23 +02:00
Alexander Færøy
fcef8e3f75 Only check for bindable ports if we are unsure if it will fail.
We currently assume that the only way for Tor to listen on ports in the
privileged port range (1 to 1023), on Linux, is if we are granted the
NET_BIND_SERVICE capability. Today on Linux, it's possible to specify
the beginning of the unprivileged port range using a sysctl
configuration option. Docker (and thus the CI service Tor uses) recently
changed this sysctl value to 0, which causes our tests to fail as they
assume that we should NOT be able to bind to a privileged port *without*
the NET_BIND_SERVICE capability.

In this patch, we read the value of the sysctl value via the /proc/sys/
filesystem iff it's present, otherwise we assume the default
unprivileged port range begins at port 1024.

See: tor#40275
2021-09-13 18:33:27 +02:00
Alexander Færøy
12b64845ae Use Debian bullseye for our hardened build. 2021-09-13 18:13:10 +02:00
Alexander Færøy
84d6f977e7 Force amd64 for CI builds. 2021-09-13 18:08:49 +02:00
Daniel Pinto
7a06b8713d Fix compilation error when __NR_time is not defined. #40465 2021-09-09 23:55:49 +01:00
David Goulet
86f880d756 man: Detail onion service DDoS mitigation measure
Move the options into the DDoS section with a series of explanations.

Closes #40456

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-09 14:30:52 -04:00
Guinness
83a11f8a76
Fix the line length in the patch 2021-09-09 13:59:33 +02:00
skaluzka
eac7bdce91
Clear asciidoc-helper.sh syntax
Remove all unnecessary ";" characters at the end of several lines.
Align all indentations to 4 spaces.
Update console messages related to XML_CATALOG_FILES and
.bashrc file.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2021-09-08 22:32:46 +02:00
skaluzka
82168e5e8b
Align and fix indentations in several maint scripts
Use 4 spaces indentations, convert tabs to spaces.
No real code changes.
2021-09-07 23:44:44 +02:00
Nick Mathewson
677b0c9f6d Merge remote-tracking branch 'tor-gitlab/mr/426' 2021-09-07 07:51:07 -04:00
David Goulet
fe6898157c Merge branch 'tor-gitlab/mr/424' 2021-08-31 11:08:18 -04:00
skaluzka
e5b234e358
Improve fname_is_c func in pratracker/includes.py
Use tuples for bname.startswith and fname.endswith in "fname_is_c"
function.
2021-08-29 22:10:44 +02:00
Neel Chauhan
8ead53330c Add spaces between the "and" when logging the "Your server has not managed to confirm reachability for its" on dual-stack relays 2021-08-26 13:40:53 -07:00
Nick Mathewson
a36391f9c0 Add reference implementation for ntor v3. 2021-08-26 15:09:56 -04:00
Nick Mathewson
088c0367a2 Initial backend for an ntor-v3 implementation.
This code is based directly on the specification, without looking at
the reference implementation or the implementation in Arti.
Nonetheless, it is now passing with the test vectors generated by
the reference implementation.
2021-08-26 15:09:56 -04:00
Nick Mathewson
29ec66fb39 Remove changes files that have already been in changelogs for 0.4.6 2021-08-26 11:21:38 -04:00
skaluzka
bbbeed942f
Correct syntax & formatting in test_pratracker.sh
Use 4 spaces for indentations.
Use the same syntax for all functions.
No real code changes (except removal of unnecessary ";" from
"exit 1" command).
2021-08-22 20:36:36 +02:00
Nick Mathewson
984e3a9c6c Merge remote-tracking branch 'tor-gitlab/mr/420' 2021-08-18 08:43:31 -04:00
Nick Mathewson
00b57e81f8 Merge remote-tracking branch 'tor-gitlab/mr/419' 2021-08-18 08:39:50 -04:00
David Goulet
cac612af42 dir: Do not flag non-running failing HSDir
When a directory request fails, we flag the relay as non Running so we
don't use it anymore.

This can be problematic with onion services because there are cases
where a tor instance could have a lot of services, ephemeral ones, and
keeps failing to upload descriptors, let say due to a bad network, and
thus flag a lot of nodes as non Running which then in turn can not be
used for circuit building.

This commit makes it that we never flag nodes as non Running on a onion
service directory request (upload or fetch) failure as to keep the
hashring intact and not affect other parts of tor.

Fortunately, the onion service hashring is _not_ selected by looking at
the Running flag but since we do a 3-hop circuit to the HSDir, other
services on the same instance can influence each other by removing nodes
from the consensus for path selection.

This was made apparent with a small network that ran out of nodes to
used due to rapid succession of onion services uploading and failing.
See #40434 for details.

Fixes #40434

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-08-17 13:27:14 -04:00
David Goulet
03a709ead1 Forward merge the latest ChangeLog/ReleaseNotes
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-08-16 16:43:14 -04:00
David Goulet
50e32a54d1 Merge branch 'maint-0.4.6' 2021-08-16 16:34:49 -04:00
David Goulet
2be49cdbe5 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-08-16 16:34:39 -04:00
David Goulet
e3382afccd Bump version to -dev
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-08-16 16:34:33 -04:00
David Goulet
da9ff3936d Merge branch 'maint-0.3.5' into maint-0.4.5 2021-08-16 16:34:19 -04:00