Validate the RSA key size received when parsing INTRODUCE2 cells.

Fixes bug 15600; reported by skruffy
This commit is contained in:
Yawning Angel 2015-03-30 21:53:39 +00:00 committed by Nick Mathewson
parent 01e4bc80cd
commit 49ddd92c11
2 changed files with 15 additions and 0 deletions

5
changes/bug15600 Normal file
View File

@ -0,0 +1,5 @@
o Major bugfixes (security, hidden service):
- Fix an issue that would allow a malicious client to trigger
an assertion failure and halt a hidden service. Fixes
bug 15600; bugfix on 0.2.1.6-alpha. Reported by "skruffy".

View File

@ -1810,6 +1810,16 @@ rend_service_parse_intro_for_v2(
goto err; goto err;
} }
if (128 != crypto_pk_keysize(extend_info->onion_key)) {
if (err_msg_out) {
tor_asprintf(err_msg_out,
"invalid onion key size in version %d INTRODUCE%d cell",
intro->version,
(intro->type));
}
goto err;
}
ver_specific_len = 7+DIGEST_LEN+2+klen; ver_specific_len = 7+DIGEST_LEN+2+klen;