Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Mathewson
Tor
Commits
5f4e14b8
Commit
5f4e14b8
authored
Mar 17, 2020
by
Nick Mathewson
🐻
Browse files
Merge branch 'maint-0.3.5' into maint-0.4.1
parents
c22696e3
089e57d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
changes/trove_2020_003
0 → 100644
View file @
5f4e14b8
o Minor bugfixes (onion services v3):
- Fix assertion failure that could result from a corrupted ADD_ONION control
port command. Found by Saibato. Fixes bug 33137; bugfix on
0.3.3.1-alpha. This issue is also being tracked as TROVE-2020-003.
src/feature/hs/hs_client.c
View file @
5f4e14b8
...
...
@@ -1274,7 +1274,7 @@ hs_client_decode_descriptor(const char *desc_str,
uint8_t
subcredential
[
DIGEST256_LEN
];
ed25519_public_key_t
blinded_pubkey
;
hs_client_service_authorization_t
*
client_auth
=
NULL
;
curve25519_secret_key_t
*
client_au
h
t_sk
=
NULL
;
curve25519_secret_key_t
*
client_aut
h
_sk
=
NULL
;
tor_assert
(
desc_str
);
tor_assert
(
service_identity_pk
);
...
...
@@ -1283,7 +1283,7 @@ hs_client_decode_descriptor(const char *desc_str,
/* Check if we have a client authorization for this service in the map. */
client_auth
=
find_client_auth
(
service_identity_pk
);
if
(
client_auth
)
{
client_au
h
t_sk
=
&
client_auth
->
enc_seckey
;
client_aut
h
_sk
=
&
client_auth
->
enc_seckey
;
}
/* Create subcredential for this HS so that we can decrypt */
...
...
@@ -1296,7 +1296,7 @@ hs_client_decode_descriptor(const char *desc_str,
/* Parse descriptor */
ret
=
hs_desc_decode_descriptor
(
desc_str
,
subcredential
,
client_au
h
t_sk
,
desc
);
client_aut
h
_sk
,
desc
);
memwipe
(
subcredential
,
0
,
sizeof
(
subcredential
));
if
(
ret
<
0
)
{
goto
err
;
...
...
src/feature/hs/hs_service.c
View file @
5f4e14b8
...
...
@@ -3517,6 +3517,12 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports,
goto
err
;
}
if
(
ed25519_validate_pubkey
(
&
service
->
keys
.
identity_pk
)
<
0
)
{
log_warn
(
LD_CONFIG
,
"Bad ed25519 private key was provided"
);
ret
=
RSAE_BADPRIVKEY
;
goto
err
;
}
/* Make sure we have at least one port. */
if
(
smartlist_len
(
service
->
config
.
ports
)
==
0
)
{
log_warn
(
LD_CONFIG
,
"At least one VIRTPORT/TARGET must be specified "
...
...
src/lib/crypt_ops/crypto_ed25519.c
View file @
5f4e14b8
...
...
@@ -795,7 +795,7 @@ ed25519_point_is_identity_element(const uint8_t *point)
int
ed25519_validate_pubkey
(
const
ed25519_public_key_t
*
pubkey
)
{
uint8_t
result
[
32
]
=
{
9
};
uint8_t
result
[
32
]
=
{
0
};
/* First check that we were not given the identity element */
if
(
ed25519_point_is_identity_element
(
pubkey
->
pubkey
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment