Nick Mathewson
33fcc0f61d
Merge branch 'maint-0.2.7-redux' into maint-0.2.8
2017-06-05 12:01:17 -04:00
Nick Mathewson
3f2d1f7f07
Merge branch 'maint-0.2.6' into maint-0.2.7-redux
2017-06-05 12:00:41 -04:00
Nick Mathewson
9ea3d0877a
Merge branch 'maint-0.2.5' into maint-0.2.6
2017-06-05 12:00:27 -04:00
Nick Mathewson
1a540b5792
Merge branch 'maint-0.2.4' into maint-0.2.5
2017-06-05 12:00:08 -04:00
Nick Mathewson
e3ebae4804
Fix undefined behavior in geoip_parse_entry().
...
Fixes bug 22490; bugfix on 6a241ff3ff
in 0.2.4.6-alpha.
Found by teor using clang-5.0's AddressSanitizer stack-use-after-scope.
2017-06-05 10:09:39 -04:00
Nick Mathewson
26d9fffae4
Merge branch 'bug22466_diagnostic_030'
2017-06-05 09:52:09 -04:00
Nick Mathewson
be741d7e63
Merge branch 'maint-0.3.0'
2017-06-05 09:51:57 -04:00
Nick Mathewson
e5bdfd66cf
Make code more clear about own_link_cert safety
...
It's okay to call add_ed25519_cert with a NULL argument: so,
document that. Also, add a tor_assert_nonfatal() to catch any case
where we have failed to set own_link_cert when conn_in_server_mode.
2017-06-05 09:35:55 -04:00
rl1987
f8c98759e5
Use string_is_valid_hostname in SOCKS4 request parsing codepath
2017-06-04 13:22:45 +02:00
rl1987
7f05f89663
Don't reject SOCKS5 requests that contain IP strings
2017-06-04 13:14:55 +02:00
rl1987
9e2f780923
Refrain from needless SOCKS5 warning
2017-06-03 18:04:47 +02:00
Nick Mathewson
41ed9e978b
Regenerate RSA->ed25519 identity crosscertificate as needed
2017-06-01 10:04:52 -04:00
Nick Mathewson
f2068ef862
Use tor_assert_nonfatal() to try to detect #22466
2017-06-01 09:42:32 -04:00
Nick Mathewson
34a6755b94
Fix ed25519 link certificate race on tls context rotation
...
Whenever we rotate our TLS context, we change our Ed25519
Signing->Link certificate. But if we've already started a TLS
connection, then we've already sent the old X509 link certificate,
so the new Ed25519 Signing->Link certificate won't match it.
To fix this, we now store a copy of the Signing->Link certificate
when we initialize the handshake state, and send that certificate
as part of our CERTS cell.
Fixes one case of bug22460; bugfix on 0.3.0.1-alpha.
2017-06-01 09:26:24 -04:00
Nick Mathewson
a9be768959
Bugfix: Regenerate more certificates when appropriate
...
Previously we could sometimes change our signing key, but not
regenerate the certificates (signing->link and signing->auth) that
were signed with it. Also, we would regularly replace our TLS x.509
link certificate (by rotating our TLS context) but not replace our
signing->link ed25519 certificate. In both cases, the resulting
inconsistency would make other relays reject our link handshakes.
Fixes two cases of bug 22460; bugfix on 0.3.0.1-alpha.
2017-05-31 18:45:35 -04:00
Andreas Stieger
1763aa058b
Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)
...
Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.
2017-05-31 09:30:35 -04:00
Nick Mathewson
9d59769db7
Improve error message when all permitted Exits are down
...
The old "No specified non-excluded exit routers seem to be running"
message was somewhat confusing.
Fix for 7890.
2017-05-30 10:59:04 -04:00
David Goulet
5b33d95a3d
hs: Correctly validate v3 descriptor encrypted length
...
The encrypted_data_length_is_valid() function wasn't validating correctly the
length of the encrypted data of a v3 descriptor. The side effect of this is
that an HSDir was rejecting the descriptor and ultimately not storing it.
Fixes #22447
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-30 10:27:42 -04:00
Nick Mathewson
671c5dcde3
Merge remote-tracking branch 'public/bug6298'
2017-05-30 10:27:37 -04:00
Nick Mathewson
0fbe1a2c6f
Merge remote-tracking branch 'teor/bug22424'
2017-05-30 08:50:45 -04:00
Nick Mathewson
184d889f8a
Merge remote-tracking branch 'jigsaw/fix-22417-without-3-star'
2017-05-30 08:47:14 -04:00
Nick Mathewson
f9615f9d77
Merge remote-tracking branch 'teor/bug22421'
2017-05-30 08:42:20 -04:00
Andreas Stieger
e5f4642db3
Fix GCC 7 -Wimplicit-fallthrough warnings
...
Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
2017-05-30 08:33:27 -04:00
Roger Dingledine
d1580ad49b
remove obsolete comment
...
we should have taken out this comment with commit aadff6274
during ticket 16480.
2017-05-30 02:42:32 -04:00
Daniel Pinto
94d321120e
Replace 3-star pointer with 2-star pointer
2017-05-28 20:24:48 +01:00
teor
79725289e1
If we do underflow the know usage of a storage, recalculate it
...
Fixes bug #22424 on 0.3.1.1-alpha.
2017-05-28 22:34:43 +10:00
teor
69b234a0a8
Refactor storage usage reductions into a static function
...
No behaviour change.
Part of #22424 .
2017-05-28 22:28:43 +10:00
teor
334fe6bb6b
Don't underflow usage when it is unknown and a file is removed
...
Part of #22424 .
2017-05-28 22:16:00 +10:00
teor
9e36b0beb9
Always check for usage underflow when removing a file in storage.c
...
Part of #22424 .
2017-05-28 22:12:09 +10:00
teor
f6841ae263
Fix comment typos in storage.c
2017-05-28 22:11:22 +10:00
teor
25ea8be9de
Update the client bootstrap comment in config.c for exponential backoff
...
This brings the description up to date with the exponential backoff
code introduced in 0.2.9.1-alpha.
Fixes bug #22421 .
2017-05-28 21:01:08 +10:00
Daniel Pinto
f8ccf8d9a9
Fix crash with %include
...
Fixes crash when including a folder that contains a non-empty file
without any values followed by any other non-empty file.
2017-05-28 09:53:14 +01:00
Roger Dingledine
084b64ba2e
simplify because relay_crypt_one_payload can't fail
2017-05-28 01:51:22 -04:00
Nick Mathewson
6fcaf83c98
Cleanup MOCK_IMPL (etc) to be findable with etags
...
A fair number of our mock_impl declarations were messed up so that
even our special AM_ETAGSFLAGS couldn't find them.
This should be a whitespace-only patch.
2017-05-26 14:07:06 -04:00
Nick Mathewson
159a8061cf
Mock tor_addr_lookup() during part of addr/basic test.
...
If this function isn't mocked, then our unit tests break on stupid
networks where localhost is broken or absent. Fixes bug 6298; bugfix
on 0.0.9pre2.
2017-05-26 13:53:32 -04:00
Nick Mathewson
5742e4fd8e
bump version to 0.3.1.2-alpha-dev
2017-05-26 10:23:53 -04:00
Nick Mathewson
2550ac7bb1
update version to 0.3.1.2-alpha
2017-05-26 08:58:08 -04:00
Nick Mathewson
ab9976b724
Merge remote-tracking branch 'arma/bug22368'
2017-05-25 08:54:51 -04:00
Roger Dingledine
657297a9f8
Merge branch 'maint-0.3.0'
2017-05-25 00:28:11 -04:00
Roger Dingledine
83439e78cc
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-05-25 00:27:27 -04:00
teor
ec61ae59a5
Stop leaking keypin-rejected routerinfos on directory authorities
...
When directory authorities reject a router descriptor due to keypinning,
free the router descriptor rather than leaking the memory.
Fixes bug 22370; bugfix on 0.2.7.2-alpha.
2017-05-25 00:09:40 -04:00
Roger Dingledine
5f74749fba
get rid of some dead code (leftover from commit fa04fe1
)
2017-05-24 23:37:00 -04:00
Roger Dingledine
d22d565331
add copy of MyFamily element to the descriptor, not the element itself
...
If we add the element itself, we will later free it when we free the
descriptor, and the next time we go to look at MyFamily, things will
go badly.
Fixes the rest of bug 22368; bugfix on 0.3.1.1-alpha.
2017-05-24 23:37:00 -04:00
Roger Dingledine
a7e75ff796
don't free the values in options->MyFamily when we make a descriptor
...
If we free them here, we will still attempt to access the freed memory
later on, and also we will double-free when we are freeing the config.
Fixes part of bug 22368.
2017-05-24 23:32:32 -04:00
Nick Mathewson
511c900686
Merge branch 'master' of git-rw.torproject.org:/tor
2017-05-24 10:25:00 -04:00
Nick Mathewson
b80a35e683
Improve the message we log on unexpected dirauth status code
...
It's still not great, but should be less confusing what's wrong
here.
Closes ticket 1121.
2017-05-24 09:08:59 -04:00
Roger Dingledine
cabad0b6c7
remove unused node_get_published_on function
...
in retrospect, we should have removed this with commit 1289474d
as part of #11742 , which was the last caller of it.
2017-05-24 00:43:44 -04:00
Nick Mathewson
994595ae5d
Don't say "downloading 1 descriptor, 4 at a time"
...
Fixes bug 19648, bugfix on 0.1.1.8-alpha.
2017-05-23 09:47:11 -04:00
teor
af98b862a5
Fix comments of functions that return tor_snprintf
...
No code changes needed: in the places where we actually check the
return value of these functions, we handle it correctly.
2017-05-23 18:44:45 +10:00
Roger Dingledine
4e3ea6d5c8
fix minor grammar error in comment
2017-05-22 20:06:38 -04:00