]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
4 years agoversion: Bump to 0.3.5.17-dev
David Goulet [Tue, 26 Oct 2021 15:30:56 +0000 (11:30 -0400)] 
version: Bump to 0.3.5.17-dev

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoversion: Bump to 0.3.5.17
David Goulet [Tue, 26 Oct 2021 13:16:13 +0000 (09:16 -0400)] 
version: Bump to 0.3.5.17

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agofallbackdir: Regenerate the list for October 2021
David Goulet [Thu, 21 Oct 2021 13:13:40 +0000 (09:13 -0400)] 
fallbackdir: Regenerate the list for October 2021

Closes #40493

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoAnnounce URL to bridge status page when starting Tor as a bridge relay.
Alexander Færøy [Mon, 23 Nov 2020 23:41:17 +0000 (23:41 +0000)] 
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

4 years agoRemove unused function: dns_randfn_() in dns.c.
Alexander Færøy [Mon, 10 May 2021 13:07:24 +0000 (13:07 +0000)] 
Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5
Alexander Færøy [Wed, 20 Oct 2021 17:35:35 +0000 (17:35 +0000)] 
Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

4 years agohs: Improve warning for bad service version
David Goulet [Thu, 14 Oct 2021 13:56:10 +0000 (09:56 -0400)] 
hs: Improve warning for bad service version

Now that we don't have version 2, it gives us:

  [warn] HiddenServiceVersion must be between 3 and 3, not 2.

This commit changes it to:

  [warn] HiddenServiceVersion must be 3, not 2.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agochanges: Add file for ticket 40476
David Goulet [Thu, 30 Sep 2021 15:21:13 +0000 (11:21 -0400)] 
changes: Add file for ticket 40476

Closes #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agotest: Don't run HSv2 Chutney test networks
David Goulet [Thu, 30 Sep 2021 15:12:46 +0000 (11:12 -0400)] 
test: Don't run HSv2 Chutney test networks

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agotest: Fix unit tests after disabling version 2
David Goulet [Thu, 30 Sep 2021 15:09:48 +0000 (11:09 -0400)] 
test: Fix unit tests after disabling version 2

Some tests were removed because they were testing something not usable
anymore.

Some tests remains to make sure that things are indeed disabled.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agohs-v2: Disable version 2 HSPOST and HSFETCH command
David Goulet [Thu, 30 Sep 2021 14:59:24 +0000 (10:59 -0400)] 
hs-v2: Disable version 2 HSPOST and HSFETCH command

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agohs-v2: Disable version 2 directory
David Goulet [Thu, 30 Sep 2021 14:46:17 +0000 (10:46 -0400)] 
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>
4 years agohs-v2: Disable version 2 introduction point
David Goulet [Thu, 30 Sep 2021 14:40:19 +0000 (10:40 -0400)] 
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>
4 years agohs-v2: Disable version 2 service
David Goulet [Thu, 30 Sep 2021 14:32:05 +0000 (10:32 -0400)] 
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>
4 years agohs-v2: Disable SOCKS connection for v2 addresses
David Goulet [Thu, 30 Sep 2021 14:26:37 +0000 (10:26 -0400)] 
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>
4 years agoOnly check for bindable ports if we are unsure if it will fail.
Alexander Færøy [Thu, 4 Feb 2021 23:11:11 +0000 (23:11 +0000)] 
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

4 years agoUse Debian bullseye for our hardened build.
Alexander Færøy [Mon, 16 Aug 2021 13:52:58 +0000 (13:52 +0000)] 
Use Debian bullseye for our hardened build.

4 years agoForce amd64 for CI builds.
Alexander Færøy [Mon, 13 Sep 2021 16:05:58 +0000 (18:05 +0200)] 
Force amd64 for CI builds.

4 years agoBump version to -dev
David Goulet [Mon, 16 Aug 2021 20:33:58 +0000 (16:33 -0400)] 
Bump version to -dev

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoUse debian:buster instead of debian:stable for now.
Alexander Færøy [Mon, 16 Aug 2021 13:57:56 +0000 (13:57 +0000)] 
Use debian:buster instead of debian:stable for now.

