Loading CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ Changes between 1.0.1b and 1.0.1c [xx XXX xxxx] *) Initialise tkeylen properly when encrypting CMS messages. Thanks to Solar Designer of Openwall for reporting this issue. [Steve Henson] *) In FIPS mode don't try to use composite ciphers as they are not approved. [Steve Henson] Loading crypto/cms/cms_enc.c +2 −2 Original line number Diff line number Diff line Loading @@ -139,10 +139,10 @@ BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec) CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR); goto err; } tkeylen = EVP_CIPHER_CTX_key_length(ctx); /* Generate random session key */ if (!enc || !ec->key) { tkeylen = EVP_CIPHER_CTX_key_length(ctx); tkey = OPENSSL_malloc(tkeylen); if (!tkey) { Loading Loading @@ -174,7 +174,7 @@ BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec) /* Only reveal failure if debugging so we don't * leak information which may be useful in MMA. */ if (ec->debug) if (enc || ec->debug) { CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, CMS_R_INVALID_KEY_LENGTH); Loading ssl/d1_enc.c +7 −1 Original line number Diff line number Diff line Loading @@ -208,6 +208,12 @@ int dtls1_enc(SSL *s, int send) rec->input[k]=j; l+=i; rec->length+=i; if (rec->type == SSL3_RT_APPLICATION_DATA) { memset(rec->input, 63, 64); rec->length = 64; l = 64; } } #ifdef KSSL_DEBUG Loading Loading @@ -260,7 +266,7 @@ int dtls1_enc(SSL *s, int send) } /* TLS 1.0 does not bound the number of padding bytes by the block size. * All of them must have value 'padding_length'. */ if (i > (int)rec->length) if (i + bs > (int)rec->length) { /* Incorrect padding. SSLerr() and ssl3_alert are done * by caller: we don't want to reveal whether this is Loading ssl/t1_enc.c +8 −0 Original line number Diff line number Diff line Loading @@ -793,6 +793,12 @@ int tls1_enc(SSL *s, int send) rec->input[k]=j; l+=i; rec->length+=i; if (rec->type == SSL3_RT_APPLICATION_DATA) { memset(rec->input, 63, 64); rec->length = 64; l = 64; } } #ifdef KSSL_DEBUG Loading Loading @@ -889,6 +895,8 @@ int tls1_enc(SSL *s, int send) if (s->version >= TLS1_1_VERSION && EVP_CIPHER_CTX_mode(ds) == EVP_CIPH_CBC_MODE) { if (bs > (int)rec->length) return -1; rec->data += bs; /* skip the explicit IV */ rec->input += bs; rec->length -= bs; Loading Loading
CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ Changes between 1.0.1b and 1.0.1c [xx XXX xxxx] *) Initialise tkeylen properly when encrypting CMS messages. Thanks to Solar Designer of Openwall for reporting this issue. [Steve Henson] *) In FIPS mode don't try to use composite ciphers as they are not approved. [Steve Henson] Loading
crypto/cms/cms_enc.c +2 −2 Original line number Diff line number Diff line Loading @@ -139,10 +139,10 @@ BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec) CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR); goto err; } tkeylen = EVP_CIPHER_CTX_key_length(ctx); /* Generate random session key */ if (!enc || !ec->key) { tkeylen = EVP_CIPHER_CTX_key_length(ctx); tkey = OPENSSL_malloc(tkeylen); if (!tkey) { Loading Loading @@ -174,7 +174,7 @@ BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec) /* Only reveal failure if debugging so we don't * leak information which may be useful in MMA. */ if (ec->debug) if (enc || ec->debug) { CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, CMS_R_INVALID_KEY_LENGTH); Loading
ssl/d1_enc.c +7 −1 Original line number Diff line number Diff line Loading @@ -208,6 +208,12 @@ int dtls1_enc(SSL *s, int send) rec->input[k]=j; l+=i; rec->length+=i; if (rec->type == SSL3_RT_APPLICATION_DATA) { memset(rec->input, 63, 64); rec->length = 64; l = 64; } } #ifdef KSSL_DEBUG Loading Loading @@ -260,7 +266,7 @@ int dtls1_enc(SSL *s, int send) } /* TLS 1.0 does not bound the number of padding bytes by the block size. * All of them must have value 'padding_length'. */ if (i > (int)rec->length) if (i + bs > (int)rec->length) { /* Incorrect padding. SSLerr() and ssl3_alert are done * by caller: we don't want to reveal whether this is Loading
ssl/t1_enc.c +8 −0 Original line number Diff line number Diff line Loading @@ -793,6 +793,12 @@ int tls1_enc(SSL *s, int send) rec->input[k]=j; l+=i; rec->length+=i; if (rec->type == SSL3_RT_APPLICATION_DATA) { memset(rec->input, 63, 64); rec->length = 64; l = 64; } } #ifdef KSSL_DEBUG Loading Loading @@ -889,6 +895,8 @@ int tls1_enc(SSL *s, int send) if (s->version >= TLS1_1_VERSION && EVP_CIPHER_CTX_mode(ds) == EVP_CIPH_CBC_MODE) { if (bs > (int)rec->length) return -1; rec->data += bs; /* skip the explicit IV */ rec->input += bs; rec->length -= bs; Loading