Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket20700 035 02 #301

Closed
wants to merge 46 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0f28284
hs-v3: Load all client auth keys to the service
haxxpop Aug 18, 2018
629c188
test: HS v3 loading client auth keys service side
haxxpop Aug 18, 2018
0a243a6
hs-v3: Generate all descriptor related keys
haxxpop Apr 9, 2018
2b2a303
test: HS v3 building a descriptor with client auth
haxxpop Apr 12, 2018
d25e381
test: Build an HSv3 descriptor with authorized client
haxxpop Apr 12, 2018
359a49a
hs-v3: Encrypt the descriptor using a cookie
haxxpop Apr 13, 2018
718f39d
test: HS v3 descriptor encoding with client authorization
haxxpop Apr 14, 2018
47d62f8
hs-v3: Load client authorization secret key from file
haxxpop Aug 19, 2018
33071c8
test: HS v3 client authorization loading secret key
haxxpop Aug 19, 2018
a6790e9
hs-v3: Refactor secret data building logic
haxxpop Apr 19, 2018
a7a0545
hs-v3: Refactor the descriptor decryption/decoding
haxxpop Apr 19, 2018
09c3d4b
hs-v3: Decrypt the descriptor with client private key
haxxpop Apr 19, 2018
af0b5b8
test: HS v3 descriptor decoding with client authorization
haxxpop Apr 21, 2018
94674ff
hs-v3: Re-enable the decoding in the encoding function
haxxpop Apr 22, 2018
bbefbd8
hs-v3: Make all descriptor content free functions public
haxxpop May 9, 2018
85115a2
hs-v3: Republish descriptors if client auth changes
haxxpop May 9, 2018
cd01788
test: HS v3 client auth is config equal function
haxxpop May 16, 2018
051d6ab
hs-v3: Rename client_sk to client_auth_sk
haxxpop May 21, 2018
7a18b4d
hs-v3: Rename client_pk to client_auth_pk
haxxpop May 21, 2018
b49df5a
hs-v3: Log client auth load activities service side
haxxpop Aug 19, 2018
4eea079
hs-v3: Log client auth load activities client side
haxxpop Aug 19, 2018
270bfc9
hs-v3: Improve v3 client authorization logging
dgoulet-tor Aug 30, 2018
e7d6c0e
bug: Use PATH_SEPARATOR instead of slash
haxxpop Sep 2, 2018
f1bc43a
fixup! test: HS v3 client authorization loading secret key
haxxpop Sep 2, 2018
9f715d5
fixup! test: HS v3 loading client auth keys service side
haxxpop Sep 2, 2018
67fa226
fixup! hs-v3: Load all client auth keys to the service
dgoulet-tor Sep 5, 2018
de70396
fixup! hs-v3: Load all client auth keys to the service
dgoulet-tor Sep 5, 2018
7396175
fixup! hs-v3: Load all client auth keys to the service
dgoulet-tor Sep 5, 2018
75a261c
fixup! hs-v3: Load all client auth keys to the service
dgoulet-tor Sep 5, 2018
7eaa650
fixup! hs-v3: Log client auth load activities service side
dgoulet-tor Sep 5, 2018
5505486
fixup! hs-v3: Load all client auth keys to the service
dgoulet-tor Sep 5, 2018
c87bf6a
fixup! test: HS v3 loading client auth keys service side
dgoulet-tor Sep 5, 2018
f8e98f8
fixup! test: HS v3 loading client auth keys service side
dgoulet-tor Sep 5, 2018
c6403e6
hs-v3: Make hs_desc_build_fake_authorized_client() return an object
dgoulet-tor Sep 5, 2018
fe50c14
fixup! hs-v3: Encrypt the descriptor using a cookie
dgoulet-tor Sep 5, 2018
9d1fe48
fixup! hs-v3: Load client authorization secret key from file
dgoulet-tor Sep 5, 2018
4ba612a
fixup! hs-v3: Load client authorization secret key from file
dgoulet-tor Sep 5, 2018
97404e3
fixup! hs-v3: Decrypt the descriptor with client private key
dgoulet-tor Sep 5, 2018
54d9da1
fixup! hs-v3: Decrypt the descriptor with client private key
dgoulet-tor Sep 5, 2018
1f98b67
fixup! hs-v3: Decrypt the descriptor with client private key
dgoulet-tor Sep 5, 2018
6e919ff
Revert "fixup! hs-v3: Decrypt the descriptor with client private key"
dgoulet-tor Sep 6, 2018
0510edf
fixup! hs-v3: Decrypt the descriptor with client private key
dgoulet-tor Sep 6, 2018
bcd2b2d
HSv3: Add subcredential in client auth KDF on the service-side.
asn-d6 Sep 6, 2018
0b60cc1
HSv3: Add subcredential in client auth KDF on the client-side.
asn-d6 Sep 6, 2018
3bcfe21
fixup! hs-v3: Republish descriptors if client auth changes
haxxpop Sep 7, 2018
a2b821c
HSv3: Don't assert when reading bad client-side privkeys.
asn-d6 Sep 7, 2018
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Revert "fixup! hs-v3: Decrypt the descriptor with client private key"

This reverts commit 97404e3.
  • Loading branch information...
dgoulet-tor committed Sep 6, 2018
commit 6e919ff0955a6ee6bf20fbca229e21d36d2b35fd
@@ -1133,28 +1133,21 @@ decode_auth_client(const directory_token_t *tok,
hs_desc_authorized_client_t *client)
{
int ret = -1;
size_t tok0_len, tok1_len, tok2_len;

tor_assert(tok);
tor_assert(tok->n_args >= 3);
tor_assert(client);

/* Get the length once and only once. */
tok0_len = strlen(tok->args[0]);
tok1_len = strlen(tok->args[1]);
tok2_len = strlen(tok->args[2]);

if (base64_decode((char *) client->client_id, sizeof(client->client_id),

This comment has been minimized.

Copy link
@nmathewson

nmathewson Sep 5, 2018

Contributor

It's not enough to check that this didn't return a negative number -- you need to make sure that it returned the right positive number, or that its input was the right length.

Please audit all of the base_decode() functions in this branch to make sure that they don't have this bug; I may have missed some.*

This comment has been minimized.

Copy link
@dgoulet-tor

dgoulet-tor Sep 5, 2018

Author Contributor

Fixup commit: 97404e3

tok->args[0], tok0_len) != (int) tok0_len) {
tok->args[0], strlen(tok->args[0])) < 0) {
goto done;
}
if (base64_decode((char *) client->iv, sizeof(client->iv),
tok->args[1], tok1_len) != (int) tok1_len) {
tok->args[1], strlen(tok->args[1])) < 0) {
goto done;
}
if (base64_decode((char *) client->encrypted_cookie,
sizeof(client->encrypted_cookie),
tok->args[2], tok2_len) != (int) tok2_len) {
tok->args[2], strlen(tok->args[2])) < 0) {
goto done;
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.