Fix CVE-2010-1633 and CVE-2010-0742.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 1 Jun 2010 13:17:06 +0000 (13:17 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 1 Jun 2010 13:17:06 +0000 (13:17 +0000)
CHANGES
NEWS
crypto/cms/cms_asn1.c
crypto/rsa/rsa_pmeth.c

diff --git a/CHANGES b/CHANGES
index 230535d78199b99fd8fc858bf129057ecc1fa420..ccf09e174fb7415ac74ea20d689dd21818484f89 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,9 @@
 
  Changes between 1.0.0 and 1.0.0a  [xx XXX xxxx]
 
-  *)
+  *) Check return value of int_rsa_verify in pkey_rsa_verifyrecover 
+     (CVE-2010-1633)
+     [Steve Henson, Peter-Michael Hager <hager@dortmund.net>]
 
  Changes between 0.9.8n and 1.0.0  [29 Mar 2010]
 
   
  Changes between 0.9.8n and 0.9.8o [xx XXX xxxx]
 
+  *) Correct a typo in the CMS ASN1 module which can result in invalid memory
+     access or freeing data twice (CVE-2010-0742)
+     [Steve Henson, Ronald Moesbergen <intercommit@gmail.com>]
+
   *) Add SHA2 algorithms to SSL_library_init(). SHA2 is becoming far more
      common in certificates and some applications which only call
      SSL_library_init and not OpenSSL_add_all_algorithms() will fail.
diff --git a/NEWS b/NEWS
index 65c0ac933ff0b7d90b464caaa35ade45cf7b9505..3a787ea06cef7296aeaaaf2d5a77e74b2d160f53 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
 
   Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a:
 
+      o Fix for security issue CVE-2010-1633.
       o GOST MAC and CFB fixes.
 
   Major changes between OpenSSL 0.9.8n and OpenSSL 1.0:
@@ -34,6 +35,7 @@
 
   Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o:
 
+      o Fix for security issue CVE-2010-0742.
       o Various DTLS fixes.
       o Recognise SHA2 certificates if only SSL algorithms added.
       o Fix for no-rc4 compilation.
index 7f7132c3bb8f6c4fede581f7e7d50b01b9174880..fcba4dcbccfc58c7673e30a17f744de3674be7d7 100644 (file)
@@ -131,8 +131,8 @@ ASN1_NDEF_SEQUENCE(CMS_SignedData) = {
 } ASN1_NDEF_SEQUENCE_END(CMS_SignedData)
 
 ASN1_SEQUENCE(CMS_OriginatorInfo) = {
-       ASN1_IMP_SET_OF_OPT(CMS_SignedData, certificates, CMS_CertificateChoices, 0),
-       ASN1_IMP_SET_OF_OPT(CMS_SignedData, crls, CMS_RevocationInfoChoice, 1)
+       ASN1_IMP_SET_OF_OPT(CMS_OriginatorInfo, certificates, CMS_CertificateChoices, 0),
+       ASN1_IMP_SET_OF_OPT(CMS_OriginatorInfo, crls, CMS_RevocationInfoChoice, 1)
 } ASN1_SEQUENCE_END(CMS_OriginatorInfo)
 
 ASN1_NDEF_SEQUENCE(CMS_EncryptedContentInfo) = {
index 297e17cdcf4d60ac38fb54f6ff8d619df30b1ae2..c6892ecd09c1e7f6ccdb0ac50fdd60ac6f6e24ad 100644 (file)
@@ -246,6 +246,8 @@ static int pkey_rsa_verifyrecover(EVP_PKEY_CTX *ctx,
                        ret = int_rsa_verify(EVP_MD_type(rctx->md),
                                                NULL, 0, rout, &sltmp,
                                        sig, siglen, ctx->pkey->pkey.rsa);
+                       if (ret <= 0)
+                               return 0;
                        ret = sltmp;
                        }
                else