]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
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 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

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 agoResolve a compilation warning in test_connection.c
Nick Mathewson [Mon, 14 Sep 2020 15:50:38 +0000 (11:50 -0400)] 
Resolve a compilation warning in test_connection.c

Instead of casting an enum to a void and back, use a string --
that's better C anyway.

Fixes bug 40113; bugfix on 0.2.9.3-alpha.

5 years agostatistics: Properly count all rendezvous cells (avoid undercounting).
George Kadianakis [Mon, 7 Sep 2020 10:17:41 +0000 (13:17 +0300)] 
statistics: Properly count all rendezvous cells (avoid undercounting).

tl;dr We were not counting cells flying from the client to the service, but we
were counting cells flying from the service to the client.

When a rendezvous cell arrives from the client to the RP, the RP forwards it to
the service.

For this to happen, the cell first passes through command_process_relay_cell()
which normally does the statistics counting. However because the `rend_circ`
circuit was not flagged with `circuit_carries_hs_traffic_stats` in
rend_mid_rendezvous(), the cell is not counted there.

Then the cell goes to circuit_receive_relay_cell() which has a special code
block based on `rend_splice` specifically for rendezvous cells, and the cell
gets directly passed to `rend_circ` via a direct call to
circuit_receive_relay_cell(). The cell never passes through
command_process_relay_cell() ever again and hence is never counted by our
rephist module.

The fix here is to flag the `rend_circ` circuit with
`circuit_carries_hs_traffic_stats` so that the cell is counted as soon as it
hits command_process_relay_cell().

Furthermore we avoid double-counting cells since the special code block of
circuit_receive_relay_cell() makes us count rendezvous cells only as they enter
the RP and not as they exit it.

Fixes #40117.

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.