Skip to content

Commit b976852

Browse files
Robert Golebiowskibjornmu
authored andcommitted
Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
1 parent 0243a2d commit b976852

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

extra/yassl/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ before calling SSL_new();
1212

1313
*** end Note ***
1414

15+
yaSSL Release notes, version 2.3.8 (9/17/2015)
16+
This release of yaSSL fixes a high security vulnerability. All users
17+
SHOULD update. If using yaSSL for TLS on the server side with private
18+
RSA keys allowing ephemeral key exchange you MUST update and regenerate
19+
the RSA private keys. This report is detailed in:
20+
https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf
21+
yaSSL now detects RSA signature faults and returns an error.
22+
1523
yaSSL Patch notes, version 2.3.7e (6/26/2015)
1624
This release of yaSSL includes a fix for Date less than comparison.
1725
Previously yaSSL would return true on less than comparisons if the Dates

extra/yassl/include/openssl/ssl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "rsa.h"
3636

3737

38-
#define YASSL_VERSION "2.3.7e"
38+
#define YASSL_VERSION "2.3.8"
3939

4040

4141
#if defined(__cplusplus)

extra/yassl/include/yassl_error.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ enum YasslError {
5353
compress_error = 118,
5454
decompress_error = 119,
5555
pms_version_error = 120,
56-
sanityCipher_error = 121
56+
sanityCipher_error = 121,
57+
rsaSignFault_error = 122
5758

5859
// !!!! add error message to .cpp !!!!
5960

extra/yassl/src/handshake.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,8 @@ void sendCertificateVerify(SSL& ssl, BufferOutput buffer)
11721172

11731173
CertificateVerify verify;
11741174
verify.Build(ssl);
1175+
if (ssl.GetError()) return;
1176+
11751177
RecordLayerHeader rlHeader;
11761178
HandShakeHeader hsHeader;
11771179
mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);

extra/yassl/src/yassl_error.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ void SetErrorString(YasslError error, char* buffer)
148148
strncpy(buffer, "sanity check on cipher text size error", max);
149149
break;
150150

151+
case rsaSignFault_error:
152+
strncpy(buffer, "rsa signature fault error", max);
153+
break;
154+
151155
// openssl errors
152156
case SSL_ERROR_WANT_READ :
153157
strncpy(buffer, "the read operation would block", max);

extra/yassl/src/yassl_imp.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,16 @@ void DH_Server::build(SSL& ssl)
196196
sha.update(tmp.get_buffer(), tmp.get_size());
197197
sha.get_digest(&hash[MD5_LEN]);
198198

199-
if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo)
199+
if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) {
200200
auth->sign(signature_, hash, sizeof(hash),
201201
ssl.getCrypto().get_random());
202+
// check for rsa signautre fault
203+
if (!auth->verify(hash, sizeof(hash), signature_,
204+
auth->get_signatureLength())) {
205+
ssl.SetError(rsaSignFault_error);
206+
return;
207+
}
208+
}
202209
else {
203210
auth->sign(signature_, &hash[MD5_LEN], SHA_LEN,
204211
ssl.getCrypto().get_random());
@@ -2159,6 +2166,12 @@ void CertificateVerify::Build(SSL& ssl)
21592166
memcpy(sig.get(), len, VERIFY_HEADER);
21602167
rsa.sign(sig.get() + VERIFY_HEADER, hashes_.md5_, sizeof(Hashes),
21612168
ssl.getCrypto().get_random());
2169+
// check for rsa signautre fault
2170+
if (!rsa.verify(hashes_.md5_, sizeof(Hashes), sig.get() + VERIFY_HEADER,
2171+
rsa.get_cipherLength())) {
2172+
ssl.SetError(rsaSignFault_error);
2173+
return;
2174+
}
21622175
}
21632176
else { // DSA
21642177
DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false);

0 commit comments

Comments
 (0)