Commit Graph

105 Commits

Author SHA1 Message Date
David Goulet 796a9b37ea Merge branch 'tor-github/pr/1264' 2019-09-09 14:53:12 -04:00
Nick Mathewson a642a4cbd7 Merge branch 'ticket30924_042_04_squashed' into ticket30924_042_04_squashed_merged 2019-09-09 11:10:53 -04:00
David Goulet a8a1ea4e0e practracker: Make you happy funny script
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-09 11:06:51 -04:00
Nick Mathewson bc4ddbf4ac New practracker exceptions for dependency violations in headers
I've done this manually, since I don't want to override the existing
exceptions in this branch.
2019-09-05 16:17:50 -04:00
Nick Mathewson 2780cbb9cb Merge branch 'ticket30935' into ticket30935_merged 2019-08-22 17:25:35 -04:00
David Goulet d475d7c2fb Merge branch 'tor-github/pr/1244' 2019-08-22 17:10:22 -04:00
Nick Mathewson cc48eff2d3 Merge branch 'ticket31176' into ticket31176_merged 2019-08-21 09:46:20 -04:00
Nick Mathewson edf5a327c5 Merge branch 'ticket30914' into ticket30914_merged 2019-08-20 13:57:05 -04:00
Nick Mathewson 29bd43ab03 Merge remote-tracking branch 'tor-github/pr/1224' 2019-08-19 11:26:58 -04:00
George Kadianakis b257e8e553 Merge remote-tracking branch 'mike/bug31356+logs-rebased2' into bug31356_final 2019-08-19 17:53:00 +03:00
David Goulet 81e37b81f1 practracker: Make exceptions.txt happy
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-19 09:47:52 -04:00
Mike Perry 6deba34fee Practracker 2019-08-12 14:06:08 -05:00
Neel 64d2133a61 Move the connection_edge_process_relay_cell() assignments out of if statements in circuit_receive_relay_cell() 2019-08-08 13:05:46 -04:00
David Goulet 2b225aaa77 practracker: Make it happy after rebase
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-06 08:01:26 -04:00
David Goulet c5b00c5a51 hs-v3: Add consensus parameters for DoS defenses
Part of #15516

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-06 07:58:14 -04:00
Nick Mathewson 0f4b245b20 update exceptions file for depencency violations 2019-08-05 17:48:06 -04:00
George Kadianakis ce477da8a7 Ignore regular cells in padding circuits.
Padding circuits were regular cells that got closed before their padding
machine could finish. This means that they can still receive regular cells from
their past life, but they have no way or reason to answer them anymore. Hence
let's ignore them before they even get to the proper subsystems.
2019-08-05 18:03:23 +03:00
Nick Mathewson d5ccd0fa84 Add exceptions for current .h practracker problems. 2019-08-05 10:32:39 -04:00
Nick Mathewson e57209dc32 Regenerate the practracker exceptions.txt file 2019-08-01 10:25:42 -04:00
David Goulet 57f955a38b practracker: Make it happing for circuitpadding.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-07-25 10:28:38 -04:00
Nick Mathewson f306d12b58 Refactor handling of TestingTorNetwork
Previously, when TestingTorNetwork was set, we would manually adjust
the initvalue members of a bunch of other config_var_t, and then
re-run the early parts or parsing the options.

Now we treat the initvalue fields as immutable, but instead assign
to them in options_init(), as early as possible.  Rather than
re-running the early parts of options, we just re-call the
options_init_from_string() function.

This patch de-kludges some of our code pretty handily.  I think it
could later handle authorities and fallbacks, but for now I think we
should leave those alone.
2019-07-24 15:21:56 -04:00
George Kadianakis fdfee3d06f Changes file for #31113. 2019-07-23 12:44:43 +03:00
George Kadianakis 5303dbe624 Merge branch 'tor-github/pr/1152' 2019-07-04 17:14:06 +03:00
Nick Mathewson fdbd139495 Merge remote-tracking branch 'tor-github/pr/1136' 2019-07-02 13:33:50 -04:00
Nick Mathewson 0fa3dc3228 begin_cell_parse(): Add an assertion to please coverity.
Coverity doesn't understand that if begin_cell_parse() returns 0 and
sets is_begindir to 0, its address field will always be set.

Fixes bug 30126; bugfix on 0.2.4.7-alpha; Fixes CID 1447296.
2019-06-28 11:29:51 -04:00
Nick Mathewson 089ef46063 Merge branch 'bug30721_squashed' 2019-06-26 09:57:20 -04:00
teor fb93646c1c resolve: split sub-functions out of tor_addr_lookup()
And remove the practracker exception for tor_addr_lookup().

Cleanup after 30721.
2019-06-26 09:55:37 -04:00
Nick Mathewson 0fe9657c8c Merge remote-tracking branch 'tor-github/pr/1119' 2019-06-26 09:50:00 -04:00
Nick Mathewson a91ed23403 Use structvar to find the types for config vars. 2019-06-25 12:51:25 -04:00
teor c131b0763e stats: add comments about the required chunk structure in extra info files
These comments should prevent future instances of 30958.

