- 22 May, 2019 4 commits
-
-
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>
-
There was a missing cell version check against our max supported version. In other words, we do not fallback to v0 anymore in case we do know the SENDME version. We can either handle it or not, never fallback to the unauthenticated version in order to avoid gaming the authenticated logic. Add a unit tests making sure we properly test that and also test that we can always handle the default emit and accepted versions. Fixes #30428 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
The validation of the SENDME cell is now done as the very first thing when receiving it for both client and exit. On failure to validate, the circuit is closed as detailed in the specification. Part of #30428 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
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>
-
- 15 May, 2019 25 commits
-
-
George Kadianakis authored
-
Mike Perry authored
-
Mike Perry authored
To ease debugging of miscount issues, attach vanguards with --loglevel DEBUG and obtain control port logs (or use any other control port CIRC and CIRC_MINOR event logging mechanism).
-
Mike Perry authored
If circuit padding wants to keep a circuit open and pathbias used to ignore it, pathbias should continue to ignore it. This may catch other purpose-change related miscounts (such as timeout measurement, cannibalization, onion service circuit transitions, and vanguards).
-
Mike Perry authored
-
Mike Perry authored
Also test circpad expiry safeguard.
-
Mike Perry authored
When a circuit is marked for close, check to see if any of our padding machines want to take ownership of it and continue padding until the machine hits the END state. For safety, we also ensure that machines that do not terminate are still closed as follows: Because padding machine timers are UINT32_MAX in size, if some sort of network event doesn't happen on a padding-only circuit within that time, we can conclude it is deadlocked and allow circuit_expire_old_circuits_clientside() to close it. If too much network activity happens, then per-machine padding limits can be used to cease padding, which will cause network cell events to cease, on the circuit, which will cause circpad to abandon the circuit as per the above time limit.
-
Mike Perry authored
-
George Kadianakis authored
-
Mike Perry authored
Practracker beatings are even more fun when they get caused mid-PR due to a github auto-rebase of a PR Because github PRs choose the most recent origin/master at the time of the PR (and for any fixups pushed to a PR later to send to CI), there are tons of conflicts and unexpected practracker issues. This means CI can suddenly fail after fixups to a branch that pass locally. Then CI fails and we have to close and re-open the PR.
-
Mike Perry authored
We need to check here because otherwise we can try to schedule padding with no tokens left upon the receipt of a padding event when our bins just became empty.
-
Mike Perry authored
-
Mike Perry authored
Our other tests tested state lengths against padding packets, and token counts against non-padding packets. This test checks state lengths against non-padding packets (and also padding packets too), and checks token counts against padding packets (and also non-padding packets too). The next three commits are needed to make this test pass (it found 3 bugs). Yay?
-
Mike Perry authored
-
Mike Perry authored
-
Mike Perry authored
-
Mike Perry authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
George Kadianakis authored
-
George Kadianakis authored
-
Mike Perry authored
Deliver nonpadding events instead of calling token removal functions.
-
Mike Perry authored
This commit moves code that updates the state length and padding limit counts out from the callback to its own function, for clarity. It does not change functionality.
-
Mike Perry authored
This commit moves the padding state limit checks and the padding rate limit checks out of the token removal codepath, and causes all three functions to get called from a single circpad_machine_count_nonpadding_sent() function. It does not change functionality.
-
- 14 May, 2019 2 commits
-
-
Nick Mathewson authored
-
George Kadianakis authored
-
- 13 May, 2019 9 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
-
-
-
-
-
Nick Mathewson authored
-
David Goulet authored
The code flow in theory can end up with a layer_hint to be NULL but in practice it should never happen because with an origin circuit, we must have the layer_hint. Just in case, BUG() on it if we ever end up in this situation and recover by closing the circuit. Fixes #30467. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-