openssl/crypto/cms
Bernd Edlinger 5840ed0cd1 Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the message cannot be
decoded, but if the RSA decryption fails, the correct encryption key is
used and the recipient will not notice the attack.

As a work around for this potential attack the length of the decrypted
key must be equal to the cipher default key length, in case the
certifiate is not given and all recipientInfo are tried out.

The old behaviour can be re-enabled in the CMS code by setting the
CMS_DEBUG_DECRYPT flag.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9777)
2019-09-10 11:31:25 +01:00
..
build.info unified build scheme: add build.info files 2016-02-01 12:46:58 +01:00
cms_asn1.c Following the license change, modify the boilerplates in crypto/cms/ 2018-12-06 14:40:53 +01:00
cms_att.c Add the content type attribute to additional CMS signerinfo. 2019-06-03 15:19:48 +10:00
cms_cd.c Change arg to cms_CompressedData_init_bio to be const 2019-03-08 16:06:26 +00:00
cms_dd.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_enc.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_env.c Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey 2019-09-10 11:31:25 +01:00
cms_err.c Regenerate mkerr files 2019-07-16 05:26:28 +02:00
cms_ess.c CAdES : lowercase name for now internal methods. 2019-07-31 19:14:12 +10:00
cms_io.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_kari.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_lcl.h Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey 2019-09-10 11:31:25 +01:00
cms_lib.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_pwri.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
cms_sd.c Add the ability to perform signatures in a provider 2019-09-09 13:52:26 +01:00
cms_smime.c Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey 2019-09-10 11:31:25 +01:00