]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
9 years agoReplace nearly all XXX0vv comments with smarter ones
Nick Mathewson [Mon, 30 May 2016 20:18:16 +0000 (16:18 -0400)] 
Replace nearly all XXX0vv comments with smarter ones

So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we
had better revisit this comment and fix it!"

But we have a huge pile of such comments accumulated for a large
number of released versions!  Not cool.

So, here's what I tried to do:

  * 0.2.9 and 0.2.8 are retained, since those are not yet released.

  * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks
    quite important!"

  * The others, after one-by-one examination, are downgraded to
    plain old XXX.  Which doesn't mean they aren't a problem -- just
    that they cannot possibly be a release-blocking problem.

9 years agoWe no longer generate v0 directories. Remove the code to do so
Nick Mathewson [Mon, 30 May 2016 20:05:37 +0000 (16:05 -0400)] 
We no longer generate v0 directories. Remove the code to do so

9 years agoremove now-irrelevant XXX020 comments in configure.ac
Nick Mathewson [Mon, 30 May 2016 19:31:19 +0000 (15:31 -0400)] 
remove now-irrelevant XXX020 comments in configure.ac

They apply to ancient GCC versions and to an unknown set of
configuration options. Notabug.

9 years agoroger says this url is better
Nick Mathewson [Fri, 27 May 2016 19:11:11 +0000 (15:11 -0400)] 
roger says this url is better

9 years agoMerge remote-tracking branch 'arma/task19035-fixedup'
Nick Mathewson [Fri, 27 May 2016 17:22:16 +0000 (13:22 -0400)] 
Merge remote-tracking branch 'arma/task19035-fixedup'

9 years agoMerge remote-tracking branch 'public/hardening_flags_must_link'
Nick Mathewson [Fri, 27 May 2016 16:52:39 +0000 (12:52 -0400)] 
Merge remote-tracking branch 'public/hardening_flags_must_link'

9 years agoremove a now-unused section of or.h
Roger Dingledine [Fri, 27 May 2016 16:32:41 +0000 (12:32 -0400)] 
remove a now-unused section of or.h

9 years agoget rid of one more piece of --enable-instrument-downloads
Roger Dingledine [Fri, 27 May 2016 16:32:02 +0000 (12:32 -0400)] 
get rid of one more piece of --enable-instrument-downloads

9 years agoFix indentation and quotation of the headers
cypherpunks [Fri, 13 May 2016 11:03:55 +0000 (11:03 +0000)] 
Fix indentation and quotation of the headers

9 years agoDo not warn on missing headers
cypherpunks [Wed, 11 May 2016 12:20:11 +0000 (12:20 +0000)] 
Do not warn on missing headers

9 years agoremove sentence about tor-ops from manpage: #19185
Nick Mathewson [Fri, 27 May 2016 15:31:34 +0000 (11:31 -0400)] 
remove sentence about tor-ops from manpage: #19185

9 years agoremove an unneeded layer of indentation
Roger Dingledine [Fri, 27 May 2016 14:01:37 +0000 (10:01 -0400)] 
remove an unneeded layer of indentation

no actual behavior changes

9 years agoDisable GET /tor/bytes.txt and GETINFO dir-usage
Roger Dingledine [Wed, 11 May 2016 19:31:48 +0000 (15:31 -0400)] 
Disable GET /tor/bytes.txt and GETINFO dir-usage

Remove support for "GET /tor/bytes.txt" DirPort request, and
"GETINFO dir-usage" controller request, which were only available
via a compile-time option in Tor anyway.

Feature was added in 0.2.2.1-alpha. Resolves ticket 19035.

9 years agoMerge remote-tracking branch 'public/ticket19044'
Nick Mathewson [Fri, 27 May 2016 14:39:34 +0000 (10:39 -0400)] 
Merge remote-tracking branch 'public/ticket19044'

9 years agoMerge remote-tracking branch 'asn/feature19036'
Nick Mathewson [Fri, 27 May 2016 14:37:11 +0000 (10:37 -0400)] 
Merge remote-tracking branch 'asn/feature19036'

9 years agoMerge remote-tracking branch 'arma/bug18840'
Nick Mathewson [Fri, 27 May 2016 14:35:55 +0000 (10:35 -0400)] 
Merge remote-tracking branch 'arma/bug18840'