And allow a larger file in practracker.

Follow up after 30958.
2019-06-25 12:30:59 +10:00
teor 45be44ed9c stats: Split extrainfo_dump_to_string() into smaller functions.
Closes ticket 30956.
2019-06-24 20:47:44 +10:00
David Goulet 9644f3462a Make the great grand practracker happy...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:42:30 -04:00
David Goulet 05b6f73f12 Make the great grand practracker happy...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:41:45 -04:00
Nick Mathewson 52d386c9b0 Merge remote-tracking branch 'tor-github/pr/1100' 2019-06-17 08:54:12 -04:00
teor 16e71c7fb0 practracker: accept an extra line in nt_service_install()
Part of 30799.
2019-06-13 18:23:50 +10:00
David Goulet e9d99d2e15 Merge branch 'tor-github/pr/1083' 2019-06-11 11:43:15 -04:00
teor 6be9d3aed8 practracker: accept one extra line in routerlist.c
practracker exception for 30780.
2019-06-06 18:24:17 +10:00
teor b07b1a4f6d practracker: accept 3 extra lines in router_parse_entry_from_string()
practracker exception for bug 30781.
2019-06-06 13:42:30 +10:00
Nick Mathewson 2926f49b24 Regenerate practracker excpetions file 2019-06-05 09:34:14 -04:00
Nick Mathewson ae490189f8 practracker update 2019-06-05 09:06:43 -04:00
George Kadianakis 99bf3d8e14 Merge branch 'tor-github/pr/1072' 2019-06-05 14:40:38 +03:00
Nick Mathewson dc5cdde60c update practracker 2019-06-04 08:29:43 -04:00
Nick Mathewson 5e594831c7 Practracker excpetions. 2019-05-31 12:41:44 -04:00
Nick Mathewson 0bc1241494 Make sure that we send at least some random data in RELAY_DATA cells
Proposal 289 prevents SENDME-flooding by requiring the other side to
authenticate the data it has received.  But this data won't actually
be random if they are downloading a known resource.  "No problem",
we said, "let's fell the empty parts of our cells with some
randomness!" and we did that in #26871.

Unfortunately, if the relay data payloads are all completely full,
there won't be any empty parts for us to randomize.

Therefore, we now pick random "randomness windows" between
CIRCWINDOW_INCREMENT/2 and CIRCWINDOW_INCREMENT. We remember whether we have
sent a cell containing at least 16 bytes of randomness in that window.  If we
haven't, then when the window is exhausted, we send one.  (This window approach
is designed to lower the number of rng checks we have to do.  The number 16 is
pulled out of a hat to change the attacker's guessing difficulty to
"impossible".)

Implements 28646.
2019-05-27 14:20:07 +03:00
Nick Mathewson e6b862e6a8 Merge branch 'ticket30428_041_02_squashed' 2019-05-22 11:48:43 -04:00
David Goulet 3835a3acf5 sendme: Properly record SENDMEs on both edges
Turns out that we were only recording the "b_digest" but to have
bidirectionnal authenticated SENDMEs, we need to use the "f_digest" in the
forward cell situation.

Because of the cpath refactoring, this commit plays with the crypt_path_ and
relay_crypto_t API a little bit in order to respect the abstractions.

Previously, we would record the cell digest as the SENDME digest in the
decrypt cell function but to avoid code duplication (both directions needs to
record), we now do that right after iff the cell is recognized (at the edge).
It is now done in circuit_receive_relay_cell() instead.

We now also record the cell digest as the SENDME digest in both relay cell
encryption functions since they are split depending on the direction.
relay_encrypt_cell_outbound() and relay_encrypt_cell_inbound() need to
consider recording the cell digest depending on their direction (f vs b
digest).

Fixes #30428

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-22 11:47:20 -04:00
David Goulet 59b9eecc19 sendme: Record cell digest on both client and exit
It turns out that only the exit side is validating the authenticated SENDME v1
logic and never the client side. Which means that if a client ever uploaded
data towards an exit, the authenticated SENDME logic wouldn't apply.

For this to work, we have to record the cell digest client side as well which
introduced a new function that supports both type of edges.

This also removes a test that is not valid anymore which was that we didn't
allow cell recording on an origin circuit (client).

Part of #30428

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-22 11:47:20 -04:00
Mike Perry 84274000d8 Yes, these functions really do have to be this long. 2019-05-16 20:29:09 +00:00
David Goulet 39a14421b1 Merge branch 'tor-github/pr/1021'
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-15 15:35:22 -04:00
George Kadianakis d71fa707dd Merge branch 'bug28780-squashed3-rebased' into bug28780_rebase 2019-05-15 16:46:51 +03:00