4 years agoMake the version 0.3.6.16, not 0.3.6.16-dev.
Nick Mathewson [Mon, 16 Aug 2021 12:17:59 +0000 (08:17 -0400)] 
Make the version 0.3.6.16, not 0.3.6.16-dev.

4 years agoUpdate version to 0.3.5.16
David Goulet [Fri, 13 Aug 2021 13:43:44 +0000 (09:43 -0400)] 
Update version to 0.3.5.16

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoUpdate GeoIP files to match IPFire location DB as per 2021/08/12.
Alexander Færøy [Thu, 12 Aug 2021 15:36:52 +0000 (15:36 +0000)] 
Update GeoIP files to match IPFire location DB as per 2021/08/12.

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/417' into maint-0.3.5
Alexander Færøy [Wed, 11 Aug 2021 13:15:35 +0000 (13:15 +0000)] 
Merge remote-tracking branch 'tor-gitlab/mr/417' into maint-0.3.5

4 years agoDisable ed25519-donna's batch verification.
George Kadianakis [Fri, 30 Jul 2021 13:35:48 +0000 (16:35 +0300)] 
Disable ed25519-donna's batch verification.

Fixes bug 40078.

As reported by hdevalence our batch verification logic can cause an assert
crash.

The assert happens because when the batch verification of ed25519-donna fails,
the code in `ed25519_checksig_batch()` falls back to doing a single
verification for each signature.

The crash occurs because batch verification failed, but then all signatures
individually verified just fine.

That's because batch verification and single verification use a different
equation which means that there are sigs that can pass single verification
but fail batch verification.

Fixing this would require modding ed25519-donna which is not in scope for
this ticket, and will be soon deprecated in favor of arti and
ed25519-dalek, so my branch instead removes batch verification.

4 years agofallbackdir: Regenerate list
David Goulet [Wed, 11 Aug 2021 13:04:40 +0000 (09:04 -0400)] 
fallbackdir: Regenerate list

New list for all stable releases.

Closes #40447

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agorelay: Reduce streaming compression ratio from HIGH to LOW
David Goulet [Thu, 18 Feb 2021 17:49:33 +0000 (12:49 -0500)] 
relay: Reduce streaming compression ratio from HIGH to LOW

Fixes #40301

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoBump to 0.3.5.15-dev
Nick Mathewson [Mon, 14 Jun 2021 15:45:30 +0000 (11:45 -0400)] 
Bump to 0.3.5.15-dev

4 years agoFix TROVE-2021-006: Out-of-bounds read on v3 desc parsing
George Kadianakis [Tue, 18 May 2021 14:06:57 +0000 (17:06 +0300)] 
Fix TROVE-2021-006: Out-of-bounds read on v3 desc parsing

4 years agoTROVE-2021-003: Check layer_hint before half-closed end and resolve cells
David Goulet [Thu, 3 Jun 2021 13:33:21 +0000 (09:33 -0400)] 
TROVE-2021-003: Check layer_hint before half-closed end and resolve cells

This issue was reported by Jann Horn part of Google's Project Zero.

Jann's one-sentence summary: entry/middle relays can spoof RELAY_END cells on
half-closed streams, which can lead to stream confusion between OP and
exit.

Fixes #40389

4 years agoMerge branch 'bug40391_035' into maint-0.3.5
Nick Mathewson [Thu, 10 Jun 2021 12:41:59 +0000 (08:41 -0400)] 
Merge branch 'bug40391_035' into maint-0.3.5

4 years agoMerge branch 'bug40390_035_squashed' into maint-0.3.5
Nick Mathewson [Thu, 10 Jun 2021 12:34:25 +0000 (08:34 -0400)] 
Merge branch 'bug40390_035_squashed' into maint-0.3.5

4 years agoAssert on _all_ failures from RAND_bytes().
Nick Mathewson [Mon, 17 May 2021 12:50:01 +0000 (08:50 -0400)] 
Assert on _all_ failures from RAND_bytes().

Previously, we would detect errors from a missing RNG
implementation, but not failures from the RNG code itself.

Fortunately, it appears those failures do not happen in practice
when Tor is using OpenSSL's default RNG implementation.  Fixes bug
40390; bugfix on 0.2.8.1-alpha. This issue is also tracked as
TROVE-2021-004. Reported by Jann Horn at Google's Project Zero.

4 years agoUpdate geoip files to match ipfire location db, 2021/06/10.
Nick Mathewson [Thu, 10 Jun 2021 12:20:13 +0000 (08:20 -0400)] 
Update geoip files to match ipfire location db, 2021/06/10.

4 years agoBump to 0.3.5.15.
Nick Mathewson [Mon, 7 Jun 2021 17:29:35 +0000 (13:29 -0400)] 
Bump to 0.3.5.15.

4 years agoRemove the function `tor_tls_assert_renegotiation_unblocked`.
Nick Mathewson [Tue, 25 May 2021 11:38:31 +0000 (07:38 -0400)] 
Remove the function `tor_tls_assert_renegotiation_unblocked`.

It was used nowhere outside its own unit tests, and it was causing
compilation issues with recent OpenSSL 3.0.0 alphas.

Closes ticket 40399.

4 years agoUse a more secure hash function for the circuitmux hashtable.
Nick Mathewson [Tue, 18 May 2021 12:40:09 +0000 (08:40 -0400)] 
Use a more secure hash function for the circuitmux hashtable.

Fixes bug 40931; bugfix on 0.2.4.4-alpha. Also tracked as
TROVE-2021-005.

This issue was reported by Jann Horn from Google's Project Zero.

4 years agoReindent a few lines to fix a GCC warning.
Nick Mathewson [Fri, 7 May 2021 14:39:20 +0000 (10:39 -0400)] 
Reindent a few lines to fix a GCC warning.

As of GCC 11.1.1, the compiler warns us about code like this:

     if (a)
         b;
         c;

and that's a good thing: we wouldn't want to "goto fail".  But we
had an instance if this in circuituse.c, which was making our
compilation sad.

Fixes bug 40380; bugfix on 0.3.0.1-alpha.

4 years agoUpdate geoip files to match ipfire location db, 2021/05/07.
Nick Mathewson [Fri, 7 May 2021 13:53:46 +0000 (09:53 -0400)] 
Update geoip files to match ipfire location db, 2021/05/07.

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/363' into maint-0.3.5
George Kadianakis [Wed, 21 Apr 2021 13:48:22 +0000 (16:48 +0300)] 
Merge remote-tracking branch 'tor-gitlab/mr/363' into maint-0.3.5

4 years agoStop calling evdns_set_random_bytes_fn()
Nick Mathewson [Fri, 16 Apr 2021 21:26:59 +0000 (17:26 -0400)] 
Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.

4 years agofallbackdir: Remove two unspec lines
David Goulet [Wed, 14 Apr 2021 12:39:04 +0000 (08:39 -0400)] 
fallbackdir: Remove two unspec lines

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoFix test naming, and fix tests on windows.
Nick Mathewson [Tue, 13 Apr 2021 21:38:31 +0000 (17:38 -0400)] 
Fix test naming, and fix tests on windows.

This is a bugfix against my fix for #40133, which has not yet
appeared in 0.3.5.

4 years agofallbackdir: Renegerate list with 200 relays
David Goulet [Tue, 13 Apr 2021 19:15:58 +0000 (15:15 -0400)] 
fallbackdir: Renegerate list with 200 relays

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoUpdate geoip files to match ipfire location db, 2021/04/13.
Nick Mathewson [Tue, 13 Apr 2021 14:35:50 +0000 (10:35 -0400)] 
Update geoip files to match ipfire location db, 2021/04/13.

4 years agoBump to 0.3.5.14-dev
Nick Mathewson [Tue, 16 Mar 2021 13:17:31 +0000 (09:17 -0400)] 
Bump to 0.3.5.14-dev

4 years agoMerge branch 'bug40316_035_v2' into maint-0.3.5
Nick Mathewson [Mon, 15 Mar 2021 12:58:54 +0000 (08:58 -0400)] 
Merge branch 'bug40316_035_v2' into maint-0.3.5

4 years agoFix detection of point to insert signatures on a pending consensus.
Nick Mathewson [Wed, 3 Mar 2021 20:14:31 +0000 (15:14 -0500)] 
Fix detection of point to insert signatures on a pending consensus.

We were looking for the first instance of "directory-signature "
when instead the correct behavior is to look for the first instance
of "directory-signature " at the start of a line.

Unfortunately, this can be exploited as to crash authorities while
they're voting.

Fixes #40316; bugfix on 0.2.2.4-alpha.  This is TROVE-2021-002,
also tracked as CVE-2021-28090.

4 years agoClarify new intended strategy with TROVE-2021-001
Nick Mathewson [Mon, 15 Mar 2021 12:53:36 +0000 (08:53 -0400)] 
Clarify new intended strategy with TROVE-2021-001

We're going to disable this feature in all versions for now.

4 years agoMerge branch 'bug40286_disable_min_035' into maint-0.3.5
Nick Mathewson [Mon, 15 Mar 2021 12:41:03 +0000 (08:41 -0400)] 
Merge branch 'bug40286_disable_min_035' into maint-0.3.5

4 years agoBump to 0.3.5.14
Nick Mathewson [Mon, 15 Mar 2021 11:39:45 +0000 (07:39 -0400)] 
Bump to 0.3.5.14

4 years agoRemove maxmind license; add ipfire location database license (cc by-sa 4.0)
Nick Mathewson [Fri, 12 Mar 2021 16:36:28 +0000 (11:36 -0500)] 
Remove maxmind license; add ipfire location database license (cc by-sa 4.0)

4 years agoUse the right ticket number.
Nick Mathewson [Fri, 12 Mar 2021 16:31:36 +0000 (11:31 -0500)] 
Use the right ticket number.

4 years agoupdate geoip-2021-03-12 to mention provider transition.
Nick Mathewson [Fri, 12 Mar 2021 16:29:09 +0000 (11:29 -0500)] 
update geoip-2021-03-12 to mention provider transition.

4 years agoUpdate geoip files to match ipfire location db, 2021/03/12.
Nick Mathewson [Fri, 12 Mar 2021 16:26:07 +0000 (11:26 -0500)] 
Update geoip files to match ipfire location db, 2021/03/12.

4 years agoRemove mallinfo() from codebase
David Goulet [Tue, 23 Feb 2021 16:02:33 +0000 (11:02 -0500)] 
Remove mallinfo() from codebase

Now deprecated in libc >= 2.33

Closes #40309

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoDisable the dump_desc() function.
Nick Mathewson [Fri, 19 Feb 2021 17:31:19 +0000 (12:31 -0500)] 
Disable the dump_desc() function.

It can be called with strings that should have been
length-delimited, but which in fact are not.  This can cause a
CPU-DoS bug or, in a worse case, a crash.

Since this function isn't essential, the best solution for older
Tors is to just turn it off.

Fixes bug 40286; bugfix on 0.2.2.1-alpha when dump_desc() was
introduced.

4 years agoBump to 0.3.5.13-dev.
Nick Mathewson [Wed, 3 Feb 2021 18:37:28 +0000 (13:37 -0500)] 
Bump to 0.3.5.13-dev.

4 years agoMerge branch 'ticket40269_035_01' into maint-0.3.5
David Goulet [Wed, 3 Feb 2021 14:11:09 +0000 (09:11 -0500)] 
Merge branch 'ticket40269_035_01' into maint-0.3.5

4 years agoRemove unused addr_port_set code
David Goulet [Mon, 1 Feb 2021 17:28:29 +0000 (12:28 -0500)] 
Remove unused addr_port_set code

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoMerge branch 'ticket40270_035_01' into maint-0.3.5
David Goulet [Wed, 3 Feb 2021 13:56:30 +0000 (08:56 -0500)] 
Merge branch 'ticket40270_035_01' into maint-0.3.5

4 years agonode: Move reentry set to use a digestmap_t
David Goulet [Mon, 1 Feb 2021 17:20:39 +0000 (12:20 -0500)] 
node: Move reentry set to use a digestmap_t

Any lookup now will be certain and not probabilistic as the bloomfilter.

Closes #40269

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agorelay: Send back CONNECTION_REFUSED on reentry
David Goulet [Mon, 1 Feb 2021 17:45:32 +0000 (12:45 -0500)] 
relay: Send back CONNECTION_REFUSED on reentry

The TORPROTOCOL reason causes the client to close the circuit which is not
what we want because other valid streams might be on it.

Instead, CONNECTION_REFUSED will leave it open but will not allow more streams
to be attached to it. The client then open a new circuit to the destination.

Closes #40270

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agorelay: Double the size of the relay reentry set
David Goulet [Mon, 1 Feb 2021 14:04:50 +0000 (09:04 -0500)] 
relay: Double the size of the relay reentry set

This is to minimize false positive and thus deny reentry to Exit connections
that were in reality not re-entering. Helps with overall UX.

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agorelay: Follow consensus parameter for network reentry
David Goulet [Mon, 1 Feb 2021 13:56:27 +0000 (08:56 -0500)] 
relay: Follow consensus parameter for network reentry

Obey the "allow-network-reentry" consensus parameters in order to decide to
allow it or not at the Exit.

Closes #40268

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agotest: Add test for exits blocking reentry to the network
George Kadianakis [Fri, 29 Jan 2021 16:21:30 +0000 (18:21 +0200)] 
test: Add test for exits blocking reentry to the network

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoexit: Deny re-entry into the network
Roger Dingledine [Thu, 28 Jan 2021 04:48:57 +0000 (23:48 -0500)] 
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>
4 years agorelay: Add bloomfiter of relay address + {OR|Dir}Port
David Goulet [Thu, 28 Jan 2021 02:49:56 +0000 (21:49 -0500)] 
relay: Add bloomfiter of relay address + {OR|Dir}Port

In order to deny re-entry in the network, we now keep a bloomfilter of relay
ORPort + address and authorities ORPort + address and DirPort + address
combinations.

So when an Exit stream is handled, we deny anything connecting back into the
network on the ORPorts for relays and on the ORPort+DirPort for the
authorities.

Related to #2667

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoMerge branch 'tor-gitlab/mr/50' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:46:24 +0000 (12:46 -0500)] 
Merge branch 'tor-gitlab/mr/50' into maint-0.3.5

4 years agoMerge branch 'tor-gitlab/mr/239' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:42:26 +0000 (12:42 -0500)] 
Merge branch 'tor-gitlab/mr/239' into maint-0.3.5

4 years agoMerge branch 'tor-gitlab/mr/243' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:36:35 +0000 (12:36 -0500)] 
Merge branch 'tor-gitlab/mr/243' into maint-0.3.5

