]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
3 years agoversion: Bump version to 0.3.5.18 maint-0.3.5
David Goulet [Mon, 24 Jan 2022 15:47:29 +0000 (10:47 -0500)] 
version: Bump version to 0.3.5.18

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agofallbackdir: Update list generated on January 24, 2022
David Goulet [Mon, 24 Jan 2022 15:35:02 +0000 (10:35 -0500)] 
fallbackdir: Update list generated on January 24, 2022

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agogeoip: Update to match ipfire location db, 2022/01/24.
David Goulet [Mon, 24 Jan 2022 15:31:43 +0000 (10:31 -0500)] 
geoip: Update to match ipfire location db, 2022/01/24.

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoMerge branch 'tor-gitlab/mr/511' into maint-0.3.5
David Goulet [Tue, 18 Jan 2022 18:15:33 +0000 (13:15 -0500)] 
Merge branch 'tor-gitlab/mr/511' into maint-0.3.5

3 years agoMerge branch 'tor-gitlab/mr/510' into maint-0.3.5
David Goulet [Tue, 18 Jan 2022 18:15:23 +0000 (13:15 -0500)] 
Merge branch 'tor-gitlab/mr/510' into maint-0.3.5

3 years agoUpdate new relay blogpost URL
Jérôme Charaoui [Mon, 10 Jan 2022 15:16:24 +0000 (15:16 +0000)] 
Update new relay blogpost URL

This removes the '/blog/' URL component which relies on a
redirection since the blog has been migrated to Lektor

3 years agomain: Update a dead URL in a log notice
David Goulet [Tue, 18 Jan 2022 17:51:52 +0000 (12:51 -0500)] 
main: Update a dead URL in a log notice

Change https://www.torproject.org/download/download#warning to
https://support.torproject.org/faq/staying-anonymous/

Closes #40544

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agorelay: Don't advertise HSv2 protocol version
David Goulet [Thu, 4 Nov 2021 18:44:58 +0000 (14:44 -0400)] 
relay: Don't advertise HSv2 protocol version

We removed HSIntro=3 and HSDir=1 that are v2 specific. Since 0.3.5.17,
we do not support introducing or being a directory for onion service v2.

Closes #40509

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoMerge remote-tracking branch 'tor-gitlab/mr/487' into maint-0.3.5
Alexander Færøy [Mon, 8 Nov 2021 14:15:59 +0000 (14:15 +0000)] 
Merge remote-tracking branch 'tor-gitlab/mr/487' into maint-0.3.5

3 years agoMerge remote-tracking branch 'tor-gitlab/mr/486' into maint-0.3.5
Alexander Færøy [Mon, 8 Nov 2021 14:15:56 +0000 (14:15 +0000)] 
Merge remote-tracking branch 'tor-gitlab/mr/486' into maint-0.3.5

3 years agoGive an error message if LibreSSL's TLSv1.3 APIs aren't what we need
Nick Mathewson [Sat, 6 Nov 2021 15:04:08 +0000 (11:04 -0400)] 
Give an error message if LibreSSL's TLSv1.3 APIs aren't what we need

From LibreSSL versions 3.2.1 through 3.4.0, our configure script
would conclude that TLSv1.3 as supported, but it actually wasn't.
This led to annoying breakage like #40128 and #40445.

Now we give an error message if we try to build with one of those
versions.

Closes #40511.

3 years agoReverse the direction of the test for openssl 3.0.0
Nick Mathewson [Fri, 5 Nov 2021 17:23:05 +0000 (13:23 -0400)] 
Reverse the direction of the test for openssl 3.0.0

Previously the logic was reversed, and always gave the wrong answer.
This has no other effect than to change whether we suppress
deprecated API warnings.

Fixes #40429; bugfix on 0.3.5.13.

3 years agoLight edit to protover warnings.
Nick Mathewson [Fri, 5 Nov 2021 14:30:57 +0000 (10:30 -0400)] 
Light edit to protover warnings.

3 years agoprotover: Add a note on why LinkAuth is not recommended or required
David Goulet [Fri, 5 Nov 2021 14:16:08 +0000 (10:16 -0400)] 
protover: Add a note on why LinkAuth is not recommended or required

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoprotover: Move all hardcoded lists in one place
David Goulet [Fri, 5 Nov 2021 14:10:24 +0000 (10:10 -0400)] 
protover: Move all hardcoded lists in one place

This also moves the warnings and add some theatrical effect around the
code so anyone modifying those list should notice the warnings signs and
read the comment accordingly.

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoAdd scary warnings about changing the protover list.
Nick Mathewson [Fri, 5 Nov 2021 13:15:10 +0000 (09:15 -0400)] 
Add scary warnings about changing the protover list.

Doing this in the wrong way has potential to cause serious havoc on
the network, so let's make it harder for future programmers to mess
it up.

3 years agoMerge remote-tracking branch 'ahf/ahf/ci-i386' into maint-0.3.5
Alexander Færøy [Fri, 5 Nov 2021 03:10:12 +0000 (03:10 +0000)] 
Merge remote-tracking branch 'ahf/ahf/ci-i386' into maint-0.3.5

3 years agoshellcheck: Make it happy on couple scripts
David Goulet [Wed, 3 Nov 2021 13:47:30 +0000 (09:47 -0400)] 
shellcheck: Make it happy on couple scripts

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoAdd i386 version of debian-minimal for 32-bit Gitlab CI builds.
Alexander Færøy [Wed, 3 Nov 2021 12:36:30 +0000 (12:36 +0000)] 
Add i386 version of debian-minimal for 32-bit Gitlab CI builds.

See: tpo/core/tor#40505

3 years agoFix Windows build.
Alexander Færøy [Fri, 5 Feb 2021 17:12:52 +0000 (17:12 +0000)] 
Fix Windows build.

While trying to resolve our CI issues, the Windows build broke with an
unused function error:

   src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’
   defined but not used [-Werror=unused-function]

We solve this by moving the `#if !defined(_WIN32)` test above the
`unprivileged_port_range_start()` function defintion such that it is
included in its body.

This is an unreviewed commit.

See: tor#40275

3 years agochanges: Add file for ticket 26299
David Goulet [Fri, 29 Oct 2021 13:19:21 +0000 (09:19 -0400)] 
changes: Add file for ticket 26299

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agomakefile: Add a reproducible dist make job
David Goulet [Thu, 28 Oct 2021 20:29:22 +0000 (16:29 -0400)] 
makefile: Add a reproducible dist make job

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agorelease: Patches to make tarball reproducible
Alexander Færøy [Fri, 10 Jul 2020 00:31:35 +0000 (02:31 +0200)] 
release: Patches to make tarball reproducible

Closes #26299

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoversion: Missing version update in couple files
David Goulet [Thu, 28 Oct 2021 13:40:50 +0000 (09:40 -0400)] 
version: Missing version update in couple files

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoci: Missing source dir when parsing configure.ac version
David Goulet [Tue, 26 Oct 2021 18:33:31 +0000 (14:33 -0400)] 
ci: Missing source dir when parsing configure.ac version

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 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>
3 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>
3 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>
3 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

3 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

3 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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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

3 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.

3 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.

3 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>
3 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.

3 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.

3 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.