Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2400?usp=email
to review the following change.
Change subject: crypto_mbedtls: don't crash in the TLS 1.0 PRF without MD5 or
SHA1
......................................................................
crypto_mbedtls: don't crash in the TLS 1.0 PRF without MD5 or SHA1
md_info_table only has the MD5 and SHA1 entries if the crypto library
was built with them. Without them md_get() returns NULL, and the PRF
check that options_process_mutate_prf() runs at startup crashed in
tls1_P_hash().
Return false instead, so OpenVPN falls back to the existing "PRF not
supported" handling.
Change-Id: I3d75dd5bb79eb2b76c9a14520be6deffe311e1f5
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/crypto_mbedtls.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/00/2400/1
diff --git a/src/openvpn/crypto_mbedtls.c b/src/openvpn/crypto_mbedtls.c
index 58c1fd2..0a645d6 100644
--- a/src/openvpn/crypto_mbedtls.c
+++ b/src/openvpn/crypto_mbedtls.c
@@ -926,7 +926,8 @@
const md_info_t *md5 = md_get("MD5");
const md_info_t *sha1 = md_get("SHA1");
- if (label_len > (size_t)INT_MAX)
+ /* NULL if the crypto library was built without MD5 or SHA1 */
+ if (!md5 || !sha1 || label_len > (size_t)INT_MAX)
{
return false;
}
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2400?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d75dd5bb79eb2b76c9a14520be6deffe311e1f5
Gerrit-Change-Number: 2400
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel