]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
Nick Mathewson [Tue, 11 Jun 2019 14:17:18 +0000 (10:17 -0400)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.5
Nick Mathewson [Tue, 11 Jun 2019 14:17:17 +0000 (10:17 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.5

6 years agoUpdate geoip and geoip6 to the June 10 2019 database.
Karsten Loesing [Tue, 11 Jun 2019 14:12:50 +0000 (16:12 +0200)] 
Update geoip and geoip6 to the June 10 2019 database.

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Tue, 11 Jun 2019 04:52:27 +0000 (14:52 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/1094' into maint-0.3.5
teor [Tue, 11 Jun 2019 04:51:46 +0000 (14:51 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1094' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/1091' into maint-0.3.5
teor [Tue, 11 Jun 2019 04:51:37 +0000 (14:51 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1091' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/990' into maint-0.3.5
teor [Tue, 11 Jun 2019 04:48:52 +0000 (14:48 +1000)] 
Merge remote-tracking branch 'tor-github/pr/990' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/971' into maint-0.3.5
teor [Tue, 11 Jun 2019 04:47:40 +0000 (14:47 +1000)] 
Merge remote-tracking branch 'tor-github/pr/971' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/924' into maint-0.3.5
teor [Tue, 11 Jun 2019 04:46:24 +0000 (14:46 +1000)] 
Merge remote-tracking branch 'tor-github/pr/924' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/1094' into maint-0.4.0
Nick Mathewson [Mon, 10 Jun 2019 22:44:20 +0000 (18:44 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1094' into maint-0.4.0

6 years agoMerge branch 'bug30713_035' into bug30713_040
teor [Mon, 10 Jun 2019 10:50:53 +0000 (20:50 +1000)] 
Merge branch 'bug30713_035' into bug30713_040

6 years agoTravis: Skip test_rebind on macOS builds
teor [Mon, 10 Jun 2019 08:59:02 +0000 (18:59 +1000)] 
Travis: Skip test_rebind on macOS builds

Skip test_rebind when the TOR_SKIP_TEST_REBIND environmental variable
is set.

Skip test_rebind on macOS in Travis builds, because it is unreliable
on macOS on Travis.

Fixes bug 30713; bugfix on 0.3.5.1-alpha.

6 years agoTravis: allow the test-stem job to fail
teor [Mon, 10 Jun 2019 09:18:35 +0000 (19:18 +1000)] 
Travis: allow the test-stem job to fail

Allow the test-stem job to fail in Travis, because it sometimes hangs.

Fixes bug 30744; bugfix on 0.3.5.4-alpha.

6 years agoMerge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:22:52 +0000 (16:22 -0400)] 
Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:22:29 +0000 (16:22 -0400)] 
Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:16:34 +0000 (16:16 -0400)] 
Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:14:51 +0000 (16:14 -0400)] 
Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:13:53 +0000 (16:13 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:12:07 +0000 (16:12 -0400)] 
Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0
Nick Mathewson [Wed, 5 Jun 2019 20:10:51 +0000 (16:10 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

6 years agoMerge branch 'tor-github/pr/924' into maint-0.4.0
George Kadianakis [Wed, 29 May 2019 18:19:56 +0000 (21:19 +0300)] 
Merge branch 'tor-github/pr/924' into maint-0.4.0

6 years agoMerge remote-tracking branch 'nickm/ticket30454_034_01_squashed' into ticket30454_035_01
David Goulet [Wed, 22 May 2019 15:43:55 +0000 (11:43 -0400)] 
Merge remote-tracking branch 'nickm/ticket30454_034_01_squashed' into ticket30454_035_01

6 years agohs: Remove hs_cell_onion_key_type_t enum
David Goulet [Wed, 15 May 2019 19:30:29 +0000 (15:30 -0400)] 
hs: Remove hs_cell_onion_key_type_t enum

Unify this with the trunnel ABI so we don't duplicate.

Part of #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agotrunnel: Remove INTRODUCE1 status code IN statement
David Goulet [Wed, 15 May 2019 19:27:27 +0000 (15:27 -0400)] 
trunnel: Remove INTRODUCE1 status code IN statement

We want to support parsing a cell with unknown status code so we are forward
compatible.

Part of #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agohs: Add changes file for #30454
David Goulet [Thu, 9 May 2019 17:23:14 +0000 (13:23 -0400)] 
hs: Add changes file for #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agohs: Remove hs_intro_auth_key_type_t enum
David Goulet [Thu, 9 May 2019 17:09:44 +0000 (13:09 -0400)] 
hs: Remove hs_intro_auth_key_type_t enum

Like the previous commit about the INTRODUCE_ACK status code, change all auth
key type to use the one defined in the trunnel file.

Standardize the use of these auth type to a common ABI.

Part of #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agohs: Get rid of duplicate hs_cell_introd_ack_status_t
David Goulet [Thu, 9 May 2019 17:01:15 +0000 (13:01 -0400)] 
hs: Get rid of duplicate hs_cell_introd_ack_status_t

This enum was the exact same as hs_intro_ack_status_t that was removed at the
previous commit. It was used client side when parsing the INTRODUCE_ACK cell.

Now, the entire code dealing with the INTRODUCE_ACK cell (both sending and
receiving) have been modified to all use the same ABI defined in the trunnel
introduce1 file.

Finally, the client will default to the normal behavior when receiving an
unknown NACK status code which is to note down that we've failed and re-extend
to the next intro point. This way, unknown status code won't trigger a
different behavior client side.

Part of #30454.

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agohs: Define INTRODUCE_ACK status code in trunnel
David Goulet [Thu, 9 May 2019 16:55:52 +0000 (12:55 -0400)] 
hs: Define INTRODUCE_ACK status code in trunnel

Remove the hs_intro_ack_status_t enum and move the value into trunnel. Only
use these values from now on in the intro point code.

Interestingly enough, the client side also re-define these values in hs_cell.h
with the hs_cell_introd_ack_status_t enum. Next commit will fix that and force
to use the trunnel ABI.

Part of #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoMerge branch 'maint-0.3.4' into maint-0.3.5
Nick Mathewson [Fri, 17 May 2019 12:10:16 +0000 (08:10 -0400)] 
Merge branch 'maint-0.3.4' into maint-0.3.5

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
Nick Mathewson [Fri, 17 May 2019 12:10:16 +0000 (08:10 -0400)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.4 maint-0.3.4
Nick Mathewson [Fri, 17 May 2019 12:10:15 +0000 (08:10 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.4

6 years agoUpdate geoip and geoip6 to the May 13 2019 database.
Karsten Loesing [Fri, 17 May 2019 06:52:13 +0000 (08:52 +0200)] 
Update geoip and geoip6 to the May 13 2019 database.

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
Nick Mathewson [Wed, 15 May 2019 11:41:42 +0000 (07:41 -0400)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'bug30475_035' into maint-0.3.5
Nick Mathewson [Wed, 15 May 2019 11:41:34 +0000 (07:41 -0400)] 
Merge branch 'bug30475_035' into maint-0.3.5

6 years agoMerge branch 'tor-github/pr/1013' into maint-0.4.0
George Kadianakis [Wed, 15 May 2019 10:45:39 +0000 (13:45 +0300)] 
Merge branch 'tor-github/pr/1013' into maint-0.4.0

6 years agoMake --list-modules imply --hush
Nick Mathewson [Tue, 14 May 2019 23:55:35 +0000 (19:55 -0400)] 
Make --list-modules imply --hush

6 years agoAdd a --list-modules command
Nick Mathewson [Thu, 9 May 2019 15:26:13 +0000 (11:26 -0400)] 
Add a --list-modules command

Closes ticket 30452.

6 years agoDon't pass a NULL into a %s when logging client auth file load failure
Nick Mathewson [Fri, 10 May 2019 21:47:43 +0000 (17:47 -0400)] 
Don't pass a NULL into a %s when logging client auth file load failure

Fortunately, in 0.3.5.1-alpha we improved logging for various
failure cases involved with onion service client auth.

Unfortunately, for this one, we freed the file right before logging
its name.

Fortunately, tor_free() sets its pointer to NULL, so we didn't have
a use-after-free bug.

Unfortunately, passing NULL to %s is not defined.

Fortunately, GCC 9.1.1 caught the issue!

Unfortunately, nobody has actually tried building Tor with GCC 9.1.1
before. Or if they had, they didn't report the warning.

Fixes bug 30475; bugfix on 0.3.5.1-alpha.

6 years agohs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY
David Goulet [Thu, 9 May 2019 16:45:17 +0000 (12:45 -0400)] 
hs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY

The INTRODUCE1 trunnel definition file doesn't support that value so it can
not be used else it leads to an assert on the intro point side if ever tried.

Fortunately, it was impossible to reach that code path.

Part of #30454

Signed-off-by: David Goulet <dgoulet@torproject.org>
6 years agoBump to 0.4.0.5-dev
Nick Mathewson [Thu, 2 May 2019 18:32:55 +0000 (14:32 -0400)] 
Bump to 0.4.0.5-dev

6 years agobump to 0.4.0.5
Nick Mathewson [Tue, 30 Apr 2019 19:53:53 +0000 (15:53 -0400)] 
bump to 0.4.0.5

6 years agoMerge branch 'tor-github/pr/978' into maint-0.4.0
George Kadianakis [Tue, 30 Apr 2019 16:26:14 +0000 (19:26 +0300)] 
Merge branch 'tor-github/pr/978' into maint-0.4.0

6 years agoAdd changes file
rl1987 [Sun, 21 Apr 2019 18:06:57 +0000 (21:06 +0300)] 
Add changes file

6 years agoTravis: remove sudo configuration
rl1987 [Wed, 24 Apr 2019 10:29:23 +0000 (13:29 +0300)] 
Travis: remove sudo configuration

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

6 years agoAdd changes file
rl1987 [Sun, 21 Apr 2019 18:06:57 +0000 (21:06 +0300)] 
Add changes file

6 years agoTravis: remove sudo configuration
rl1987 [Wed, 24 Apr 2019 10:29:23 +0000 (13:29 +0300)] 
Travis: remove sudo configuration

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

6 years agoMerge branch 'bug30316_035' into bug30316_040
Nick Mathewson [Mon, 29 Apr 2019 17:48:25 +0000 (13:48 -0400)] 
Merge branch 'bug30316_035' into bug30316_040

Fixes conflicts and also moves bandwidth-file-digest.

6 years agoMove bandwidth-file-headers line to appear in the correct vote section
Nick Mathewson [Mon, 29 Apr 2019 17:43:50 +0000 (13:43 -0400)] 
Move bandwidth-file-headers line to appear in the correct vote section

Fixes bug 30316; bugfix on 0.3.5.1-alpha.

6 years agoMerge remote-tracking branch 'tor-github/pr/974' into maint-0.4.0
Nick Mathewson [Mon, 29 Apr 2019 14:15:03 +0000 (10:15 -0400)] 
Merge remote-tracking branch 'tor-github/pr/974' into maint-0.4.0

6 years agoMerge branch 'tor-github/pr/960' into maint-0.4.0
George Kadianakis [Thu, 25 Apr 2019 12:46:45 +0000 (15:46 +0300)] 
Merge branch 'tor-github/pr/960' into maint-0.4.0

6 years agoLower log level of unlink() errors in networkstatus_set_current_consensus().
Alexander Færøy [Wed, 24 Apr 2019 23:50:13 +0000 (01:50 +0200)] 
Lower log level of unlink() errors in networkstatus_set_current_consensus().

In this patch we lower the log level of the failures for the three calls
to unlink() in networkstatus_set_current_consensus(). These errors might
trigger on Windows because the memory mapped consensus file keeps the
file in open state even after we have close()'d it. Windows will then
error on the unlink() call with a "Permission denied" error.

The consequences of ignoring these errors is that we leave an unused
file around on the file-system, which is an easier way to fix this
problem right now than refactoring networkstatus_set_current_consensus().

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

6 years agoStop looking for scripts in the build directory during "make shellcheck"
teor [Tue, 23 Apr 2019 02:31:14 +0000 (12:31 +1000)] 
Stop looking for scripts in the build directory during "make shellcheck"

Fixes bug 30263; bugfix on 0.4.0.1-alpha.

6 years agoTravis: Show stem's tor log after failure
teor [Mon, 22 Apr 2019 01:48:07 +0000 (11:48 +1000)] 
Travis: Show stem's tor log after failure

Closes ticket 30234.

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Fri, 19 Apr 2019 02:00:50 +0000 (12:00 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.3.4' into maint-0.3.5
teor [Fri, 19 Apr 2019 02:00:41 +0000 (12:00 +1000)] 
Merge branch 'maint-0.3.4' into maint-0.3.5

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.4
teor [Fri, 19 Apr 2019 01:59:18 +0000 (11:59 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.4

"ours" merge, to avoid taking any changes from PR 792 in 0.3.4.
(We already merged PR 791 for 29665 into 0.3.4.)

6 years agoMerge remote-tracking branch 'tor-github/pr/710' into maint-0.3.5
teor [Fri, 19 Apr 2019 01:52:48 +0000 (11:52 +1000)] 
Merge remote-tracking branch 'tor-github/pr/710' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/726' into maint-0.3.5
teor [Fri, 19 Apr 2019 01:51:05 +0000 (11:51 +1000)] 
Merge remote-tracking branch 'tor-github/pr/726' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/745' into maint-0.3.5
teor [Fri, 19 Apr 2019 01:48:41 +0000 (11:48 +1000)] 
Merge remote-tracking branch 'tor-github/pr/745' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/947' into maint-0.3.5
teor [Fri, 19 Apr 2019 01:47:50 +0000 (11:47 +1000)] 
Merge remote-tracking branch 'tor-github/pr/947' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/946' into maint-0.3.4
teor [Fri, 19 Apr 2019 01:47:10 +0000 (11:47 +1000)] 
Merge remote-tracking branch 'tor-github/pr/946' into maint-0.3.4

6 years agoMerge remote-tracking branch 'tor-github/pr/638' into maint-0.3.4
teor [Fri, 19 Apr 2019 01:44:38 +0000 (11:44 +1000)] 
Merge remote-tracking branch 'tor-github/pr/638' into maint-0.3.4

6 years agoMerge remote-tracking branch 'tor-github/pr/791' into maint-0.3.4
teor [Fri, 19 Apr 2019 01:43:46 +0000 (11:43 +1000)] 
Merge remote-tracking branch 'tor-github/pr/791' into maint-0.3.4

6 years agoMerge remote-tracking branch 'tor-github/pr/792' into maint-0.2.9
teor [Fri, 19 Apr 2019 01:42:09 +0000 (11:42 +1000)] 
Merge remote-tracking branch 'tor-github/pr/792' into maint-0.2.9

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.4
teor [Fri, 19 Apr 2019 01:39:17 +0000 (11:39 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.4

"ours" merge, to avoid taking any changes from PR 772 in 0.3.4.
(We already merged a different fix for 23790 into 0.3.2 and later.)

6 years agoMerge remote-tracking branch 'tor-github/pr/772' into maint-0.2.9
teor [Fri, 19 Apr 2019 01:38:52 +0000 (11:38 +1000)] 
Merge remote-tracking branch 'tor-github/pr/772' into maint-0.2.9

6 years agoMerge branch 'tor-github/pr/891' into maint-0.4.0
George Kadianakis [Thu, 18 Apr 2019 10:21:59 +0000 (13:21 +0300)] 
Merge branch 'tor-github/pr/891' into maint-0.4.0

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Wed, 17 Apr 2019 06:46:40 +0000 (16:46 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agochanges: update the changes file for 30001
teor [Wed, 17 Apr 2019 02:34:33 +0000 (12:34 +1000)] 
changes: update the changes file for 30001

6 years agoIn warn_if_nul_found, log surrounding context.
Nick Mathewson [Mon, 15 Apr 2019 19:33:09 +0000 (15:33 -0400)] 
In warn_if_nul_found, log surrounding context.

We need to encode here instead of doing escaped(), since fwict
escaped() does not currently handle NUL bytes.

Also, use warn_if_nul_found in more cases to avoid duplication.

6 years agofixup! Even more diagnostic messages for bug 28223.
Nick Mathewson [Mon, 15 Apr 2019 19:21:18 +0000 (15:21 -0400)] 
fixup! Even more diagnostic messages for bug 28223.

Use TOR_PRIuSZ in place of %zu.

6 years agoUse a tor_abort_() wrapper in our util_bug.h macros
Nick Mathewson [Mon, 15 Apr 2019 18:16:23 +0000 (14:16 -0400)] 
Use a tor_abort_() wrapper in our util_bug.h macros

Previously, our use of abort() would break anywhere that we didn't
include stdlib.h.  This was especially troublesome in case where
tor_assert_nonfatal() was used with ALL_BUGS_ARE_FATAL, since that
one seldom gets tested.

As an alternative, we could have just made this header include
stdlib.h.  But that seems bloaty.

Fixes bug 30189; bugfix on 0.3.4.1-alpha.

6 years agoMerge branch 'tor-github/pr/948' into maint-0.4.0
George Kadianakis [Mon, 15 Apr 2019 10:56:37 +0000 (13:56 +0300)] 
Merge branch 'tor-github/pr/948' into maint-0.4.0

6 years agoMerge branch 'rust-panic1-035' into rust-panic1-040
teor [Mon, 15 Apr 2019 00:18:59 +0000 (10:18 +1000)] 
Merge branch 'rust-panic1-035' into rust-panic1-040

6 years agoMerge branch 'rust-panic1-034' into rust-panic1-035
teor [Mon, 15 Apr 2019 00:18:01 +0000 (10:18 +1000)] 
Merge branch 'rust-panic1-034' into rust-panic1-035

Trivial merge: a blank line was removed between 0.3.4 and 0.3.5.

6 years agoMerge branch 'rust-panic1' into rust-panic1-034
teor [Mon, 15 Apr 2019 00:15:02 +0000 (10:15 +1000)] 
Merge branch 'rust-panic1' into rust-panic1-034

6 years agochanges: file for 30117
teor [Thu, 11 Apr 2019 02:17:04 +0000 (12:17 +1000)] 
changes: file for 30117

6 years agoTravis: expand "make test-stem", so timelimit can signal python on timeout
teor [Thu, 11 Apr 2019 02:11:03 +0000 (12:11 +1000)] 
Travis: expand "make test-stem", so timelimit can signal python on timeout

Unlike kill, timelimit can only signal the process it launches. So we need
timelimit to launch python, not make.

Closes ticket 30117; diagnostic for 29437.

6 years agobump to 0.4.0.4-rc-dev
Nick Mathewson [Thu, 11 Apr 2019 21:05:38 +0000 (17:05 -0400)] 
bump to 0.4.0.4-rc-dev

6 years agoTravis: use stem backtrace signals with timelimit
teor [Wed, 10 Apr 2019 11:15:04 +0000 (21:15 +1000)] 
Travis: use stem backtrace signals with timelimit

Part of 30117.

6 years agoBump version to 0.4.0.4-rc
Nick Mathewson [Wed, 10 Apr 2019 15:51:49 +0000 (11:51 -0400)] 
Bump version to 0.4.0.4-rc

6 years agoMerge remote-tracking branch 'tor-github/pr/926' into maint-0.4.0
Nick Mathewson [Wed, 10 Apr 2019 15:31:33 +0000 (11:31 -0400)] 
Merge remote-tracking branch 'tor-github/pr/926' into maint-0.4.0

6 years agoAdd changes file for #30040.
George Kadianakis [Tue, 9 Apr 2019 14:30:14 +0000 (17:30 +0300)] 
Add changes file for #30040.

6 years agoPrevent double free on huge files with 32 bit.
Tobias Stoeckmann [Sun, 31 Mar 2019 10:27:55 +0000 (12:27 +0200)] 
Prevent double free on huge files with 32 bit.

The function compat_getdelim_ is used for tor_getline if tor is compiled
on a system that lacks getline and getdelim. These systems should be
very rare, considering that getdelim is POSIX.

If this system is further a 32 bit architecture, it is possible to
trigger a double free with huge files.

If bufsiz has been already increased to 2 GB, the next chunk would
be 4 GB in size, which wraps around to 0 due to 32 bit limitations.

A realloc(*buf, 0) could be imagined as "free(*buf); return malloc(0);"
which therefore could return NULL. The code in question considers
that an error, but will keep the value of *buf pointing to already
freed memory.

The caller of tor_getline() would free the pointer again, therefore
leading to a double free.

This code can only be triggered in dirserv_read_measured_bandwidths
with a huge measured bandwith list file on a system that actually
allows to reach 2 GB of space through realloc.

It is not possible to trigger this on Linux with glibc or other major
*BSD systems even on unit tests, because these systems cannot reach
so much memory due to memory fragmentation.

This patch is effectively based on the penetration test report of
cure53 for curl available at https://cure53.de/pentest-report_curl.pdf
and explained under section "CRL-01-007 Double-free in aprintf() via
unsafe size_t multiplication (Medium)".

6 years agotest: Also avoid reading the system default torrc in integration tests
teor [Wed, 10 Apr 2019 09:03:43 +0000 (19:03 +1000)] 
test: Also avoid reading the system default torrc in integration tests

Part of 29702.

6 years agoAdd changes file
rl1987 [Wed, 13 Mar 2019 16:51:41 +0000 (18:51 +0200)] 
Add changes file

6 years agoUse empty torrc file when launching tor in test_rebind.py
rl1987 [Wed, 13 Mar 2019 15:53:51 +0000 (17:53 +0200)] 
Use empty torrc file when launching tor in test_rebind.py

6 years agoMerge remote-tracking branch 'tor-github/pr/920' into maint-0.4.0
teor [Wed, 10 Apr 2019 08:26:49 +0000 (18:26 +1000)] 
Merge remote-tracking branch 'tor-github/pr/920' into maint-0.4.0

6 years agoMerge branch 'bug29922_035' into maint-0.4.0
Nick Mathewson [Tue, 9 Apr 2019 17:49:58 +0000 (13:49 -0400)] 
Merge branch 'bug29922_035' into maint-0.4.0

6 years agoActually I believe this should be an EINVAL.
Nick Mathewson [Tue, 9 Apr 2019 17:49:10 +0000 (13:49 -0400)] 
Actually I believe this should be an EINVAL.

6 years agoChanges file for bug30041
Nick Mathewson [Tue, 9 Apr 2019 16:03:22 +0000 (12:03 -0400)] 
Changes file for bug30041

6 years agoCheck return value of buf_move_to_buf for error.
Tobias Stoeckmann [Sun, 31 Mar 2019 15:33:11 +0000 (17:33 +0200)] 
Check return value of buf_move_to_buf for error.

If the concatenation of connection buffer and the buffer of linked
connection exceeds INT_MAX bytes, then buf_move_to_buf returns -1 as an
error value.

This value is currently casted to size_t (variable n_read) and will
erroneously lead to an increasement of variable "max_to_read".

This in turn can be used to call connection_buf_read_from_socket to
store more data inside the buffer than expected and clogging the
connection buffer.

If the linked connection buffer was able to overflow INT_MAX, the call
of buf_move_to_buf would have previously internally triggered an integer
overflow, corrupting the state of the connection buffer.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
6 years agoProtect buffers against INT_MAX datalen overflows.
Tobias Stoeckmann [Sun, 31 Mar 2019 15:32:41 +0000 (17:32 +0200)] 
Protect buffers against INT_MAX datalen overflows.

Many buffer functions have a hard limit of INT_MAX for datalen, but
this limitation is not enforced in all functions:

- buf_move_all may exceed that limit with too many chunks
- buf_move_to_buf exceeds that limit with invalid buf_flushlen argument
- buf_new_with_data may exceed that limit (unit tests only)

This patch adds some annotations in some buf_pos_t functions to
guarantee that no out of boundary access could occur even if another
function lacks safe guards against datalen overflows.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
6 years agoMerge branch 'tor-github/pr/915' into maint-0.4.0
George Kadianakis [Tue, 9 Apr 2019 09:24:52 +0000 (12:24 +0300)] 
Merge branch 'tor-github/pr/915' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/892' into maint-0.4.0
teor [Tue, 9 Apr 2019 01:35:41 +0000 (11:35 +1000)] 
Merge remote-tracking branch 'tor-github/pr/892' into maint-0.4.0

6 years agomanpage: Clarify that Tor does stream isolation between *Port listeners by default
rl1987 [Mon, 25 Mar 2019 13:40:46 +0000 (15:40 +0200)] 
manpage: Clarify that Tor does stream isolation between *Port listeners by default

cherry-pick of tor-github/pr/841 to maint-0.4.0.

6 years agoDetect and suppress an additional gmtime() warning in test_util.c
Nick Mathewson [Mon, 8 Apr 2019 21:02:14 +0000 (17:02 -0400)] 
Detect and suppress an additional gmtime() warning in test_util.c

Fixes bug 29922; bugfix on 0.2.9.3-alpha when we tried to capture
all these warnings.  No need to backport any farther than 0.3.5,
though -- these warnings don't cause test failures before then.

This one was tricky to find because apparently it only happened on
_some_ windows builds.

6 years agoMerge remote-tracking branch 'tor-github/pr/911' into maint-0.4.0
teor [Sat, 6 Apr 2019 02:15:41 +0000 (12:15 +1000)] 
Merge remote-tracking branch 'tor-github/pr/911' into maint-0.4.0

6 years agochanges: Ticket 29241 is actually a bug on NSS in 0.3.5.1-alpha
teor [Sat, 6 Apr 2019 01:07:20 +0000 (11:07 +1000)] 
changes: Ticket 29241 is actually a bug on NSS in 0.3.5.1-alpha

6 years agoNSS: disable TLS1.2 SHA-384 ciphersuites.
Nick Mathewson [Fri, 29 Mar 2019 17:38:48 +0000 (13:38 -0400)] 
NSS: disable TLS1.2 SHA-384 ciphersuites.

In current NSS versions, these ciphersuites don't work with
SSL_ExportKeyingMaterial(), which was causing relays to fail when
they tried to negotiate the v3 link protocol authentication.

Fixes bug 29241; bugfix on 0.4.0.1-alpha.