]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoMerge branch 'bug26116_029' into bug26116_033
Nick Mathewson [Wed, 16 May 2018 15:43:53 +0000 (11:43 -0400)] 
Merge branch 'bug26116_029' into bug26116_033

7 years agoReturn -1 from our PEM password callback
Nick Mathewson [Wed, 16 May 2018 15:39:42 +0000 (11:39 -0400)] 
Return -1 from our PEM password callback

Apparently, contrary to its documentation, this is how OpenSSL now
wants us to report an error.

Fixes bug 26116; bugfix on 0.2.5.16.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 15 May 2018 13:32:44 +0000 (09:32 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 15 May 2018 13:32:44 +0000 (09:32 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 15 May 2018 13:32:44 +0000 (09:32 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoUpdate geoip and geoip6 to the May 1 2018 database.
Karsten Loesing [Tue, 15 May 2018 13:16:47 +0000 (15:16 +0200)] 
Update geoip and geoip6 to the May 1 2018 database.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 10 May 2018 13:22:32 +0000 (09:22 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 10 May 2018 13:22:32 +0000 (09:22 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'dgoulet/bug26069_031_01' into maint-0.3.1
Nick Mathewson [Thu, 10 May 2018 13:22:14 +0000 (09:22 -0400)] 
Merge remote-tracking branch 'dgoulet/bug26069_031_01' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 10 May 2018 13:19:28 +0000 (09:19 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 10 May 2018 13:19:28 +0000 (09:19 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Thu, 10 May 2018 13:19:28 +0000 (09:19 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge remote-tracking branch 'juga/ticket26007_029_02' into maint-0.2.9
Nick Mathewson [Thu, 10 May 2018 13:19:09 +0000 (09:19 -0400)] 
Merge remote-tracking branch 'juga/ticket26007_029_02' into maint-0.2.9

7 years agohs-v3: Add an extra white-space when parsing descriptor
David Goulet [Thu, 10 May 2018 13:16:50 +0000 (09:16 -0400)] 
hs-v3: Add an extra white-space when parsing descriptor

The specification describes the signature token to be right after a newline
(\n) then the token "signature" and then a white-space followed by the encoded
signature.

This commit makes sure that when we parse the signature from the descriptor,
we are always looking for that extra white-space at the end of the token.

It will allow us also to support future fields that might start with
"signature".

Fixes #26069

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 10 May 2018 12:03:04 +0000 (08:03 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 10 May 2018 12:02:10 +0000 (08:02 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Thu, 10 May 2018 12:00:35 +0000 (08:00 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoHaving a ControlPort open doesn't mean we are a client
David Goulet [Wed, 9 May 2018 16:40:06 +0000 (12:40 -0400)] 
Having a ControlPort open doesn't mean we are a client

The any_client_port_set() returns true if the ControlPort is set which is
wrong because we can have that port open but still not behave as a tor client
(like many relays for instance).

Fixes #26062

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoTest read bandwidth measurements with empty file
juga0 [Tue, 8 May 2018 16:23:37 +0000 (16:23 +0000)] 
Test read bandwidth measurements with empty file

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 9 May 2018 15:53:18 +0000 (11:53 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'asn-github/bug25761_032' into maint-0.3.2
Nick Mathewson [Wed, 9 May 2018 15:53:15 +0000 (11:53 -0400)] 
Merge remote-tracking branch 'asn-github/bug25761_032' into maint-0.3.2

7 years agoStop logging stack contents when reading a zero-length bandwidth file
teor [Wed, 2 May 2018 12:33:21 +0000 (22:33 +1000)] 
Stop logging stack contents when reading a zero-length bandwidth file

When directory authorities read a zero-byte bandwidth file, they log
a warning with the contents of an uninitialised buffer. Log a warning
about the empty file instead.

Fixes bug 26007; bugfix on 0.2.2.1-alpha.

7 years agoMerge branch 'libressl_201805_033' into maint-0.3.3
Nick Mathewson [Wed, 9 May 2018 12:25:32 +0000 (08:25 -0400)] 
Merge branch 'libressl_201805_033' into maint-0.3.3

7 years agoDetect when v3 services get disabled after HUP.
George Kadianakis [Tue, 8 May 2018 15:14:02 +0000 (18:14 +0300)] 
Detect when v3 services get disabled after HUP.

Remove v3 optimization which made Tor not detect disabling services.

This optimization is not so needed because we only call that function after HUP
anyway.

Fixes bug #25761.

7 years agoDetect when v2 services get disabled after HUP.
George Kadianakis [Tue, 8 May 2018 15:07:08 +0000 (18:07 +0300)] 
Detect when v2 services get disabled after HUP.

During service configuration, rend_service_prune_list_impl_() sets
rend_service_staging_list to NULL, which blocked pruning after a HUP.

This patch initializes rend_service_staging_list when needed, so that HUP can
detect disabled onion services.

Fixes bug #25761.

7 years agomanpage fix to stop saying CacheIPv4DNS is on by default
Roger Dingledine [Tue, 8 May 2018 17:13:45 +0000 (13:13 -0400)] 
manpage fix to stop saying CacheIPv4DNS is on by default

Stop saying in the manual that clients cache ipv4 dns answers from exit
relays. We haven't used them since 0.2.6.3-alpha, and in ticket 24050
we stopped even caching them as of 0.3.2.6-alpha, but we forgot to say
so in the man page.

Fixes bug 26052; bugfix on 0.3.2.6-alpha.

7 years agoMerge remote-tracking branch 'mikeperry/bug25733_029' into maint-0.3.3
Nick Mathewson [Mon, 7 May 2018 17:33:12 +0000 (13:33 -0400)] 
Merge remote-tracking branch 'mikeperry/bug25733_029' into maint-0.3.3

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Thu, 3 May 2018 17:38:54 +0000 (13:38 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 3 May 2018 17:38:54 +0000 (13:38 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 3 May 2018 17:38:54 +0000 (13:38 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3
Nick Mathewson [Thu, 3 May 2018 17:38:51 +0000 (13:38 -0400)] 
Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

7 years agoMerge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1
Nick Mathewson [Thu, 3 May 2018 17:38:46 +0000 (13:38 -0400)] 
Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

7 years agoMerge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9
Nick Mathewson [Thu, 3 May 2018 17:38:37 +0000 (13:38 -0400)] 
Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

7 years agoMerge remote-tracking branch 'teor/bug25998' into maint-0.3.3
Nick Mathewson [Thu, 3 May 2018 17:37:33 +0000 (13:37 -0400)] 
Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Wed, 2 May 2018 12:46:28 +0000 (08:46 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Wed, 2 May 2018 12:46:28 +0000 (08:46 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 2 May 2018 12:46:28 +0000 (08:46 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoStop logging stack contents when reading a zero-length bandwidth file
teor [Wed, 2 May 2018 12:33:21 +0000 (22:33 +1000)] 
Stop logging stack contents when reading a zero-length bandwidth file

When directory authorities read a zero-byte bandwidth file, they log
a warning with the contents of an uninitialised buffer. Log a warning
about the empty file instead.

Fixes bug 26007; bugfix on 0.2.2.1-alpha.

7 years agoMerge branch 'libressl_201805_029' into maint-0.3.3
Nick Mathewson [Wed, 2 May 2018 12:26:49 +0000 (08:26 -0400)] 
Merge branch 'libressl_201805_029' into maint-0.3.3

7 years agoLibreSSL compatibility fixes.
Nick Mathewson [Wed, 2 May 2018 12:18:48 +0000 (08:18 -0400)] 
LibreSSL compatibility fixes.

LibreSSL, despite not having the OpenSSL 1.1 API, does define
OPENSSL_VERSION in crypto.h.  Additionally, it apparently annotates
some functions as returning NULL, so that our unit tests need to be
more careful about checking for NULL so they don't get compilation
warnings.

Closes ticket 26006.

7 years agoman page: FetchUselessDescriptors and DirCache exclude extra infos
teor [Wed, 2 May 2018 01:29:48 +0000 (11:29 +1000)] 
man page: FetchUselessDescriptors and DirCache exclude extra infos

7 years agoman page: UseMicrodescriptors auto and 1 are the same now
teor [Wed, 2 May 2018 00:46:10 +0000 (10:46 +1000)] 
man page: UseMicrodescriptors auto and 1 are the same now

7 years agoman page: FetchUselessDescriptors stops tor going idle
teor [Wed, 2 May 2018 00:46:00 +0000 (10:46 +1000)] 
man page: FetchUselessDescriptors stops tor going idle

Also explain how FetchUselessDescriptors and UseMicrodescriptors are
different.

Closes 25998.

7 years agoStop initialising rust submodules, travis does this for us
teor [Fri, 15 Dec 2017 01:55:02 +0000 (12:55 +1100)] 
Stop initialising rust submodules, travis does this for us

Fixes #24630.

7 years agoBug 25733: Avoid assert failure if all circuits time out.
Mike Perry [Mon, 16 Apr 2018 22:49:27 +0000 (22:49 +0000)] 
Bug 25733: Avoid assert failure if all circuits time out.

Prior to #23100, we were not counting HS circuit build times in our
calculation of the timeout. This could lead to a condition where our timeout
was set too low, based on non HS circuit build times, and then we would
abandon all HS circuits, storing no valid timeouts in the histogram.

This commit avoids the assert.

7 years agoMerge branch 'bug25936-032' into bug25936-033
Taylor Yu [Thu, 26 Apr 2018 21:07:56 +0000 (16:07 -0500)] 
Merge branch 'bug25936-032' into bug25936-033

7 years agoMerge branch 'bug25936-031' into bug25936-032
Taylor Yu [Thu, 26 Apr 2018 20:58:39 +0000 (15:58 -0500)] 
Merge branch 'bug25936-031' into bug25936-032

7 years agoMerge branch 'bug25936-029' into bug25936-031
Taylor Yu [Thu, 26 Apr 2018 20:46:57 +0000 (15:46 -0500)] 
Merge branch 'bug25936-029' into bug25936-031

7 years agoShow test-suite.log for distcheck on Travis CI
Taylor Yu [Thu, 26 Apr 2018 19:22:52 +0000 (14:22 -0500)] 
Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 25 Apr 2018 12:01:54 +0000 (08:01 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Wed, 25 Apr 2018 12:01:53 +0000 (08:01 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoFix a copy-paste error in the fix for #23693.
Nick Mathewson [Wed, 25 Apr 2018 12:00:55 +0000 (08:00 -0400)] 
Fix a copy-paste error in the fix for #23693.

Found by coverity; CID 25912; bug not in any released Tor.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'travis_distcheck_033' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:38:34 +0000 (10:38 -0400)] 
Merge branch 'travis_distcheck_033' into maint-0.3.3

7 years agoMerge branch 'travis_distcheck_029' into maint-0.2.9
Nick Mathewson [Tue, 24 Apr 2018 14:38:19 +0000 (10:38 -0400)] 
Merge branch 'travis_distcheck_029' into maint-0.2.9

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:37:36 +0000 (10:37 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'dgoulet/bug25901_032_01' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 14:36:17 +0000 (10:36 -0400)] 
Merge remote-tracking branch 'dgoulet/bug25901_032_01' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 12:51:55 +0000 (08:51 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 12:49:24 +0000 (08:49 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'public/bug23693_031_redux' into maint-0.3.1
Nick Mathewson [Tue, 24 Apr 2018 12:49:20 +0000 (08:49 -0400)] 
Merge remote-tracking branch 'public/bug23693_031_redux' into maint-0.3.1

7 years agohs: Fix memleak in v3 on SIGHUP
David Goulet [Mon, 23 Apr 2018 15:09:57 +0000 (11:09 -0400)] 
hs: Fix memleak in v3 on SIGHUP

Fixes #25901

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 23 Apr 2018 13:24:33 +0000 (09:24 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'bug24969_029_v2' into maint-0.2.9
Nick Mathewson [Mon, 23 Apr 2018 13:23:25 +0000 (09:23 -0400)] 
Merge branch 'bug24969_029_v2' into maint-0.2.9

7 years agoPermit the nanosleep system call in the seccomp2 callbox
Nick Mathewson [Wed, 18 Apr 2018 14:25:42 +0000 (10:25 -0400)] 
Permit the nanosleep system call in the seccomp2 callbox

Fixes bug 24969; bugfix on 0.2.5.1-alpha when the sandbox was introduced.

7 years agoAllow cpuworkers to exist without onion keys
Nick Mathewson [Sun, 22 Apr 2018 21:12:18 +0000 (17:12 -0400)] 
Allow cpuworkers to exist without onion keys

Now that we allow cpuworkers for dirport-only hosts (to fix 23693),
we need to allow dup_onion_keys() to succeed for them.

The change to construct_ntor_key_map() is for correctness,
but is not strictly necessary.

7 years agoFix documentation bug 25857: the universe is ::/0, not ::/128
Nick Mathewson [Fri, 20 Apr 2018 18:35:33 +0000 (14:35 -0400)] 
Fix documentation bug 25857: the universe is ::/0, not ::/128

Patch from CTassisF.

7 years agoMerge branch 'travis_distcheck_031' into travis_distcheck_033
Nick Mathewson [Wed, 18 Apr 2018 22:37:59 +0000 (18:37 -0400)] 
Merge branch 'travis_distcheck_031' into travis_distcheck_033

7 years agoTest the with-rust and without-rust distcheck variants
Nick Mathewson [Wed, 18 Apr 2018 21:36:35 +0000 (17:36 -0400)] 
Test the with-rust and without-rust distcheck variants

7 years agoMerge branch 'travis_distcheck_029' into travis_distcheck_033
Nick Mathewson [Wed, 18 Apr 2018 22:34:28 +0000 (18:34 -0400)] 
Merge branch 'travis_distcheck_029' into travis_distcheck_033

7 years agoMerge branch 'travis_distcheck_029' into travis_distcheck_031
Nick Mathewson [Wed, 18 Apr 2018 21:35:41 +0000 (17:35 -0400)] 
Merge branch 'travis_distcheck_029' into travis_distcheck_031

7 years agoAdd distcheck support to travis configuration.
Nick Mathewson [Wed, 18 Apr 2018 18:24:54 +0000 (14:24 -0400)] 
Add distcheck support to travis configuration.

Implements 25814.

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 17 Apr 2018 14:48:18 +0000 (10:48 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 17 Apr 2018 14:48:18 +0000 (10:48 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 17 Apr 2018 14:47:30 +0000 (10:47 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoheartbeat: Log the number of circuits killed because too many cells
David Goulet [Tue, 17 Apr 2018 12:38:34 +0000 (08:38 -0400)] 
heartbeat: Log the number of circuits killed because too many cells

We recently merged a circuit cell queue size safeguard. This commit adds the
number of killed circuits that have reached the limit to the DoS heartbeat. It
now looks like this:

  [notice] DoS mitigation since startup: 0 circuits killed with too many
  cells. 0 circuits rejected, 0 marked addresses. 0 connections closed. 0
  single hop clients refused.

Second thing that this patch does. It makes tor always print the DoS
mitigation heartbeat line (for a relay) even though no DoS mitigation have
been enabled. The reason is because we now kill circuits that have too many
cells regardless on if it is enabled or not but also it will give the operator
a chance to learn what is enabled with the heartbeat instead of suddenly
appearing when it is enabled by let say the consensus.

Fixes #25824

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoAdd support for the coveralls.io coverage tool in travis config
Nick Mathewson [Mon, 16 Apr 2018 18:42:28 +0000 (14:42 -0400)] 
Add support for the coveralls.io coverage tool in travis config

Closes ticket 25818.

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 16 Apr 2018 17:48:23 +0000 (13:48 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Mon, 16 Apr 2018 17:48:23 +0000 (13:48 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 16 Apr 2018 17:48:23 +0000 (13:48 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoFix an LCOV exclusion pattern in address.c
Nick Mathewson [Mon, 16 Apr 2018 17:48:21 +0000 (13:48 -0400)] 
Fix an LCOV exclusion pattern in address.c

7 years agoMerge remote-tracking branch 'dgoulet/bug25226_033_02' into maint-0.3.3
Nick Mathewson [Mon, 16 Apr 2018 14:04:36 +0000 (10:04 -0400)] 
Merge remote-tracking branch 'dgoulet/bug25226_033_02' into maint-0.3.3

7 years agorelay: Implement a circuit cell queue maximum size
David Goulet [Tue, 20 Mar 2018 19:27:58 +0000 (15:27 -0400)] 
relay: Implement a circuit cell queue maximum size

This commit introduces the consensus parameter "circ_max_cell_queue_size"
which controls the maximum number of cells a circuit queue should have.

The default value is currently 50000 cells which is above what should be
expected but keeps us a margin of error for padding cells.

Related to this is #9072. Back in 0.2.4.14-alpha, we've removed that limit due
to a Guard discovery attack. Ticket #25226 details why we are putting back the
limit due to the memory pressure issue on relays.

Fixes #25226

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agobump to 0.3.3.5-rc-dev
Nick Mathewson [Sun, 15 Apr 2018 19:41:03 +0000 (15:41 -0400)] 
bump to 0.3.3.5-rc-dev

7 years agobump to 0.3.3.5-rc
Nick Mathewson [Sat, 14 Apr 2018 16:21:36 +0000 (12:21 -0400)] 
bump to 0.3.3.5-rc

7 years agoMerge remote-tracking branch 'dgoulet/ticket25248_033_02' into maint-0.3.3
Nick Mathewson [Fri, 13 Apr 2018 17:09:11 +0000 (13:09 -0400)] 
Merge remote-tracking branch 'dgoulet/ticket25248_033_02' into maint-0.3.3

7 years agodoc: Fix typo and clarify that DoS options are relay only
Mike Perry [Wed, 11 Apr 2018 02:47:00 +0000 (02:47 +0000)] 
doc: Fix typo and clarify that DoS options are relay only

7 years agodoc: Move DOS options below SERVER options
David Goulet [Thu, 12 Apr 2018 14:40:03 +0000 (10:40 -0400)] 
doc: Move DOS options below SERVER options

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodoc: Improve DoS section of the man page tor.1
David Goulet [Wed, 4 Apr 2018 14:22:13 +0000 (10:22 -0400)] 
doc: Improve DoS section of the man page tor.1

Add to the Denial of Service section of the man page an explanation about the
three different mitigation Tor has.

Fixes #25248.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoRefine extend_info_for_node's "enough info" check once again.
Nick Mathewson [Thu, 12 Apr 2018 20:53:53 +0000 (16:53 -0400)] 
Refine extend_info_for_node's "enough info" check once again.

In d1874b433953f64, we adjusted this check so that we insist on
using routerinfos for bridges.  That's almost correct... but if we
have a bridge that is also a regular relay, then we should use
insist on its routerinfo when connecting to it as a bridge
(directly), and be willing to use its microdescriptor when
connecting to it elsewhere in our circuits.

This bug is a likely cause of some (all?) of the (exit_ei == NULL)
failures we've been seeing.

Fixes bug 25691; bugfix on 0.3.3.4-alpha

7 years agoAttempt to fix 32-bit clang builds, which broke with 31508a0abccfee1cd
Nick Mathewson [Thu, 12 Apr 2018 16:24:36 +0000 (12:24 -0400)] 
Attempt to fix 32-bit clang builds, which broke with 31508a0abccfee1cd

When size_t is 32 bits, the unit tests can't fit anything more than
4GB-1 into a size_t.

Additionally, tt_int_op() uses "long" -- we need tt_u64_op() to
safely test uint64_t values for equality.

Bug caused by tests for #24782 fix; not in any released Tor.

7 years agoAttempt to fix 32-bit builds, which broke with 31508a0abccfee1cd
Nick Mathewson [Thu, 12 Apr 2018 16:24:36 +0000 (12:24 -0400)] 
Attempt to fix 32-bit builds, which broke with 31508a0abccfee1cd

When size_t is 32 bits, doing "size_t ram; if (ram > 8GB) { ... }"
produces a compile-time warning.

Bug caused by #24782 fix; not in any released Tor.

7 years agoUse less memory for MaxMemInQueues for machines with more than 8 GB of RAM.
Alexander Færøy [Tue, 3 Apr 2018 16:26:52 +0000 (18:26 +0200)] 
Use less memory for MaxMemInQueues for machines with more than 8 GB of RAM.

This patch changes the algorithm of compute_real_max_mem_in_queues() to
use 0.4 * RAM iff the system has more than or equal to 8 GB of RAM, but
will continue to use the old value of 0.75 * RAM if the system have less
than * GB of RAM available.

This patch also adds tests for compute_real_max_mem_in_queues().

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

7 years agoUse STATIC for compute_real_max_mem_in_queues
Alexander Færøy [Tue, 3 Apr 2018 15:44:42 +0000 (17:44 +0200)] 
Use STATIC for compute_real_max_mem_in_queues

This patch makes compute_real_max_mem_in_queues use the STATIC macro,
which allows us to test the function.

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

7 years agoMake get_total_system_memory mockable.
Alexander Færøy [Tue, 3 Apr 2018 15:43:17 +0000 (17:43 +0200)] 
Make get_total_system_memory mockable.

This patch makes get_total_system_memory mockable, which allows us to
alter the return value of the function in tests.

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

7 years agoMerge branch 'bug25581_033_v2_asn_squashed' into maint-0.3.3
Nick Mathewson [Wed, 11 Apr 2018 19:37:56 +0000 (15:37 -0400)] 
Merge branch 'bug25581_033_v2_asn_squashed' into maint-0.3.3

7 years agoRename HSLayer{2,3}Nodes to start without an underscore.
Nick Mathewson [Mon, 26 Mar 2018 13:25:38 +0000 (09:25 -0400)] 
Rename HSLayer{2,3}Nodes to start without an underscore.

The old single-underscore names remain as a deprecated synonym.

Fixes bug 25581; bugfix on 0.3.3.1-alpha.