Commit Graph

31268 Commits

Author SHA1 Message Date
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
6c0f15500b Merge branch 'ticket40241_035' into maint-0.3.5 2021-01-11 14:37:14 -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
Nick Mathewson
fcae26adf7 Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5 2020-11-16 22:42:15 -05:00
Nick Mathewson
862c44e4ec Bump to 0.3.5.12-dev 2020-11-12 08:11:01 -05:00
Nick Mathewson
665083be9f Bump to 0.3.5.12 2020-11-09 17:12:18 -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
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
Nick Mathewson
dd63b97288 Implement proposal 318: Limit protovers to 0..63
In brief: we go through a lot of gymnastics to handle huge protover
numbers, but after years of development we're not even close to 10
for any of our current versions.  We also have a convenient
workaround available in case we ever run out of protocols: if (for
example) we someday need Link=64, we can just add Link2=0 or
something.

This patch is a minimal patch to change tor's behavior; it doesn't
take advantage of the new restrictions.

Implements #40133 and proposal 318.
2020-10-14 11:28:37 -04:00
Nick Mathewson
741edf1b45 Merge remote-tracking branch 'tor-github/pr/1827/head' into maint-0.3.5 2020-10-07 09:29:07 -04:00
David Goulet
b404f085ad 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-10-07 08:38:23 -04:00
Nick Mathewson
5f5587ee50 Merge remote-tracking branch 'tor-gitlab/mr/77' into maint-0.3.5 2020-10-07 08:29:23 -04:00
Nick Mathewson
ad7ffa5240 Merge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.3.5 2020-10-07 08:25:55 -04:00
Nick Mathewson
98e14720b5 Merge remote-tracking branch 'tor-github/pr/1661/head' into maint-0.3.5 2020-10-07 08:14:46 -04:00
Nick Mathewson
968b6c30c1 Merge remote-tracking branch 'tor-gitlab/mr/43' into maint-0.3.5 2020-10-07 08:09:59 -04:00
Nick Mathewson
e0e0ef713e Merge remote-tracking branch 'tor-gitlab/mr/137' into maint-0.3.5 2020-10-07 08:07:53 -04:00
Nick Mathewson
84a5bd48e2 Merge remote-tracking branch 'tor-gitlab/mr/103' into maint-0.3.5 2020-10-07 08:05:31 -04:00
Nick Mathewson
ed6a328297 Merge branch 'mr_124_squashed' into maint-0.3.5 2020-10-07 08:00:59 -04:00
Nick Mathewson
c5ba8b6221 Parallelize src/test/test into chunks.
First, we introduce a flag to teach src/test/test to split its work
into chunks.  Then we replace our invocation of src/test/test in our
"make check" target with a set of 8 scripts that invoke the first
8th of the tests, the second 8th, and so on.

This change makes our "make -kj4 check" target in our hardened
gitlab build more than twice as fast, since src/test/test was taking
the longest to finish.

Closes 40098.
2020-10-07 08:00:49 -04:00
David Goulet
faf89ec6c2 srv: Remove spammy debug log
Fixes #40135

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-22 11:06:34 -04:00
Nick Mathewson
8458c8211e gitlab-ci: Use test-network-all for debian-integration 2020-09-21 12:58:49 -04:00
Nick Mathewson
7280bb50b2 gitlab-ci: add an NSS check. 2020-09-21 12:58:49 -04:00
Nick Mathewson
3ee0f6371d gitlab-ci: Add all-bugs-are-fatal on hardened and integration builds. 2020-09-21 12:58:49 -04:00
Nick Mathewson
ab03ca9c75 gitlab-ci: Add disable-module builds. 2020-09-21 12:58:49 -04:00
Nick Mathewson
1bbeddf99e Add a few more options for the CI script.
These are:
  --disable-module-relay
  --disable-module-dirauth
  --enable-all-bugs-are-fatal
  --enable-nss
2020-09-21 12:58:49 -04:00
Nick Mathewson
0b77c706a1 Make debian-trace job conditional on src/lib/trace/trace_sys.c 2020-09-18 19:05:51 -04:00
Nick Mathewson
f8f3e57016 .gitlab.yml: missing comments 2020-09-18 15:55:06 -04:00
Nick Mathewson
122b297a20 Copy tracing things back to maint-0.3.5, for consistency. 2020-09-18 15:53:06 -04:00
Nick Mathewson
7945e075a4 Fix underflow in rend_cache/free_all test.
We already fixed these in #40099 and #40125.

This patch fixes #40126.  Bugfix on 0.2.8.1-alpha.
2020-09-17 14:04:54 -04:00
David Goulet
47f1d19f8e test: Increment rend cache allocation before freeing
The rend_cache/entry_free was missing the rend cache allocation increment
before freeing the object.

Without it, it had an underflow bug:

  Sep 17 08:40:13.845 [warn] rend_cache_decrement_allocation(): Bug: Underflow
  in rend_cache_decrement_allocation (on Tor 0.4.5.0-alpha-dev
  7eef9ced61)

Fixes #40125

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-17 13:00:23 -04:00
David Goulet
ea339227c2 conn: Remove assert on new listener connection when retrying
Opening a new listener connection can fail in many ways like a bind()
permission denied on a low port for instance.

And thus, we should expect to handle an error when creating a new one instead
of assert() on it.

To hit the removed assert:

  ORPort 80
  KeepBindCapabilities 0

Start tor. Then edit torrc:

  ORPort <some-IP>:80

HUP tor and the assert is hit.

Fixes #40073

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-01 10:01:21 -04:00
Nick Mathewson
72484a4953 Merge remote-tracking branch 'tor-gitlab/mr/125' into maint-0.3.5 2020-08-13 14:20:27 -04:00
Nick Mathewson
aeafb7f44f Improve comments in .gitlab-ci.yml 2020-08-12 20:20:58 -04:00
Nick Mathewson
41a7ab96e5 CI: Turn on stem with 044 and later. 2020-08-12 20:13:18 -04:00
Nick Mathewson
f9bb49d870 Fix allocation counting in clean_v2_descs_as_dir test.
Without this fix, running this test on its own would fail.

Fixes bug 40099. Bugfix on ade5005853 in 0.2.8.1-alpha.
2020-08-12 14:25:46 -04:00
Nick Mathewson
f5b9471547 CI: improve output when skipping doxygen 2020-08-12 12:28:44 -04:00
Nick Mathewson
50b7bd243f Try disabling "make all" when checking docs. 2020-08-12 12:28:44 -04:00
Nick Mathewson
fe0e62ddc4 CI: Try to enable integration tests, hardening, and clang. 2020-08-12 11:29:46 -04:00
George Kadianakis
8182f1351a CI: Remove VS2015 AppVeyor build. 2020-08-12 14:05:21 +03:00
Nick Mathewson
adb7268236 CI: label our python versions. 2020-08-11 12:24:03 -04:00
Nick Mathewson
9eb316de42 CI: Only run doxygen on 0.4.3 and later. 2020-08-11 12:22:35 -04:00
Nick Mathewson
6a91a50d32 CI: enable documentation testing 2020-08-11 11:06:49 -04:00
Nick Mathewson
aa2c93b90b Fix a pair of typos in ci-driver.sh. 2020-08-11 11:03:11 -04:00
Nick Mathewson
8a0f530adf Add a pair of warnings about only editing CI in 035 2020-08-11 10:44:32 -04:00
Nick Mathewson
e873c7e893 small code tweaks to try to work around debian stable complaints 2020-08-10 19:20:05 -04:00
Nick Mathewson
057f40f3d8 Try to set up a minimal gitlab CI script
This is based on @eighthave's templates, and the work we've been
doing to present a uniform testing environment.
2020-08-10 19:20:05 -04:00
Nick Mathewson
cb027b392f Add a shareable continuous-integration script.
Eventually this should be used by every one of our CI scripts.
2020-08-10 19:01:05 -04:00
Nick Mathewson
afb6ff1739 Validate ed25519 keys and canonicity from circuit_n_conn_done()
Fixes bug 40080. Bugfix on 0.2.7.2-alpha.
2020-08-06 15:59:28 -04:00
Nick Mathewson
bac8967e24 Copy from master gitlab-ci.yml from master back to maint-0.3.5 2020-08-06 12:42:14 -04:00
Nick Mathewson
435f31aed3 Remove channel_is_canonical_is_reliable()
This function once served to let circuits continue to be built over
version-1 link connections.  But such connections are long-obsolete,
and it's time to remove this check.

Closes #40081.
2020-08-03 11:25:37 -04:00