Codebase list openssl / debian/openssl-0.9.8o-4squeeze10
update CVE-2012-0884 patch to include detecting symmetric crypto errors in PKCS7_decrypt Kurt Roeckx 12 years ago
2 changed file(s) with 38 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
00 openssl (0.9.8o-4squeeze10) squeeze-security; urgency=low
11
22 * Fix CVE-2012-2110
3 * update CVE-2012-0884 patch to include detecting symmetric crypto errors
4 in PKCS7_decrypt
35
46 -- Kurt Roeckx <kurt@roeckx.be> Thu, 19 Apr 2012 20:30:38 +0200
57
0 index 7407ae1..b8c0ee8 100644
10 --- a/apps/cms.c
21 +++ b/apps/cms.c
32 @@ -226,6 +226,8 @@ int MAIN(int argc, char **argv)
1817
1918 if (secret_key)
2019 {
21 index 25f8874..75e3be0 100644
2220 --- a/crypto/cms/cms.h
2321 +++ b/crypto/cms/cms.h
2422 @@ -110,6 +110,7 @@ DECLARE_ASN1_FUNCTIONS_const(CMS_ReceiptRequest)
2927
3028 const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);
3129
32 index bab2623..580083b 100644
3330 --- a/crypto/cms/cms_enc.c
3431 +++ b/crypto/cms/cms_enc.c
3532 @@ -73,6 +73,8 @@ BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec)
125122 if (ok)
126123 return b;
127124 BIO_free(b);
128 index d499ae8..b8685fa 100644
129125 --- a/crypto/cms/cms_env.c
130126 +++ b/crypto/cms/cms_env.c
131127 @@ -352,6 +352,8 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms,
154150
155151 err:
156152 if (!ret && ek)
157 index 7d60fac..ce65d6e 100644
158153 --- a/crypto/cms/cms_lcl.h
159154 +++ b/crypto/cms/cms_lcl.h
160155 @@ -175,6 +175,8 @@ struct CMS_EncryptedContentInfo_st
166161 };
167162
168163 struct CMS_RecipientInfo_st
169 index f35883a..2be07c2 100644
170164 --- a/crypto/cms/cms_smime.c
171165 +++ b/crypto/cms/cms_smime.c
172166 @@ -622,7 +622,10 @@ int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert)
238232 cont = CMS_dataInit(cms, dcont);
239233 if (!cont)
240234 return 0;
241 index c8f1eb1..8b3024e 100644
242235 --- a/crypto/pkcs7/pk7_doit.c
243236 +++ b/crypto/pkcs7/pk7_doit.c
244237 @@ -420,6 +420,8 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
363356 if (out == NULL)
364357 out=etmp;
365358 else
359 --- a/crypto/pkcs7/pk7_smime.c 2009/03/15 13:36:01 1.24.2.9
360 +++ b/crypto/pkcs7/pk7_smime.c 2012/02/27 15:23:20 1.24.2.10
361 @@ -486,15 +486,30 @@
362 return 0;
363 }
364 ret = SMIME_text(bread, data);
365 + if (ret > 0 && BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)
366 + {
367 + if (!BIO_get_cipher_status(tmpmem))
368 + ret = 0;
369 + }
370 BIO_free_all(bread);
371 return ret;
372 } else {
373 for(;;) {
374 i = BIO_read(tmpmem, buf, sizeof(buf));
375 - if(i <= 0) break;
376 + if(i <= 0)
377 + {
378 + ret = 1;
379 + if (BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)
380 + {
381 + if (!BIO_get_cipher_status(tmpmem))
382 + ret = 0;
383 + }
384 +
385 + break;
386 + }
387 BIO_write(data, buf, i);
388 }
389 BIO_free_all(tmpmem);
390 - return 1;
391 + return ret;
392 }
393 }
394