4 years agoMerge branch 'tor-gitlab/mr/254' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:10:39 +0000 (12:10 -0500)] 
Merge branch 'tor-gitlab/mr/254' into maint-0.3.5

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/140' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:08:14 +0000 (12:08 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/140' into maint-0.3.5

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5
David Goulet [Thu, 28 Jan 2021 17:04:37 +0000 (12:04 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5

4 years agoBump to 0.3.5.13.
Nick Mathewson [Thu, 28 Jan 2021 16:17:32 +0000 (11:17 -0500)] 
Bump to 0.3.5.13.

4 years agogitignore: don't ignore core directory
Alex Xu (Hello71) [Thu, 21 Jan 2021 21:06:28 +0000 (16:06 -0500)] 
gitignore: don't ignore core directory

otherwise src/core is ignored.

4 years agobuild: Add "make lsp" command
David Goulet [Wed, 16 Dec 2020 15:01:15 +0000 (10:01 -0500)] 
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>
4 years agoMerge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5
Nick Mathewson [Tue, 19 Jan 2021 17:53:30 +0000 (12:53 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/259' into maint-0.3.5
Nick Mathewson [Tue, 19 Jan 2021 17:44:59 +0000 (12:44 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/259' into maint-0.3.5

4 years agogitignore: Add Linux core file patterns
David Goulet [Wed, 13 Jan 2021 15:37:56 +0000 (10:37 -0500)] 
gitignore: Add Linux core file patterns

Signed-off-by: David Goulet <dgoulet@torproject.org>
4 years agoBetter fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
Nick Mathewson [Wed, 13 Jan 2021 14:48:00 +0000 (09:48 -0500)] 
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.

4 years agohs-v3: Require reasonably live consensus
David Goulet [Mon, 11 Jan 2021 21:01:22 +0000 (16:01 -0500)] 
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>
4 years agoMerge branch 'ticket40241_035' into maint-0.3.5
Nick Mathewson [Mon, 11 Jan 2021 19:37:14 +0000 (14:37 -0500)] 
Merge branch 'ticket40241_035' into maint-0.3.5

4 years agoFix warnings in current debian-hardened CI.
Nick Mathewson [Mon, 11 Jan 2021 19:25:56 +0000 (14:25 -0500)] 
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.

4 years agoFix Keccak undefined behavior on exotic platforms.
George Kadianakis [Thu, 17 Dec 2020 11:49:17 +0000 (13:49 +0200)] 
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.

4 years agoSocks5: handle truncated client requests correctly
Nick Mathewson [Mon, 14 Dec 2020 15:14:03 +0000 (10:14 -0500)] 
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.

4 years agoMerge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5
Nick Mathewson [Tue, 17 Nov 2020 03:42:15 +0000 (22:42 -0500)] 
Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5

4 years agoBump to 0.3.5.12-dev
Nick Mathewson [Thu, 12 Nov 2020 13:11:01 +0000 (08:11 -0500)] 
Bump to 0.3.5.12-dev

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 agoHandle a change in the implementation of hashlib in Python 3.9
Nick Mathewson [Thu, 5 Nov 2020 14:34:36 +0000 (09:34 -0500)] 
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.

5 years agoFix a previously overstrict log message check.
Nick Mathewson [Wed, 28 Oct 2020 14:47:39 +0000 (10:47 -0400)] 
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.

5 years agoChanges file for #40165 (openssl deprecation warnings)
Nick Mathewson [Wed, 28 Oct 2020 14:34:18 +0000 (10:34 -0400)] 
Changes file for #40165 (openssl deprecation warnings)

5 years agoDo not define OPENSSL_VERSION in compat_openssl.h
Nick Mathewson [Wed, 28 Oct 2020 14:32:06 +0000 (10:32 -0400)] 
Do not define OPENSSL_VERSION in compat_openssl.h

Apparently it conflicts with definitions elsewhere in Openssl 3.0.0.

5 years agoconfigure: disable OpenSSL deprecation warnings with OpenSSL >= 3
Nick Mathewson [Wed, 28 Oct 2020 14:30:24 +0000 (10:30 -0400)] 
configure: disable OpenSSL deprecation warnings with OpenSSL >= 3

We can't do this in the C headers, since by the time we include
`opensslv.h` in order to check the openssl version number, we will
have included `openssl/macros.h`, which is the thing that checks
whether we disabled deprecation warnings.

5 years agoInclude a more modest openssl header in crypto_openssl_mgt.h
Nick Mathewson [Wed, 28 Oct 2020 14:07:56 +0000 (10:07 -0400)] 
Include a more modest openssl header in crypto_openssl_mgt.h

The "engines.h" header has lots of stuff; the "opensslv.h" header
has the version number, which is all we actually need here.

We need to do this because we're about to change this header to
conditionally define OPENSSL_SUPPRESS_DEPRECATED, and it would be
too late to do so if we'd already included "engines.h".

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