9 years agoMake format_changelog.py add links to bugs
Nick Mathewson [Fri, 27 May 2016 13:26:08 +0000 (09:26 -0400)] 
Make format_changelog.py add links to bugs

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Fri, 27 May 2016 01:09:22 +0000 (21:09 -0400)] 
Merge branch 'maint-0.2.8'

(This is an "ours" merge to avoid taking the version bump)

9 years agoBump to 0.2.8.3-alpha-dev
Nick Mathewson [Fri, 27 May 2016 01:09:01 +0000 (21:09 -0400)] 
Bump to 0.2.8.3-alpha-dev

9 years agoForward-port the 0.2.8.3-alpha changelog
Nick Mathewson [Fri, 27 May 2016 01:06:42 +0000 (21:06 -0400)] 
Forward-port the 0.2.8.3-alpha changelog

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 26 May 2016 16:30:03 +0000 (12:30 -0400)] 
Merge branch 'maint-0.2.8'

(Ours merge, to avoid taking version bump)

9 years agoBump to 0.2.8.3-alpha
Nick Mathewson [Thu, 26 May 2016 16:12:38 +0000 (12:12 -0400)] 
Bump to 0.2.8.3-alpha

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 26 May 2016 16:12:54 +0000 (12:12 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoFix two long lines
Nick Mathewson [Thu, 26 May 2016 16:11:57 +0000 (12:11 -0400)] 
Fix two long lines

9 years agoFunctionify code that writes votes to disk.
George Kadianakis [Thu, 26 May 2016 12:32:34 +0000 (15:32 +0300)] 
Functionify code that writes votes to disk.

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Wed, 25 May 2016 20:59:46 +0000 (16:59 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug18668_028' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 20:58:43 +0000 (16:58 -0400)] 
Merge branch 'bug18668_028' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Wed, 25 May 2016 20:40:51 +0000 (16:40 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug19175_028_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 20:12:01 +0000 (16:12 -0400)] 
Merge branch 'bug19175_028_v2' into maint-0.2.8

9 years agoFix a double-free bug in routerlist_reparse_old
Nick Mathewson [Wed, 25 May 2016 15:52:52 +0000 (11:52 -0400)] 
Fix a double-free bug in routerlist_reparse_old

I introduced this bug when I moved signing_key_cert into
signed_descriptor_t. Bug not in any released Tor.  Fixes bug 19175, and
another case of 19128.

Just like signed_descriptor_from_routerinfo(), routerlist_reparse_old()
copies the fields from one signed_descriptor_t to another, and then
clears the fields from the original that would have been double-freed by
freeing the original.  But when I fixed the s_d_f_r() bug [#19128] in
50cbf220994c7cec593, I missed the fact that the code was duplicated in
r_p_o().

Duplicated code strikes again!

For a longer-term solution here, I am not only adding the missing fix to
r_p_o(): I am also extracting the duplicated code into a new function.

Many thanks to toralf for patiently sending me stack traces until
one made sense.

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Wed, 25 May 2016 14:21:15 +0000 (10:21 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug19161_028_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 14:17:26 +0000 (10:17 -0400)] 
Merge branch 'bug19161_028_v2' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Wed, 25 May 2016 13:27:47 +0000 (09:27 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug19152_024_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 13:26:45 +0000 (09:26 -0400)] 
Merge branch 'bug19152_024_v2' into maint-0.2.8

9 years agoFix a dangling pointer issue in our RSA keygen code
Nick Mathewson [Fri, 20 May 2016 17:58:52 +0000 (13:58 -0400)] 
Fix a dangling pointer issue in our RSA keygen code

If OpenSSL fails to generate an RSA key, do not retain a dangling
pointer to the previous (uninitialized) key value. The impact here
should be limited to a difficult-to-trigger crash, if OpenSSL is
running an engine that makes key generation failures possible, or if
OpenSSL runs out of memory. Fixes bug 19152; bugfix on
0.2.1.10-alpha. Found by Yuan Jochen Kang, Suman Jana, and Baishakhi
Ray.

This is potentially scary stuff, so let me walk through my analysis.
I think this is a bug, and a backport candidate, but not remotely
triggerable in any useful way.

Observation 1a:

Looking over the OpenSSL code here, the only way we can really fail in
the non-engine case is if malloc() fails.  But if malloc() is failing,
then tor_malloc() calls should be tor_asserting -- the only way that an
attacker could do an exploit here would be to figure out some way to
make malloc() fail when openssl does it, but work whenever Tor does it.

(Also ordinary malloc() doesn't fail on platforms like Linux that
overcommit.)

Observation 1b:

Although engines are _allowed_ to fail in extra ways, I can't find much
evidence online  that they actually _do_ fail in practice. More evidence
would be nice, though.

Observation 2:

We don't call crypto_pk_generate*() all that often, and we don't do it
in response to external inputs. The only way to get it to happen
remotely would be by causing a hidden service to build new introduction
points.

Observation 3a:

So, let's assume that both of the above observations are wrong, and the
attacker can make us generate a crypto_pk_env_t with a dangling pointer
in its 'key' field, and not immediately crash.

This dangling pointer will point to what used to be an RSA structure,
with the fields all set to NULL.  Actually using this RSA structure,
before the memory is reused for anything else, will cause a crash.

In nearly every function where we call crypto_pk_generate*(), we quickly
use the RSA key pointer -- either to sign something, or to encode the
key, or to free the key.  The only exception is when we generate an
intro key in rend_consider_services_intro_points().  In that case, we
don't actually use the key until the intro circuit is opened -- at which
point we encode it, and use it to sign an introduction request.

So in order to exploit this bug to do anything besides crash Tor, the
attacker needs to make sure that by the time the introduction circuit
completes, either:
  * the e, d, and n BNs look valid, and at least one of the other BNs is
    still NULL.
OR
  * all 8 of the BNs must look valid.

To look like a valid BN, *they* all need to have their 'top' index plus
their 'd' pointer indicate an addressable region in memory.

So actually getting useful data of of this, rather than a crash, is
going to be pretty damn hard.  You'd have to force an introduction point
to be created (or wait for one to be created), and force that particular
crypto_pk_generate*() to fail, and then arrange for the memory that the
RSA points to to in turn point to 3...8 valid BNs, all by the time the
introduction circuit completes.

Naturally, the signature won't check as valid [*], so the intro point
will reject the ESTABLISH_INTRO cell.  So you need to _be_ the
introduction point, or you don't actually see this information.

[*] Okay, so if you could somehow make the 'rsa' pointer point to a
different valid RSA key, then you'd get a valid signature of an
ESTABLISH_INTRO cell using a key that was supposed to be used for
something else ... but nothing else looks like that, so you can't use
that signature elsewhere.

Observation 3b:

Your best bet as an attacker would be to make the dangling RSA pointer
actually contain a fake method, with a fake RSA_private_encrypt
function that actually pointed to code you wanted to execute.  You'd
still need to transit 3 or 4 pointers deep though in order to make that
work.

Conclusion:

By 1, you probably can't trigger this without Tor crashing from OOM.

By 2, you probably can't trigger this reliably.

By 3, even if I'm wrong about 1 and 2, you have to jump through a pretty
big array of hoops in order to get any kind of data leak or code
execution.

So I'm calling it a bug, but not a security hole. Still worth
patching.

9 years agoMerge branch 'memarea_overflow_027_squashed' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 13:22:02 +0000 (09:22 -0400)] 
Merge branch 'memarea_overflow_027_squashed' into maint-0.2.8

9 years agoFix a pointer arithmetic bug in memarea_alloc()
Nick Mathewson [Thu, 19 May 2016 14:52:27 +0000 (10:52 -0400)] 
Fix a pointer arithmetic bug in memarea_alloc()

Fortunately, the arithmetic cannot actually overflow, so long as we
*always* check for the size of potentially hostile input before
copying it.  I think we do, though.  We do check each line against
MAX_LINE_LENGTH, and each object name or object against
MAX_UNPARSED_OBJECT_SIZE, both of which are 128k.  So to get this
overflow, we need to have our memarea allocated way way too high up
in RAM, which most allocators won't actually do.

Bugfix on 0.2.1.1-alpha, where memarea was introduced.

Found by Guido Vranken.

9 years agoUse calloc, not malloc(a*b), in ed25519 batch signature check fn
Nick Mathewson [Wed, 25 May 2016 12:59:08 +0000 (08:59 -0400)] 
Use calloc, not malloc(a*b), in ed25519 batch signature check fn

[Not a triggerable bug unless somebody is going to go checking
millions+ of signatures in a single go.]

9 years agoMake sure that libscrypt_scrypt actually exists before using it.
Nick Mathewson [Tue, 24 May 2016 14:28:31 +0000 (10:28 -0400)] 
Make sure that libscrypt_scrypt actually exists before using it.

Previously, if the header was present, we'd proceed even if the
function wasn't there.

Easy fix for bug 19161.  A better fix would involve trying harder to
find libscrypt_scrypt.

9 years agoStop recommending --enable-gcc-warnings in doc/HACKING
Nick Mathewson [Mon, 23 May 2016 18:40:27 +0000 (14:40 -0400)] 
Stop recommending --enable-gcc-warnings in doc/HACKING

9 years agoMake advisory-warnings on by default.
Nick Mathewson [Mon, 23 May 2016 18:39:56 +0000 (14:39 -0400)] 
Make advisory-warnings on by default.

Add --enable-fatal-warnings to control -Werror.

Closes ticket 19044.

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Mon, 23 May 2016 15:06:32 +0000 (11:06 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoDo not ignore files that are being tracked by git
cypherpunks [Wed, 6 Apr 2016 12:16:04 +0000 (12:16 +0000)] 
Do not ignore files that are being tracked by git

9 years agoExpose crypto_digest_algorithm_get_length from crypto.c
Nick Mathewson [Mon, 23 May 2016 14:58:27 +0000 (10:58 -0400)] 
Expose crypto_digest_algorithm_get_length from crypto.c

Also, use it in routerparse.c

9 years agoMerge remote-tracking branch 'dgoulet/bug19066_029_01'
Nick Mathewson [Mon, 23 May 2016 14:45:13 +0000 (10:45 -0400)] 
Merge remote-tracking branch 'dgoulet/bug19066_029_01'

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Fri, 20 May 2016 14:46:50 +0000 (10:46 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoChanges file for previous commit
Nick Mathewson [Fri, 20 May 2016 12:35:52 +0000 (08:35 -0400)] 
Changes file for previous commit

9 years agoPrevent ASAN from registering a SIGSEGV handler
cypherpunks [Thu, 19 May 2016 13:09:31 +0000 (13:09 +0000)] 
Prevent ASAN from registering a SIGSEGV handler

AddressSanitizer's (ASAN) SIGSEGV handler overrides the backtrace
handler and prevents it from printing its backtrace. The output of ASAN
is different from what 'bt_test.py' expects and causes backtrace test
failures.

The 'allow_user_segv_handler' option allows applications to set their
own SIGSEGV handler but is not supported by older GCC versions. These
older GCC versions do support the 'handle_segv' which prevents ASAN from
setting its SIGSEGV handler.

9 years agoWhoops. We use -Wmussing-prototypes.
Nick Mathewson [Fri, 20 May 2016 12:29:26 +0000 (08:29 -0400)] 
Whoops. We use -Wmussing-prototypes.

9 years agoMake another variable unsigned.
Nick Mathewson [Fri, 20 May 2016 12:12:09 +0000 (08:12 -0400)] 
Make another variable unsigned.

9 years agoFix a bug related to moving signing_key_cert
Nick Mathewson [Fri, 20 May 2016 11:59:09 +0000 (07:59 -0400)] 
Fix a bug related to moving signing_key_cert

Now that the field exists in signed_descriptor_t, we need to make
sure we free it when we free a signed_descriptor_t, and we need to
make sure that we don't free it when we convert a routerinfo_t to a
signed_descriptor_t.

But not in any released Tor. I found this while working on #19128.

One problem: I don't see how this could cause 19128.

9 years agoRemove round_int64_to_next_multiple_of: It is now unused.
Nick Mathewson [Fri, 20 May 2016 01:18:43 +0000 (21:18 -0400)] 
Remove round_int64_to_next_multiple_of: It is now unused.

9 years agoCompute HS stats outputs without round_int64_...
Nick Mathewson [Fri, 20 May 2016 01:18:18 +0000 (21:18 -0400)] 
Compute HS stats outputs without round_int64_...

Fix for bug 19130.

9 years agoFix "conditional "ADD_MULODI4" was never defined".
Nick Mathewson [Thu, 19 May 2016 20:38:24 +0000 (16:38 -0400)] 
Fix "conditional "ADD_MULODI4" was never defined".

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 19 May 2016 20:05:13 +0000 (16:05 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge remote-tracking branch 'teor/fix18809-warnings' into maint-0.2.8
Nick Mathewson [Thu, 19 May 2016 20:04:56 +0000 (16:04 -0400)] 
Merge remote-tracking branch 'teor/fix18809-warnings' into maint-0.2.8

9 years agoMerge branch 'link_ftrapv_clang32'
Nick Mathewson [Thu, 19 May 2016 20:01:35 +0000 (16:01 -0400)] 
Merge branch 'link_ftrapv_clang32'

9 years agoadd missing atoi for cosmetic reasons
Nick Mathewson [Thu, 19 May 2016 20:01:25 +0000 (16:01 -0400)] 
add missing atoi for cosmetic reasons

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 19 May 2016 19:56:39 +0000 (15:56 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge remote-tracking branch 'public/bug19073' into maint-0.2.8
Nick Mathewson [Thu, 19 May 2016 19:56:31 +0000 (15:56 -0400)] 
Merge remote-tracking branch 'public/bug19073' into maint-0.2.8

9 years agoFix unused-but-set-variable warnings in the connection unit tests
teor (Tim Wilson-Brown) [Thu, 19 May 2016 16:49:36 +0000 (12:49 -0400)] 
Fix unused-but-set-variable warnings in the connection unit tests

No behaviour change - just remove the variables

9 years agoDescribe what happens when we get a consensus, but no certificates
teor (Tim Wilson-Brown) [Thu, 19 May 2016 16:35:09 +0000 (12:35 -0400)] 
Describe what happens when we get a consensus, but no certificates

Comment-only change

9 years agolintchanges on 18809, and fix the bug number
Nick Mathewson [Thu, 19 May 2016 12:54:19 +0000 (08:54 -0400)] 
lintchanges on 18809, and fix the bug number

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 19 May 2016 12:29:58 +0000 (08:29 -0400)] 
Merge branch 'maint-0.2.8'

9 years agochangelog typo fix
Nick Mathewson [Thu, 19 May 2016 12:29:45 +0000 (08:29 -0400)] 
changelog typo fix

9 years agoFix a compilation error in test_dir.c
Nick Mathewson [Thu, 19 May 2016 12:27:11 +0000 (08:27 -0400)] 
Fix a compilation error in test_dir.c

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Thu, 19 May 2016 12:25:12 +0000 (08:25 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug18809_028_squashed' into maint-0.2.8
Nick Mathewson [Thu, 19 May 2016 12:17:02 +0000 (08:17 -0400)] 
Merge branch 'bug18809_028_squashed' into maint-0.2.8

9 years agoAdd unit tests for networkstatus_consensus_is_bootstrapping
teor (Tim Wilson-Brown) [Thu, 19 May 2016 02:05:35 +0000 (22:05 -0400)] 
Add unit tests for networkstatus_consensus_is_bootstrapping

9 years agoRestore and improve download schedule unit tests
teor (Tim Wilson-Brown) [Thu, 19 May 2016 01:31:03 +0000 (21:31 -0400)] 
Restore and improve download schedule unit tests

9 years agoUpdate unit tests for multiple bootstrap connections
teor (Tim Wilson-Brown) [Thu, 19 May 2016 00:21:31 +0000 (20:21 -0400)] 
Update unit tests for multiple bootstrap connections

9 years agoRemove consensus_max_download_tries by refactoring
teor (Tim Wilson-Brown) [Wed, 18 May 2016 22:07:40 +0000 (18:07 -0400)] 
Remove consensus_max_download_tries by refactoring

No behaviour change

This function is used twice. The code is simpler if we split
it up and inline it where it is used.

9 years agoChanges file for bug 18809
teor (Tim Wilson-Brown) [Wed, 18 May 2016 22:04:02 +0000 (18:04 -0400)] 
Changes file for bug 18809

9 years agoStop downloading consensuses when a consensus has been downloaded
teor (Tim Wilson-Brown) [Wed, 18 May 2016 21:50:46 +0000 (17:50 -0400)] 
Stop downloading consensuses when a consensus has been downloaded

Previosuly, during bootstrap, we would continue to download
consensuses if we had a consensus, but didn't have the certificates
to validate it.

9 years agoInclude __mulodi4 in libor_ctime when it fixes clang -m32 -ftrapv
Nick Mathewson [Wed, 18 May 2016 13:44:05 +0000 (09:44 -0400)] 
Include __mulodi4 in libor_ctime when it fixes clang -m32 -ftrapv

We use a pretty specific pair of autoconf tests here to make sure
that we only add this code when:
   a) a 64-bit signed multiply fails to link,
 AND
   b) the same 64-bit signed multiply DOES link correctly when
      __mulodi4 is defined.

Closes ticket 19079.

9 years agoAdd __mulodi4 source to src/ext
Nick Mathewson [Wed, 18 May 2016 13:41:07 +0000 (09:41 -0400)] 
Add __mulodi4 source to src/ext

We need to define this function when compiling with clang -m32 -ftrapv,
since otherwise we get link errors, since apparently some versions
of libclang_rt.builtins don't define a version of it that works? Or
clang doesn't know to look for it?

This definition is taken from the LLVM source at
  https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/builtins/mulodi4.c

I've also included the license (dual BSD-ish/MIT-ish).

9 years agoFix a bad sizeof() in test_crypto.c. Harmless. Spotted by coverity.
Nick Mathewson [Wed, 18 May 2016 12:29:13 +0000 (08:29 -0400)] 
Fix a bad sizeof() in test_crypto.c. Harmless. Spotted by coverity.

9 years agowhitespace fixes
Nick Mathewson [Wed, 18 May 2016 00:08:03 +0000 (20:08 -0400)] 
whitespace fixes

9 years agoRemove duplicate siging_key_cert fields.
Nick Mathewson [Wed, 18 May 2016 00:04:16 +0000 (20:04 -0400)] 
Remove duplicate siging_key_cert fields.

With the fix for #17150, I added a duplicate certificate here.  Here
I remove the original location in 0.2.8.  (I wouldn't want to do
that in 027, due to the amount of authority-voting-related code
drift.)

Closes 19073.

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Tue, 17 May 2016 23:48:49 +0000 (19:48 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug17150_027_extra' into maint-0.2.8
Nick Mathewson [Tue, 17 May 2016 23:47:22 +0000 (19:47 -0400)] 
Merge branch 'bug17150_027_extra' into maint-0.2.8

9 years agoImprove API of routerinfo_incompatible_with_extrainfo()
Nick Mathewson [Tue, 17 May 2016 17:24:01 +0000 (13:24 -0400)] 
Improve API of routerinfo_incompatible_with_extrainfo()

This API change makes it so that routerinfo_incompatible...() no
longer takes a routerinfo_t, so that it's obvious that it should
only look at fields from the signed_descriptor_t.

This change should prevent a recurrence of #17150.

9 years agoFix another, more subtle, case of bug 17150.
Nick Mathewson [Tue, 17 May 2016 17:16:36 +0000 (13:16 -0400)] 
Fix another, more subtle, case of bug 17150.

We need to make sure that the corresponding sd and ei match in their
certificates.

9 years agoCopy the signing_key_cert field into signed_descriptor_t
Nick Mathewson [Tue, 17 May 2016 17:14:04 +0000 (13:14 -0400)] 
Copy the signing_key_cert field into signed_descriptor_t

We need this field to be in signed_descriptor_t so that
routerinfo_incompatible_with_extrainfo can work correctly (#17150).
But I don't want to move it completely in this patch, since a great
deal of the code that messes with it has been in flux since 0.2.7,
when this ticket was opened.  I should open another ticket about
removing the field from routerinfo_t and extrainfo_t later on.

This patch fixes no actual behavior.

9 years agoFix documentation for routerinfo_incompatible_with_extrainfo
Nick Mathewson [Tue, 17 May 2016 17:08:34 +0000 (13:08 -0400)] 
Fix documentation for routerinfo_incompatible_with_extrainfo

9 years agoWhen making sure digest256 matches in ei, look at sd, not ri.
Nick Mathewson [Tue, 17 May 2016 16:57:03 +0000 (12:57 -0400)] 
When making sure digest256 matches in ei, look at sd, not ri.

The routerinfo we pass to routerinfo_incompatible_with_extrainfo is
the latest routerinfo for the relay.  The signed_descriptor_t, on
the other hand, is the signed_descriptor_t that corresponds to the
extrainfo.  That means we should be checking the digest256 match
with that signed_descriptor_t, not with the routerinfo.

Fixes bug 17150 (and 19017); bugfix on 0.2.7.2-alpha.

9 years agoMove extra_info_digest256 into signed_descriptor_t
Nick Mathewson [Tue, 17 May 2016 16:53:12 +0000 (12:53 -0400)] 
Move extra_info_digest256 into signed_descriptor_t

This patch includes no semantic changes; it's just a field movement.

It's prerequisite for a fix to 19017/17150.

9 years agoMerge remote-tracking branch 'teor/bug18963-remember-v2'
Nick Mathewson [Tue, 17 May 2016 16:15:53 +0000 (12:15 -0400)] 
Merge remote-tracking branch 'teor/bug18963-remember-v2'

9 years agoRemove from master all changes files scheduled for 0.2.8.3
Nick Mathewson [Tue, 17 May 2016 15:24:36 +0000 (11:24 -0400)] 
Remove from master all changes files scheduled for 0.2.8.3

These won't go in the 0.2.9.1-alpha changelog, since 0.2.8.3 will
come out first.

Generated automatically with findMergedChanges.pl

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Tue, 17 May 2016 15:10:20 +0000 (11:10 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoMerge branch 'bug18616-v4-merged_028' into maint-0.2.8
Nick Mathewson [Tue, 17 May 2016 15:09:54 +0000 (11:09 -0400)] 
Merge branch 'bug18616-v4-merged_028' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.8'
Nick Mathewson [Tue, 17 May 2016 15:06:52 +0000 (11:06 -0400)] 
Merge branch 'maint-0.2.8'

9 years agoFix remaining lintChanges warnings.
Nick Mathewson [Tue, 17 May 2016 15:06:41 +0000 (11:06 -0400)] 
Fix remaining lintChanges warnings.

9 years agoResolve lintChanges warnings.
Nick Mathewson [Tue, 17 May 2016 15:05:57 +0000 (11:05 -0400)] 
Resolve lintChanges warnings.

9 years agoMerge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8
Nick Mathewson [Tue, 17 May 2016 14:48:12 +0000 (10:48 -0400)] 
Merge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8

9 years agotouchups and refactorings on bug 18616 branch
Roger Dingledine [Mon, 16 May 2016 21:43:47 +0000 (17:43 -0400)] 
touchups and refactorings on bug 18616 branch

no behavior changes

9 years agoInitialize networking _before_ initializing libevent in the tests
Nick Mathewson [Mon, 16 May 2016 18:30:04 +0000 (14:30 -0400)] 
Initialize networking _before_ initializing libevent in the tests

This prevents WSANOTINITIALISED errors and fixes bug 18668. Bugfix
on 0.2.8.1-alpha -- 1bac468882fd732460d8a25735131 specifically.

9 years agodirauth: don't use hardcoded length when parsing digests
David Goulet [Mon, 16 May 2016 15:18:51 +0000 (11:18 -0400)] 
dirauth: don't use hardcoded length when parsing digests

When parsing detached signature, we make sure that we use the length of the
digest algorithm instead of an hardcoded DIGEST256_LEN in order to avoid
comparing bytes out of bound with a smaller digest length such as SHA1.

Fixes #19066

Signed-off-by: David Goulet <dgoulet@torproject.org>
9 years agoFix memory leak in test_crypto_aes_ctr_testvec
Nick Mathewson [Mon, 16 May 2016 13:55:09 +0000 (09:55 -0400)] 
Fix memory leak in test_crypto_aes_ctr_testvec

9 years agoCheck linking of hardening options, give better warnings if it fails.
Nick Mathewson [Mon, 16 May 2016 13:37:27 +0000 (09:37 -0400)] 
Check linking of hardening options, give better warnings if it fails.

Previously we'd only check whether the hardening options succeeded
at the compile step. Now we'll try to link with them too, and tell
the user in advance if something seems likely to go wrong.

Closes ticket 18895.