]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Fri, 14 Jul 2017 13:06:44 +0000 (09:06 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'bug22803_030' into maint-0.3.0
Nick Mathewson [Fri, 14 Jul 2017 13:06:33 +0000 (09:06 -0400)] 
Merge branch 'bug22803_030' into maint-0.3.0

8 years agoMerge branch 'fewer-diffs' into maint-0.3.1
Nick Mathewson [Thu, 13 Jul 2017 20:55:02 +0000 (16:55 -0400)] 
Merge branch 'fewer-diffs' into maint-0.3.1

8 years agoMerge branch 'bug22520_031' into maint-0.3.1
Nick Mathewson [Thu, 13 Jul 2017 20:52:16 +0000 (16:52 -0400)] 
Merge branch 'bug22520_031' into maint-0.3.1

8 years agoMerge remote-tracking branch 'isis/bug22830_0.3.1' into maint-0.3.1
Nick Mathewson [Thu, 13 Jul 2017 20:51:09 +0000 (16:51 -0400)] 
Merge remote-tracking branch 'isis/bug22830_0.3.1' into maint-0.3.1

8 years agoAdd a changes file for bug22830.
Isis Lovecruft [Thu, 13 Jul 2017 18:01:54 +0000 (18:01 +0000)] 
Add a changes file for bug22830.

8 years agouse CARGO_HOME instead of HOME when building with rust
Chelsea H. Komlo [Mon, 10 Jul 2017 02:33:34 +0000 (22:33 -0400)] 
use CARGO_HOME instead of HOME when building with rust

8 years agoNew configuration option MaxConsensusAgeForDiffs
Nick Mathewson [Wed, 12 Jul 2017 17:15:16 +0000 (13:15 -0400)] 
New configuration option MaxConsensusAgeForDiffs

Relay operators (especially bridge operators) can use this to lower
or raise the number of consensuses that they're willing to hold for
diff generation purposes.

This enables a workaround for bug 22883.

8 years agoMerge branch 'bug22349_029' into maint-0.3.1
Nick Mathewson [Wed, 12 Jul 2017 14:15:49 +0000 (10:15 -0400)] 
Merge branch 'bug22349_029' into maint-0.3.1

8 years agoRestore openssl and libscrypt includes in test_crypto_slow.c
Nick Mathewson [Wed, 12 Jul 2017 13:19:12 +0000 (09:19 -0400)] 
Restore openssl and libscrypt includes in test_crypto_slow.c

This reverts part of commit 706c44a6ce0bbeee51c800521a3199d76e1dcd96.

It was a mistake to remove these includes: they were needed on
systems where we have openssl 1.1.0 *and* libscrypt, and where we
were validating the one against the other.

Fixes bug 22892; bugfix on 0.3.1.1-alpha.

8 years agoMake consdiff tests pass on OS X too
Matt Traudt [Mon, 10 Jul 2017 16:19:33 +0000 (12:19 -0400)] 
Make consdiff tests pass on OS X too

8 years agoUse LANG_ENGLISH in windows error messages
Nick Mathewson [Fri, 7 Jul 2017 17:11:18 +0000 (13:11 -0400)] 
Use LANG_ENGLISH in windows error messages

This change prevents us from generating corrupt messages when we
are confused about codepage settings, and makes Windows errors
consistent with the rest of our logs.

Fixes bug 22520; bugfix on 0.1.2.8-alpha.  Patch from "Vort".

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Fri, 7 Jul 2017 14:57:05 +0000 (10:57 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

This is an "ours" commit to avoid taking the fix for 22838,
which we already have here.

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Fri, 7 Jul 2017 14:56:31 +0000 (10:56 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Fri, 7 Jul 2017 14:56:31 +0000 (10:56 -0400)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'bug22838_028' into maint-0.2.8
Nick Mathewson [Fri, 7 Jul 2017 14:55:51 +0000 (10:55 -0400)] 
Merge branch 'bug22838_028' into maint-0.2.8

8 years agomingw fix: avoid "unused var" warning.
Nick Mathewson [Thu, 6 Jul 2017 17:12:33 +0000 (13:12 -0400)] 
mingw fix: avoid "unused var" warning.

This is a backport of 19615bce64cd381a925bc3910120ac39ca918e7c to
fix bug 22838.

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.7-redux' into maint-0.2.8
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.7-redux' into maint-0.2.8

8 years agoMerge branch 'maint-0.2.6' into maint-0.2.7-redux
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7-redux

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

8 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Fri, 7 Jul 2017 14:51:28 +0000 (10:51 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

8 years agoMention TROVE-2017-007 in changes file for 22789
Nick Mathewson [Fri, 7 Jul 2017 14:51:25 +0000 (10:51 -0400)] 
Mention TROVE-2017-007 in changes file for 22789

8 years agoFix a wide line from 22207
Nick Mathewson [Wed, 5 Jul 2017 21:37:06 +0000 (17:37 -0400)] 
Fix a wide line from 22207

8 years agoMerge remote-tracking branch 'karsten/task-22207' into maint-0.3.1
Nick Mathewson [Wed, 5 Jul 2017 21:00:43 +0000 (17:00 -0400)] 
Merge remote-tracking branch 'karsten/task-22207' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 5 Jul 2017 20:11:48 +0000 (16:11 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 5 Jul 2017 20:11:48 +0000 (16:11 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoOnly disable -Wfloat-conversion on mingw when it exists.
Nick Mathewson [Wed, 5 Jul 2017 20:10:45 +0000 (16:10 -0400)] 
Only disable -Wfloat-conversion on mingw when it exists.

The 22081 fix disabled -Wfloat-conversion, but -Wfloat-conversion
didn't exist in every relevant mingw; it was added in GCC 4.9.x some
time, if the documentation can be trusted.

Bug not in any released version of tor.

8 years agoFix mixed-sign comparison warning in fix for 22797.
Nick Mathewson [Wed, 5 Jul 2017 19:56:57 +0000 (15:56 -0400)] 
Fix mixed-sign comparison warning in fix for 22797.

8 years agoFix unit test memory leak in certs_ok_ed25519.
Nick Mathewson [Wed, 5 Jul 2017 19:42:25 +0000 (15:42 -0400)] 
Fix unit test memory leak in certs_ok_ed25519.

Fixes bug 22803; bugfix on 0.3.0.1-alpha.

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 5 Jul 2017 17:43:31 +0000 (13:43 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 5 Jul 2017 17:43:31 +0000 (13:43 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Wed, 5 Jul 2017 17:43:21 +0000 (13:43 -0400)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.7-redux' into maint-0.2.8
Nick Mathewson [Wed, 5 Jul 2017 17:42:47 +0000 (13:42 -0400)] 
Merge branch 'maint-0.2.7-redux' into maint-0.2.8

8 years agoMerge branch 'maint-0.2.6' into maint-0.2.7-redux
Nick Mathewson [Wed, 5 Jul 2017 17:42:37 +0000 (13:42 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7-redux

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Wed, 5 Jul 2017 17:42:32 +0000 (13:42 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

8 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Wed, 5 Jul 2017 17:42:26 +0000 (13:42 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

8 years agoMerge branch 'bug22789_024' into maint-0.2.4
Nick Mathewson [Wed, 5 Jul 2017 17:41:27 +0000 (13:41 -0400)] 
Merge branch 'bug22789_024' into maint-0.2.4

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 5 Jul 2017 15:19:03 +0000 (11:19 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 5 Jul 2017 15:19:03 +0000 (11:19 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'bug22801_028' into maint-0.2.9
Nick Mathewson [Wed, 5 Jul 2017 15:18:59 +0000 (11:18 -0400)] 
Merge branch 'bug22801_028' into maint-0.2.9

8 years agoMerge branch 'teor-bug22797-025' into maint-0.3.1
Nick Mathewson [Wed, 5 Jul 2017 15:16:30 +0000 (11:16 -0400)] 
Merge branch 'teor-bug22797-025' into maint-0.3.1

8 years agoAlways allow extra file descriptors when setting the connection maximum
teor [Mon, 3 Jul 2017 05:30:52 +0000 (15:30 +1000)] 
Always allow extra file descriptors when setting the connection maximum

When setting the maximum number of connections allowed by the OS,
always allow some extra file descriptors for other files.

Fixes bug 22797; bugfix on 0.2.0.10-alpha.

8 years agoUpdate fuzzing_include_am to include updates from include.am
Nick Mathewson [Mon, 3 Jul 2017 17:24:57 +0000 (13:24 -0400)] 
Update fuzzing_include_am to include updates from include.am

8 years agoFix assertion failure related to openbsd strtol().
Nick Mathewson [Mon, 3 Jul 2017 15:20:09 +0000 (11:20 -0400)] 
Fix assertion failure related to openbsd strtol().

Fixes bug 22789; bugfix on 0.2.3.8-alpha.

8 years agoFix -Wfloat-conversion C warnings on mingw in clamp_double_to_int64.
Nick Mathewson [Mon, 3 Jul 2017 14:59:31 +0000 (10:59 -0400)] 
Fix -Wfloat-conversion C warnings on mingw in clamp_double_to_int64.

We just have to suppress these warnings: Mingw's math.h uses gcc's
__builtin_choose_expr() facility to declare isnan, isfinite, and
signbit.  But as implemented in at least some versions of gcc,
__builtin_choose_expr() can generate type warnings even from
branches that are not taken.

Fixes bug 22801; bugfix on 0.2.8.1-alpha.

8 years agoBump version to 0.3.1.4-alpha-dev
Nick Mathewson [Thu, 29 Jun 2017 22:45:49 +0000 (18:45 -0400)] 
Bump version to 0.3.1.4-alpha-dev

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Thu, 29 Jun 2017 22:44:53 +0000 (18:44 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"ours" merge to avoid version bump.

8 years agobump to 0.3.0.9-dev
Nick Mathewson [Thu, 29 Jun 2017 22:44:43 +0000 (18:44 -0400)] 
bump to 0.3.0.9-dev

8 years agoBump 0.3.1 to 0.3.1.4-alpha
Nick Mathewson [Thu, 29 Jun 2017 20:36:50 +0000 (16:36 -0400)] 
Bump 0.3.1 to 0.3.1.4-alpha

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Thu, 29 Jun 2017 20:36:05 +0000 (16:36 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"ours" merge to avoid version bump.

8 years agoUpdate maint-0.3.0 to 0.3.0.9
Nick Mathewson [Thu, 29 Jun 2017 20:35:40 +0000 (16:35 -0400)] 
Update maint-0.3.0 to 0.3.0.9

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Thu, 29 Jun 2017 19:57:48 +0000 (15:57 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'trove-2017-006' into maint-0.3.0
Nick Mathewson [Thu, 29 Jun 2017 19:57:42 +0000 (15:57 -0400)] 
Merge branch 'trove-2017-006' into maint-0.3.0

8 years agoMerge remote-tracking branch 'public/bug22670_031' into maint-0.3.1
Nick Mathewson [Thu, 29 Jun 2017 15:34:06 +0000 (11:34 -0400)] 
Merge remote-tracking branch 'public/bug22670_031' into maint-0.3.1

8 years agoAdjust unit tests to account for fix to bug 22753.
Nick Mathewson [Thu, 29 Jun 2017 14:09:06 +0000 (10:09 -0400)] 
Adjust unit tests to account for fix to bug 22753.

Our mock network put all the guards on the same IPv4 address, which
doesn't fly when we start applying EnforceDistinctSubnets.  So in
this commit, I disable EnforceDistinctSubnets when running the old
guard_restriction_t test.

This commit also adds a regression test for #22753.

8 years agoConsider the exit family when applying guard restrictions.
Nick Mathewson [Wed, 28 Jun 2017 15:41:50 +0000 (11:41 -0400)] 
Consider the exit family when applying guard restrictions.

When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.

This patch makes the guard_restriction_t code consider the exit
family as well, and adds some (hopefully redundant) checks for the
case where we lack a node_t for a guard but we have a bridge_info_t
for it.

Fixes bug 22753; bugfix on 0.3.0.1-alpha. Tracked as TROVE-2016-006
and CVE-2017-0377.

8 years agoChanges file for bug22752 diagnostics
Nick Mathewson [Wed, 28 Jun 2017 18:27:52 +0000 (14:27 -0400)] 
Changes file for bug22752 diagnostics

8 years agoLog real error message when unable to remove a storagedir file
Nick Mathewson [Wed, 28 Jun 2017 18:24:27 +0000 (14:24 -0400)] 
Log real error message when unable to remove a storagedir file

Attempts to help diagnose 22752.

8 years agoReplace crash on missing handle in consdiffmgr with nonfatal assert
Nick Mathewson [Wed, 28 Jun 2017 18:21:21 +0000 (14:21 -0400)] 
Replace crash on missing handle in consdiffmgr with nonfatal assert

Attempts to mitigate 22752.

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 28 Jun 2017 18:03:23 +0000 (14:03 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 28 Jun 2017 18:03:23 +0000 (14:03 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge remote-tracking branch 'teor/bug21507-029' into maint-0.2.9
Nick Mathewson [Wed, 28 Jun 2017 18:03:20 +0000 (14:03 -0400)] 
Merge remote-tracking branch 'teor/bug21507-029' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 28 Jun 2017 17:58:37 +0000 (13:58 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 28 Jun 2017 17:58:37 +0000 (13:58 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge remote-tracking branch 'teor/bug21576_029_v2' into maint-0.2.9
Nick Mathewson [Wed, 28 Jun 2017 17:57:54 +0000 (13:57 -0400)] 
Merge remote-tracking branch 'teor/bug21576_029_v2' into maint-0.2.9

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 28 Jun 2017 17:54:00 +0000 (13:54 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"ours" merge to avoid taking redundant ws fix

8 years agowhitespace fix
Nick Mathewson [Wed, 28 Jun 2017 17:53:52 +0000 (13:53 -0400)] 
whitespace fix

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 28 Jun 2017 17:49:14 +0000 (13:49 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"Ours" merge to avoid taking backport of 21969

8 years agoMerge remote-tracking branch 'asn/bug21969_bridges_030' into maint-0.3.0
Nick Mathewson [Wed, 28 Jun 2017 17:48:52 +0000 (13:48 -0400)] 
Merge remote-tracking branch 'asn/bug21969_bridges_030' into maint-0.3.0

8 years agoFix crash in LZMA module when the Sandbox is enabled.
Alexander Færøy [Wed, 28 Jun 2017 13:57:58 +0000 (09:57 -0400)] 
Fix crash in LZMA module when the Sandbox is enabled.

This patch fixes a crash in our LZMA module where liblzma will allocate
slightly more data than it is allowed to by its limit, which leads to a
crash.

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

8 years agoMerge branch 'ahf_bugs_22702_squashed' into maint-0.3.1
Nick Mathewson [Tue, 27 Jun 2017 22:28:34 +0000 (18:28 -0400)] 
Merge branch 'ahf_bugs_22702_squashed' into maint-0.3.1

8 years agoAdd changes file for bug #22702.
Alexander Færøy [Tue, 27 Jun 2017 22:21:43 +0000 (22:21 +0000)] 
Add changes file for bug #22702.

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

8 years agoReturn "304 not modified" if a client already have the most recent consensus.
Alexander Færøy [Tue, 27 Jun 2017 17:16:44 +0000 (17:16 +0000)] 
Return "304 not modified" if a client already have the most recent consensus.

This makes our directory code check if a client is trying to fetch a
document that matches a digest from our latest consensus document.

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

8 years agoSet published_out for consensus cache entries in spooled_resource_estimate_size().
Alexander Færøy [Fri, 23 Jun 2017 23:55:54 +0000 (23:55 +0000)] 
Set published_out for consensus cache entries in spooled_resource_estimate_size().

This patch ensures that the published_out output parameter is set to the
current consensus cache entry's "valid after" field.

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

8 years agoMark descriptors as undownloadable when dirserv_add_() rejects them
Nick Mathewson [Tue, 27 Jun 2017 16:01:46 +0000 (12:01 -0400)] 
Mark descriptors as undownloadable when dirserv_add_() rejects them

As of ac2f6b608a18a8595f62384788196d7c3f2875fd in 0.2.1.19-alpha,
Sebastian fixed bug 888 by marking descriptors as "impossible" by
digest if they got rejected during the
router_load_routers_from_string() phase. This fix stopped clients
and relays from downloading the same thing over and over.

But we never made the same change for descriptors rejected during
dirserv_add_{descriptor,extrainfo}.  Instead, we tried to notice in
advance that we'd reject them with dirserv_would_reject().

This notice-in-advance check stopped working once we added
key-pinning and didn't make a corresponding key-pinning change to
dirserv_would_reject() [since a routerstatus_t doesn't include an
ed25519 key].

So as a fix, let's make the dirserv_add_*() functions mark digests
as undownloadable when they are rejected.

Fixes bug 22349; I am calling this a fix on 0.2.1.19-alpha, though
you could also argue for it being a fix on 0.2.7.2-alpha.

8 years agoMerge branch 'maint-0.2.7-redux' into maint-0.2.8
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.7-redux' into maint-0.2.8

8 years agoMerge branch 'maint-0.2.6' into maint-0.2.7-redux
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7-redux

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

8 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Tue, 27 Jun 2017 15:04:44 +0000 (11:04 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'bug22737_024' into maint-0.2.4
Nick Mathewson [Tue, 27 Jun 2017 15:04:41 +0000 (11:04 -0400)] 
Merge branch 'bug22737_024' into maint-0.2.4

8 years agoFix an errant memset() into the middle of a struct in cell_pack().
Nick Mathewson [Tue, 27 Jun 2017 14:45:29 +0000 (10:45 -0400)] 
Fix an errant memset() into the middle of a struct in cell_pack().

This mistake causes two possible bugs. I believe they are both
harmless IRL.

BUG 1: memory stomping

When we call the memset, we are overwriting two 0 bytes past the end
of packed_cell_t.body. But I think that's harmless in practice,
because the definition of packed_cell_t is:

// ...
typedef struct packed_cell_t {
  TOR_SIMPLEQ_ENTRY(packed_cell_t) next;
  char body[CELL_MAX_NETWORK_SIZE];
  uint32_t inserted_time;
} packed_cell_t;

So we will overwrite either two bytes of inserted_time, or two bytes
of padding, depending on how the platform handles alignment.

If we're overwriting padding, that's safe.

If we are overwriting the inserted_time field, that's also safe: In
every case where we call cell_pack() from connection_or.c, we ignore
the inserted_time field. When we call cell_pack() from relay.c, we
don't set or use inserted_time until right after we have called
cell_pack(). SO I believe we're safe in that case too.

BUG 2: memory exposure

The original reason for this memset was to avoid the possibility of
accidentally leaking uninitialized ram to the network. Now
remember, if wide_circ_ids is false on a connection, we shouldn't
actually be sending more than 512 bytes of packed_cell_t.body, so
these two bytes can only leak to the network if there is another bug
somewhere else in the code that sends more data than is correct.

Fortunately, in relay.c, where we allocate packed_cell_t in
packed_cell_new() , we allocate it with tor_malloc_zero(), which
clears the RAM, right before we call cell_pack. So those
packed_cell_t.body bytes can't leak any information.

That leaves the two calls to cell_pack() in connection_or.c, which
use stack-alocated packed_cell_t instances.

In or_handshake_state_record_cell(), we pass the cell's contents to
crypto_digest_add_bytes(). When we do so, we get the number of
bytes to pass using the same setting of wide_circ_ids as we passed
to cell_pack(). So I believe that's safe.

In connection_or_write_cell_to_buf(), we also use the same setting
of wide_circ_ids in both calls. So I believe that's safe too.

I introduced this bug with 1c0e87f6d8c7a0abdadf1b5cd9082c10abc7f4e2
back in 0.2.4.11-alpha; it is bug 22737 and CID 1401591

8 years agoMerge branch 'bug22719_031' into maint-0.3.1
Nick Mathewson [Tue, 27 Jun 2017 14:31:33 +0000 (10:31 -0400)] 
Merge branch 'bug22719_031' into maint-0.3.1

8 years agochanges file for bug 22719
Nick Mathewson [Tue, 27 Jun 2017 14:31:03 +0000 (10:31 -0400)] 
changes file for bug 22719

8 years agoMerge branch 'bug22105_031' into maint-0.3.1
Nick Mathewson [Mon, 26 Jun 2017 18:30:17 +0000 (14:30 -0400)] 
Merge branch 'bug22105_031' into maint-0.3.1

8 years agoPatch for 22720 from huyvq: exit(1) more often
Nick Mathewson [Mon, 26 Jun 2017 18:14:56 +0000 (14:14 -0400)] 
Patch for 22720 from huyvq: exit(1) more often

See changes file for full details.

8 years agoMerge branch 'bug22212_squashed' into maint-0.3.1
Nick Mathewson [Mon, 26 Jun 2017 15:27:09 +0000 (11:27 -0400)] 
Merge branch 'bug22212_squashed' into maint-0.3.1

8 years agoChanges file for Bug 22212.
Mike Perry [Fri, 23 Jun 2017 23:10:20 +0000 (19:10 -0400)] 
Changes file for Bug 22212.

8 years agoDemote a log message due to libevent delays.
Mike Perry [Wed, 21 Jun 2017 20:30:53 +0000 (16:30 -0400)] 
Demote a log message due to libevent delays.

This is a side-effect of being single-threaded. The worst cases of this are
actually Bug #16585.

8 years agoFix a coverity warning about a no-op assert with-64 bit size_t
Nick Mathewson [Mon, 26 Jun 2017 14:31:13 +0000 (10:31 -0400)] 
Fix a coverity warning about a no-op assert with-64 bit size_t

This is CID 1403400

8 years agoTry a little harder to make sure we never call tor_compress_process wrong.
Nick Mathewson [Mon, 26 Jun 2017 13:39:59 +0000 (09:39 -0400)] 
Try a little harder to make sure we never call tor_compress_process wrong.

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Thu, 22 Jun 2017 14:56:08 +0000 (10:56 -0400)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoCombine our "don't do this if no consensus" entryguards checks
Nick Mathewson [Thu, 22 Jun 2017 13:28:30 +0000 (09:28 -0400)] 
Combine our "don't do this if no consensus" entryguards checks

Suggested by asn on 22400 review.

8 years agoMerge branch 'bug22356_029' into maint-0.3.1
Nick Mathewson [Wed, 21 Jun 2017 17:54:02 +0000 (13:54 -0400)] 
Merge branch 'bug22356_029' into maint-0.3.1

8 years agoMerge branch 'bug22502_redux_031' into maint-0.3.1
Nick Mathewson [Wed, 21 Jun 2017 00:27:48 +0000 (20:27 -0400)] 
Merge branch 'bug22502_redux_031' into maint-0.3.1