aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-02-24 09:48:14 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-24 11:36:36 -0500
commit4ed10e5053ebef31d5f922933f7236a6ab743bf9 (patch)
tree82518acf73b115ce9b5ab54c54c2ae830d4bd250 /src/or/rendservice.h
parent823fb68a14b551fc1f40e904428b3e31732441c5 (diff)
downloadtor-4ed10e5053ebef31d5f922933f7236a6ab743bf9.tar.gz
tor-4ed10e5053ebef31d5f922933f7236a6ab743bf9.zip
hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cell
When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof() on a pointer instead of using the real size of the destination buffer leading to an overflow passing an enormous value to the signing digest function. Fortunately, that value was only used to make sure the destination buffer length was big enough for the key size and in this case it always was because of the overflow. Fixes #21553 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/rendservice.h')
-rw-r--r--src/or/rendservice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index 3bfac0bece..85daaae4e2 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -130,6 +130,7 @@ STATIC int rend_service_poison_new_single_onion_dir(
const rend_service_t *s,
const or_options_t* options);
STATIC ssize_t encode_establish_intro_cell_legacy(char *cell_body_out,
+ size_t cell_body_out_len,
crypto_pk_t *intro_key,
char *rend_circ_nonce);
STATIC void prune_services_on_reload(smartlist_t *old_service_list,