]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
4 years agoBump to 0.3.5.12
Nick Mathewson [Mon, 9 Nov 2020 22:12:18 +0000 (17:12 -0500)] 
Bump to 0.3.5.12

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5
Nick Mathewson [Mon, 9 Nov 2020 21:13:24 +0000 (16:13 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5

5 years agoImplement proposal 318: Limit protovers to 0..63
Nick Mathewson [Wed, 14 Oct 2020 15:28:37 +0000 (11:28 -0400)] 
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.

5 years agoMerge remote-tracking branch 'tor-github/pr/1827/head' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 13:29:07 +0000 (09:29 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1827/head' into maint-0.3.5

5 years agohs-v2: Add deprecation warning for service
David Goulet [Wed, 1 Jul 2020 14:53:30 +0000 (10:53 -0400)] 
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>
5 years agoMerge remote-tracking branch 'tor-gitlab/mr/77' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:29:23 +0000 (08:29 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/77' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:25:55 +0000 (08:25 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-github/pr/1661/head' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:14:46 +0000 (08:14 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1661/head' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-gitlab/mr/43' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:09:59 +0000 (08:09 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/43' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-gitlab/mr/137' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:07:53 +0000 (08:07 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/137' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-gitlab/mr/103' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:05:31 +0000 (08:05 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/103' into maint-0.3.5

5 years agoMerge branch 'mr_124_squashed' into maint-0.3.5
Nick Mathewson [Wed, 7 Oct 2020 12:00:59 +0000 (08:00 -0400)] 
Merge branch 'mr_124_squashed' into maint-0.3.5

5 years agoParallelize src/test/test into chunks.
Nick Mathewson [Wed, 12 Aug 2020 16:36:54 +0000 (12:36 -0400)] 
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.

5 years agosrv: Remove spammy debug log
David Goulet [Tue, 22 Sep 2020 15:06:34 +0000 (11:06 -0400)] 
srv: Remove spammy debug log

Fixes #40135

Signed-off-by: David Goulet <dgoulet@torproject.org>
5 years agogitlab-ci: Use test-network-all for debian-integration
Nick Mathewson [Mon, 21 Sep 2020 13:49:29 +0000 (09:49 -0400)] 
gitlab-ci: Use test-network-all for debian-integration

5 years agogitlab-ci: add an NSS check.
Nick Mathewson [Mon, 21 Sep 2020 13:26:57 +0000 (09:26 -0400)] 
gitlab-ci: add an NSS check.

5 years agogitlab-ci: Add all-bugs-are-fatal on hardened and integration builds.
Nick Mathewson [Mon, 21 Sep 2020 13:25:02 +0000 (09:25 -0400)] 
gitlab-ci: Add all-bugs-are-fatal on hardened and integration builds.

5 years agogitlab-ci: Add disable-module builds.
Nick Mathewson [Mon, 21 Sep 2020 13:24:14 +0000 (09:24 -0400)] 
gitlab-ci: Add disable-module builds.

5 years agoAdd a few more options for the CI script.
Nick Mathewson [Mon, 21 Sep 2020 13:20:40 +0000 (09:20 -0400)] 
Add a few more options for the CI script.

These are:
  --disable-module-relay
  --disable-module-dirauth
  --enable-all-bugs-are-fatal
  --enable-nss

5 years agoMake debian-trace job conditional on src/lib/trace/trace_sys.c
Nick Mathewson [Fri, 18 Sep 2020 19:56:59 +0000 (15:56 -0400)] 
Make debian-trace job conditional on src/lib/trace/trace_sys.c

5 years ago.gitlab.yml: missing comments
Nick Mathewson [Fri, 18 Sep 2020 19:55:02 +0000 (15:55 -0400)] 
.gitlab.yml: missing comments

5 years agoCopy tracing things back to maint-0.3.5, for consistency.
Nick Mathewson [Fri, 18 Sep 2020 19:53:06 +0000 (15:53 -0400)] 
Copy tracing things back to maint-0.3.5, for consistency.

5 years agoFix underflow in rend_cache/free_all test.
Nick Mathewson [Thu, 17 Sep 2020 18:04:54 +0000 (14:04 -0400)] 
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.

5 years agotest: Increment rend cache allocation before freeing
David Goulet [Thu, 17 Sep 2020 16:55:40 +0000 (12:55 -0400)] 
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
  7eef9ced61e72b1d)

Fixes #40125

Signed-off-by: David Goulet <dgoulet@torproject.org>
5 years agoconn: Remove assert on new listener connection when retrying
David Goulet [Tue, 1 Sep 2020 13:54:48 +0000 (09:54 -0400)] 
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>
5 years agoMerge remote-tracking branch 'tor-gitlab/mr/125' into maint-0.3.5
Nick Mathewson [Thu, 13 Aug 2020 18:20:27 +0000 (14:20 -0400)] 
Merge remote-tracking branch 'tor-gitlab/mr/125' into maint-0.3.5

5 years agoImprove comments in .gitlab-ci.yml
Nick Mathewson [Thu, 13 Aug 2020 00:20:58 +0000 (20:20 -0400)] 
Improve comments in .gitlab-ci.yml

5 years agoCI: Turn on stem with 044 and later.
Nick Mathewson [Thu, 13 Aug 2020 00:13:18 +0000 (20:13 -0400)] 
CI: Turn on stem with 044 and later.

5 years agoFix allocation counting in clean_v2_descs_as_dir test.
Nick Mathewson [Wed, 12 Aug 2020 18:25:46 +0000 (14:25 -0400)] 
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 ade5005853c17b3 in 0.2.8.1-alpha.

5 years agoCI: improve output when skipping doxygen
Nick Mathewson [Wed, 12 Aug 2020 16:13:56 +0000 (12:13 -0400)] 
CI: improve output when skipping doxygen

5 years agoTry disabling "make all" when checking docs.
Nick Mathewson [Wed, 12 Aug 2020 15:35:15 +0000 (11:35 -0400)] 
Try disabling "make all" when checking docs.

5 years agoCI: Try to enable integration tests, hardening, and clang.
Nick Mathewson [Wed, 12 Aug 2020 13:38:19 +0000 (09:38 -0400)] 
CI: Try to enable integration tests, hardening, and clang.

5 years agoCI: Remove VS2015 AppVeyor build.
George Kadianakis [Wed, 12 Aug 2020 11:05:21 +0000 (14:05 +0300)] 
CI: Remove VS2015 AppVeyor build.

5 years agoCI: label our python versions.
Nick Mathewson [Tue, 11 Aug 2020 16:24:03 +0000 (12:24 -0400)] 
CI: label our python versions.

5 years agoCI: Only run doxygen on 0.4.3 and later.
Nick Mathewson [Tue, 11 Aug 2020 16:22:35 +0000 (12:22 -0400)] 
CI: Only run doxygen on 0.4.3 and later.

5 years agoCI: enable documentation testing
Nick Mathewson [Tue, 11 Aug 2020 15:06:21 +0000 (11:06 -0400)] 
CI: enable documentation testing

5 years agoFix a pair of typos in ci-driver.sh.
Nick Mathewson [Tue, 11 Aug 2020 15:03:11 +0000 (11:03 -0400)] 
Fix a pair of typos in ci-driver.sh.

5 years agoAdd a pair of warnings about only editing CI in 035
Nick Mathewson [Tue, 11 Aug 2020 14:44:32 +0000 (10:44 -0400)] 
Add a pair of warnings about only editing CI in 035

5 years agosmall code tweaks to try to work around debian stable complaints
Nick Mathewson [Mon, 10 Aug 2020 21:36:21 +0000 (17:36 -0400)] 
small code tweaks to try to work around debian stable complaints

5 years agoTry to set up a minimal gitlab CI script
Nick Mathewson [Mon, 10 Aug 2020 20:10:12 +0000 (16:10 -0400)] 
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.

5 years agoAdd a shareable continuous-integration script.
Nick Mathewson [Mon, 10 Aug 2020 19:58:28 +0000 (15:58 -0400)] 
Add a shareable continuous-integration script.

Eventually this should be used by every one of our CI scripts.

5 years agoValidate ed25519 keys and canonicity from circuit_n_conn_done()
Nick Mathewson [Thu, 6 Aug 2020 15:47:01 +0000 (11:47 -0400)] 
Validate ed25519 keys and canonicity from circuit_n_conn_done()

Fixes bug 40080. Bugfix on 0.2.7.2-alpha.

5 years agoCopy from master gitlab-ci.yml from master back to maint-0.3.5
Nick Mathewson [Thu, 6 Aug 2020 16:42:14 +0000 (12:42 -0400)] 
Copy from master gitlab-ci.yml from master back to maint-0.3.5

5 years agoRemove channel_is_canonical_is_reliable()
Nick Mathewson [Mon, 3 Aug 2020 15:25:37 +0000 (11:25 -0400)] 
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.

5 years agoFix a bug in buf_move_all() when the input buffer is empty.
Nick Mathewson [Thu, 30 Jul 2020 18:24:25 +0000 (14:24 -0400)] 
Fix a bug in buf_move_all() when the input buffer is empty.

We found this in #40076, after we started using buf_move_all() in
more places.  Fixes bug #40076; bugfix on 0.3.3.1-alpha.  As far as
I know, the crash only affects master, but I think this warrants a
backport, "just in case".

5 years agoAdd unit test for buf_move_all(), including a failing case
Nick Mathewson [Thu, 30 Jul 2020 18:19:32 +0000 (14:19 -0400)] 
Add unit test for buf_move_all(), including a failing case

The failing case is #if'd out for now, but will be fixed in the next
commit.

Testing for a fix for #40076.

5 years agoUse _lseeki64() on windows.
Nick Mathewson [Tue, 28 Jul 2020 15:30:47 +0000 (11:30 -0400)] 
Use _lseeki64() on windows.

Fixes bug 31036; bugfix on 0.2.1.8-alpha when we moved the logging
system to use posix fds.

5 years agofallbackdir: Remove all three Digitalcourage3 relays
David Goulet [Fri, 24 Jul 2020 18:56:05 +0000 (14:56 -0400)] 
fallbackdir: Remove all three Digitalcourage3 relays

They are about to be shutdown in September.

Signed-off-by: David Goulet <dgoulet@torproject.org>
5 years agoMore info in the fallbackdir changes file
Nick Mathewson [Thu, 23 Jul 2020 14:08:42 +0000 (10:08 -0400)] 
More info in the fallbackdir changes file

5 years agofallbackdir: Update list for 2020
David Goulet [Thu, 23 Jul 2020 13:51:45 +0000 (09:51 -0400)] 
fallbackdir: Update list for 2020

Closes #40061

Signed-off-by: David Goulet <dgoulet@torproject.org>
5 years agoTreat all extorport connections with un-set addresses as remote
Nick Mathewson [Wed, 22 Jul 2020 19:20:41 +0000 (15:20 -0400)] 
Treat all extorport connections with un-set addresses as remote

Without this fix, if an PT forgets to send a USERADDR command, that
results in a connection getting treated as local for the purposes of
rate-limiting.

If the PT _does_ use USERADDR, we still believe it.

Closes ticket 33747.

5 years agoAdjust the rules for warning about too many connections.
Nick Mathewson [Wed, 22 Jul 2020 18:45:03 +0000 (14:45 -0400)] 
Adjust the rules for warning about too many connections.

Previously we tolerated up to 1.5 connections for every relay we
were connected to, and didn't warn if we had fewer than 5
connections total.

Now we tolerate up to 1.5 connections per relay, and up to 4
connections per authority, and we don't warn at all when we have
fewer than 25 connections total.

Fixes bug 33880, which seems to have been provoked by our #17592
change in 0.3.5.

5 years agoNSS: Tell NSS that our SSL sockets are nonblocking.
Nick Mathewson [Fri, 10 Jul 2020 17:14:33 +0000 (13:14 -0400)] 
NSS: Tell NSS that our SSL sockets are nonblocking.

Closes ticket 40035.

5 years agoBump to 0.3.5.11-dev
Nick Mathewson [Thu, 9 Jul 2020 17:12:45 +0000 (13:12 -0400)] 
Bump to 0.3.5.11-dev

5 years agobump to 0.3.5.11
Nick Mathewson [Thu, 9 Jul 2020 14:28:21 +0000 (10:28 -0400)] 
bump to 0.3.5.11

5 years agoMerge branch 'trove_2020_001_035' into maint-0.3.5
Nick Mathewson [Thu, 9 Jul 2020 13:28:36 +0000 (09:28 -0400)] 
Merge branch 'trove_2020_001_035' into maint-0.3.5

5 years agoResolve a compiler warning from a 32-bit signed/unsigned comparison
Nick Mathewson [Tue, 7 Jul 2020 18:58:49 +0000 (14:58 -0400)] 
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.

5 years agoCI: Fix Appveyor printf format error
David Goulet [Tue, 7 Jul 2020 13:20:28 +0000 (09:20 -0400)] 
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

5 years agoUse ((x + 7) >> 3) instead of (x >> 3) when converting from bits to bytes.
Alexander Færøy [Sat, 16 May 2020 19:18:56 +0000 (19:18 +0000)] 
Use ((x + 7) >> 3) instead of (x >> 3) when converting from bits to bytes.

This patch changes our bits-to-bytes conversion logic in the NSS
implementation of `tor_tls_cert_matches_key()` from using (x >> 3) to
((x + 7) >> 3) since DER bit-strings are allowed to contain a number of
bits that is not a multiple of 8.

Additionally, we add a comment on why we cannot use the
`DER_ConvertBitString()` macro from NSS, as we would potentially apply
the bits-to-bytes conversion logic twice, which would lead to an
insignificant amount of bytes being compared in
`SECITEM_ItemsAreEqual()` and thus turn the logic into being a
prefix match instead of a full match.

The `DER_ConvertBitString()` macro is defined in NSS as:

    /*
    ** Macro to convert der decoded bit string into a decoded octet
    ** string. All it needs to do is fiddle with the length code.
    */
    #define DER_ConvertBitString(item)            \
        {                                         \
            (item)->len = ((item)->len + 7) >> 3; \
        }

Thanks to Taylor Yu for spotting this problem.

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

See: https://bugs.torproject.org/33119

5 years agoAdd constness to length variables in `tor_tls_cert_matches_key`.
Alexander Færøy [Sat, 16 May 2020 15:34:37 +0000 (15:34 +0000)] 
Add constness to length variables in `tor_tls_cert_matches_key`.

We add constness to `peer_info_orig_len` and `cert_info_orig_len` in
`tor_tls_cert_matches_key` to ensure that we don't accidentally alter
the variables.

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

See: https://bugs.torproject.org/33119

5 years agoFix out-of-bound memory read in `tor_tls_cert_matches_key()` for NSS.
Alexander Færøy [Tue, 31 Mar 2020 02:33:54 +0000 (02:33 +0000)] 
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

5 years agoRun `tor_tls_cert_matches_key()` Test Suite with both OpenSSL and NSS.
Alexander Færøy [Tue, 31 Mar 2020 02:28:12 +0000 (02:28 +0000)] 
Run `tor_tls_cert_matches_key()` Test Suite with both OpenSSL and NSS.

This patch lifts the `tor_tls_cert_matches_key()` tests out of the
OpenSSL specific TLS test suite and moves it into the generic TLS test
suite that is executed for both OpenSSL and NSS.

This patch is largely a code movement, but we had to rewrite parts of
the test to avoid using OpenSSL specific data-types (such as `X509 *`)
and replace it with the generic Tor abstraction type
(`tor_x509_cert_impl_t *`).

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

See: https://bugs.torproject.org/33119

5 years agoDowngrade "Bug: No entry found in extrainfo map" message.
Nick Mathewson [Tue, 30 Jun 2020 15:54:13 +0000 (11:54 -0400)] 
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.

5 years agoMerge branch 'tor-github/pr/1909' into maint-0.3.5
Alexander Færøy [Tue, 30 Jun 2020 14:23:17 +0000 (14:23 +0000)] 
Merge branch 'tor-github/pr/1909' into maint-0.3.5

5 years agoMerge branch 'tor-github/pr/1793' into maint-0.3.5
Alexander Færøy [Tue, 30 Jun 2020 13:55:39 +0000 (13:55 +0000)] 
Merge branch 'tor-github/pr/1793' into maint-0.3.5

5 years agoMerge branch 'tor-github/pr/1785' into maint-0.3.5
Alexander Færøy [Tue, 30 Jun 2020 13:47:55 +0000 (13:47 +0000)] 
Merge branch 'tor-github/pr/1785' into maint-0.3.5

5 years agoMerge remote-tracking branch 'nickm-github/bug32884_035' into maint-0.3.5
Alexander Færøy [Tue, 30 Jun 2020 13:35:13 +0000 (13:35 +0000)] 
Merge remote-tracking branch 'nickm-github/bug32884_035' into maint-0.3.5

5 years agoMerge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5
Nick Mathewson [Mon, 29 Jun 2020 16:55:27 +0000 (12:55 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5

5 years agoMerge branch 'tor-github/pr/1912' into maint-0.3.5
David Goulet [Fri, 12 Jun 2020 16:55:17 +0000 (12:55 -0400)] 
Merge branch 'tor-github/pr/1912' into maint-0.3.5

5 years agoUpdate and upgrade Pacman before installing dependencies in AppVeyor.
Alexander Færøy [Tue, 2 Jun 2020 13:07:54 +0000 (13:07 +0000)] 
Update and upgrade Pacman before installing dependencies in AppVeyor.

This patch makes sures that AppVeyor upgrades its Pacman (the package
manager) before installing the Tor dependencies.

See: https://bugs.torproject.org/34384

5 years agoRevert "Travis: temporarily fix stem version to d1174a83c2dcb7b8"
Nick Mathewson [Wed, 3 Jun 2020 18:48:05 +0000 (14:48 -0400)] 
Revert "Travis: temporarily fix stem version to d1174a83c2dcb7b8"

This reverts commit e63bfca5f2d98788d11b9a0a82bf67277a228c71, now
that Stem has been upgraded to fix the underlying issue.

5 years agoPreemptive circs should work with UseEntryGuards 0
Roger Dingledine [Sat, 30 May 2020 05:54:22 +0000 (01:54 -0400)] 
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.

5 years agoFix use of non-portable == in configure.ac.
Nick Mathewson [Fri, 15 May 2020 13:58:49 +0000 (09:58 -0400)] 
Fix use of non-portable == in configure.ac.

Fixes bug 34233.

(This has bug has been backported to 0.3.5, but only released in
0.4.3, so it only needs a changes file there.)

5 years agoTravis: temporarily fix stem version to d1174a83c2dcb7b8
Nick Mathewson [Wed, 13 May 2020 12:53:02 +0000 (08:53 -0400)] 
Travis: temporarily fix stem version to d1174a83c2dcb7b8

This is a workaround for https://github.com/torproject/stem/issues/63

5 years agochanges file for bug 34078.
Nick Mathewson [Wed, 6 May 2020 20:58:06 +0000 (16:58 -0400)] 
changes file for bug 34078.

5 years agoUse __attribute__((fallthrough)) rather than magic GCC comments.
Nick Mathewson [Wed, 6 May 2020 14:45:48 +0000 (10:45 -0400)] 
Use __attribute__((fallthrough)) rather than magic GCC comments.

GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;

5 years agoMerge branch 'bug34078_prelim_035' into maint-0.3.5
Nick Mathewson [Wed, 6 May 2020 20:46:31 +0000 (16:46 -0400)] 
Merge branch 'bug34078_prelim_035' into maint-0.3.5

5 years agoRemove an incorrect "Fall through" comment.
Nick Mathewson [Wed, 6 May 2020 18:47:38 +0000 (14:47 -0400)] 
Remove an incorrect "Fall through" comment.

5 years agoaddress.c: add a single (harmless) missing break;
Nick Mathewson [Wed, 6 May 2020 14:42:17 +0000 (10:42 -0400)] 
address.c: add a single (harmless) missing break;

5 years agoinclude compat_compiler for ed25519_donna
Nick Mathewson [Wed, 6 May 2020 14:38:59 +0000 (10:38 -0400)] 
include compat_compiler for ed25519_donna

5 years agoReplace some "fall through" comments not at the end of a case.
Nick Mathewson [Wed, 6 May 2020 14:35:36 +0000 (10:35 -0400)] 
Replace some "fall through" comments not at the end of a case.

5 years agoReplace a "fall through" comment that was outside a switch.
Nick Mathewson [Wed, 6 May 2020 14:32:35 +0000 (10:32 -0400)] 
Replace a "fall through" comment that was outside a switch.

5 years agoAdd a fallthrough macro.
Nick Mathewson [Wed, 6 May 2020 14:24:21 +0000 (10:24 -0400)] 
Add a fallthrough macro.

This macro defers to __attribute__((fallthrough)) on GCC (and
clang).  Previously we had been using GCC's magic /* fallthrough */
comments, but clang very sensibly doesn't accept those.

Since not all compiler recognize it, we only define it when our
configure script detects that it works.

Part of a fix for 34078.

5 years agoMerge remote-tracking branch 'tor-github/pr/1784' into maint-0.3.5
teor [Thu, 9 Apr 2020 01:02:49 +0000 (11:02 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1784' into maint-0.3.5

5 years agoAdd a test for the localhost case.
Nick Mathewson [Thu, 19 Mar 2020 13:50:36 +0000 (09:50 -0400)] 
Add a test for the localhost case.

5 years agoExtend test to handle router_get_advertised_ipv6_or_ap
Nick Mathewson [Thu, 19 Mar 2020 13:44:27 +0000 (09:44 -0400)] 
Extend test to handle router_get_advertised_ipv6_or_ap

5 years agoAdd a test for router_get_advertised_or_port_by_af().
Nick Mathewson [Thu, 19 Mar 2020 13:36:47 +0000 (09:36 -0400)] 
Add a test for router_get_advertised_or_port_by_af().

5 years agoAdd tests for get_first_advertised_{addr,port}_by_type_af()
Nick Mathewson [Thu, 19 Mar 2020 13:17:09 +0000 (09:17 -0400)] 
Add tests for get_first_advertised_{addr,port}_by_type_af()

5 years agorouter: Refactor IPv6 ORPort function logic
teor [Wed, 8 Jan 2020 07:34:37 +0000 (17:34 +1000)] 
router: Refactor IPv6 ORPort function logic

Return early when there is no suitable IPv6 ORPort.
Show the address and port on error, using a convenience function.

Code simplification and refactoring.

Cleanup after 32588.

5 years agorouter: Stop advertising incorrect auto IPv6 ORPorts
teor [Fri, 20 Dec 2019 04:30:51 +0000 (14:30 +1000)] 
router: Stop advertising incorrect auto IPv6 ORPorts

When IPv6 ORPorts are set to "auto", tor relays and bridges would
advertise an incorrect port in their descriptor.

This may be a low-severity memory safety issue, because the published
port number may be derived from uninitialised or out-of-bounds memory
reads.

Fixes bug 32588; bugfix on 0.2.3.9-alpha.

5 years agoAppveyor: Copy required DLLs to test and app
teor [Thu, 19 Mar 2020 07:35:49 +0000 (17:35 +1000)] 
Appveyor: Copy required DLLs to test and app

Copy required DLLs to test and app, before running tor's tests.

This ensures that tor.exe and test*.exe use the correct version of each
DLL. This fix is not required, but we hope it will avoid DLL search
issues in future.

Closes bug 33673; bugfix on 0.3.4.2-alpha.

5 years agoAppveyor: disable crypto/openssl_version
Nick Mathewson [Thu, 19 Mar 2020 19:28:55 +0000 (15:28 -0400)] 
Appveyor: disable crypto/openssl_version

5 years agoAdd a TOR_SKIP_TESTCASES environment variable for suppressing tests.
Nick Mathewson [Thu, 19 Mar 2020 19:25:11 +0000 (15:25 -0400)] 
Add a TOR_SKIP_TESTCASES environment variable for suppressing tests.

For example, "TOR_SKIP_TESTCASES=crypto/.. ./src/test/test" will run
the tests and suppress all the "crypto/" tests.  You could get the
same effect by running "./src/test/test :crypto/..", but that can be
harder to arrange from CI.

Part of a fix/workaround for 33643.

5 years agoBump version to 0.3.5.10-dev
Nick Mathewson [Wed, 18 Mar 2020 16:15:32 +0000 (12:15 -0400)] 
Bump version to 0.3.5.10-dev

5 years agoPort rsa_private_key_too_long() to work on OpenSSL 1.1.0.
Nick Mathewson [Wed, 18 Mar 2020 12:19:48 +0000 (08:19 -0400)] 
Port rsa_private_key_too_long() to work on OpenSSL 1.1.0.

5 years agoMerge branch 'trove_2020_002_035' into maint-0.3.5
Nick Mathewson [Tue, 17 Mar 2020 19:21:48 +0000 (15:21 -0400)] 
Merge branch 'trove_2020_002_035' into maint-0.3.5

5 years agoFix TROVE-2020-003.
George Kadianakis [Tue, 11 Feb 2020 16:37:55 +0000 (18:37 +0200)] 
Fix TROVE-2020-003.

Given that ed25519 public key validity checks are usually not needed
and (so far) they are only necessary for onion addesses in the Tor
protocol, we decided to fix this specific bug instance without
modifying the rest of the codebase (see below for other fix
approaches).

In our minimal fix we check that the pubkey in
hs_service_add_ephemeral() is valid and error out otherwise.

5 years agoTrivial bugfixes found during TROVE investigation.
George Kadianakis [Mon, 10 Feb 2020 14:35:40 +0000 (16:35 +0200)] 
Trivial bugfixes found during TROVE investigation.

5 years agoUse >= consistently with max_bits.
Nick Mathewson [Tue, 17 Mar 2020 14:09:58 +0000 (10:09 -0400)] 
Use >= consistently with max_bits.

5 years agoAdd off-by-one checks for key length.
Nick Mathewson [Tue, 17 Mar 2020 14:07:54 +0000 (10:07 -0400)] 
Add off-by-one checks for key length.