| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
tor-bytes: defend against misuse of extract_n().
See merge request tpo/core/arti!1053
|
| | | | | |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, if somebody wrote this code, an attacker could easily
use it to cause an OOM panic:
```
let n = r.take_u64();
let items: Vec<Foo> = r.extract_n(n as usize)?;
```
The first line of defense here is not to write protocols like that:
we don't actually _have_ any 32-bit counters in our protocol
AFAICT.
The second line of defense is to pre-check `n` for reasonableness
before calling `extract_n`.
Here we add a third line of defense: whereas previously we would do
`Vec::with_capacity(n)` in `extract_n`, we now allocate an initial
capacity of `min(n, r.remaining())`. This ensures that the size of
the allocation can't exceed the remaining length of the message,
which (for our cell types at least) should prevent it from
overflowing or running OOM.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Impl FromStr and Display for HsId, etc.
See merge request tpo/core/arti!1054
|
| | | | | |
|
| | | | | |
|
| | |/ / |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Fix typos
See merge request tpo/core/arti!1050
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
tor-netdoc: Validate inner certs in HsDesc
Closes #744
See merge request tpo/core/arti!1044
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes our implementation behave the same as the C tor
implementation, by validating all of the expiration and signatures
on the certificates in the inner document.
(It is still not semantically necessary to check these certs: the
document in which they appear is already signed by the key with
which they are allegedly signed.)
Closes #744
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Abolish knowledge of HS circuits in circmgr, and tidying
See merge request tpo/core/arti!1047
|
| | | | |
| | | |
| | | |
| | | | |
And delete the associated TODO.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These Arcs are all "downward", referencing items from layers lower in
the stack. So they don't cause cycles.
There was going to be a cycle involving the `OnionConnector` upcall
trait, but we have just abolished that.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Abolish CircMgr::get_or_launch_onion_client and everything to support
it. We have decided that `.onion` diversion ccan't/shouldn't occur in
tor-circmgr. Probably, it should occur much higher up - arti-client
maybe - since it will sometimes need ambient authority (KS_hsc_*).
Now all knowledge of HS connections is in tor-hsclient. This
gets rid of a layering inversion and the trait needed for tor-circmgr
to do the upcall to tor-hsclient.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-cell: Rename Rendezvous*::message to handshake_info.
See merge request tpo/core/arti!1045
|
| | | | |
| | | |
| | | |
| | | | |
Follow-up from !1038
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Implement HS state management
See merge request tpo/core/arti!1034
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Use the occupied/vacant terminology that the slotmap docs use.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2882079
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It can contain no keys; state this more prominently, and explain what
it represents. Also fix a few typos etc.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881576
This is a singificant simplification, in fact.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Text largely from
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881638
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Autogenerated with rustfmt; no code changes.
This tidies up the bizarre formatting.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is getting rather confusing; simply reformtting it won't do, I
think. Also there would be much rightward drift.
So move the meat out into the new function.
(And introduce a convenience alias for its captures.)
Docs and reformatting will follow in a moment.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Explicit drops don't work. Instead, introduce a scope.
We need two scopes, actually: one where we do the initial table
wrangling, and one for the retries after relock.
So we must put the meat in a closure so we can reuse it.
And we must return the flow control as an enum. Bah, etc.
Avoid reformatting this for the moment. This makes the delta legible...
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We're going to have another function which will want this.
Leave a convenience closure to capture the runtime.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is still correct from a lock hierarchy pov. It moves the guard
relock to the end, which is going to be necessary since it is going to
have to move right outside the loop.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881575
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We're about to fix the comparison to treat all empty key sets as
equal.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is still not great, but it at least makes the output plausible to
read by eye.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
This will allow us to test state.rs.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Like the similar thing in tor-guardmgr.
|
| | | | | | |
|