forked from pool/openssl-1_1
Pedro Monreal Gonzalez
8f01c56ec8
- Update to 1.1.1w: * Fix POLY1305 MAC implementation corrupting XMM registers on Windows. The POLY1305 MAC (message authentication code) implementation in OpenSSL does not save the contents of non-volatile XMM registers on Windows 64 platform when calculating the MAC of data larger than 64 bytes. Before returning to the caller all the XMM registers are set to zero rather than restoring their previous content. The vulnerable code is used only on newer x86_64 processors supporting the AVX512-IFMA instructions. The consequences of this kind of internal application state corruption can be various - from no consequences, if the calling application does not depend on the contents of non-volatile XMM registers at all, to the worst consequences, where the attacker could get complete control of the application process. However given the contents of the registers are just zeroized so the attacker cannot put arbitrary values inside, the most likely consequence, if any, would be an incorrect result of some application dependent calculations or a crash leading to a denial of service. (CVE-2023-4807) - Add missing FIPS patches from SLE: * Add patches: - bsc1185319-FIPS-KAT-for-ECDSA.patch - bsc1198207-FIPS-add-hash_hmac-drbg-kat.patch - openssl-1.1.1-fips-fix-memory-leaks.patch - openssl-1_1-FIPS-PBKDF2-KAT-requirements.patch - openssl-1_1-FIPS_drbg-rewire.patch - openssl-1_1-Zeroization.patch - openssl-1_1-fips-drbg-selftest.patch - openssl-1_1-fips-list-only-approved-digest-and-pubkey-algorithms.patch - openssl-1_1-jitterentropy-3.4.0.patch - openssl-1_1-ossl-sli-000-fix-build-error.patch OBS-URL: https://build.opensuse.org/request/show/1111331 OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-1_1?expand=0&rev=144
53 lines
2.4 KiB
Diff
53 lines
2.4 KiB
Diff
Index: openssl-1.1.1l/crypto/rsa/rsa_pmeth.c
|
|
===================================================================
|
|
--- openssl-1.1.1l.orig/crypto/rsa/rsa_pmeth.c
|
|
+++ openssl-1.1.1l/crypto/rsa/rsa_pmeth.c
|
|
@@ -140,13 +140,11 @@ static int pkey_rsa_sign(EVP_PKEY_CTX *c
|
|
unsigned int sltmp;
|
|
if (rctx->pad_mode != RSA_PKCS1_PADDING)
|
|
return -1;
|
|
- /* PKCS1-v1.5 padding is disallowed after 2023 */
|
|
- fips_sli_disapprove_EVP_PKEY_CTX(ctx);
|
|
ret = RSA_sign_ASN1_OCTET_STRING(0,
|
|
tbs, tbslen, sig, &sltmp, rsa);
|
|
-
|
|
if (ret <= 0)
|
|
return ret;
|
|
+ fips_sli_check_hash_siggen_EVP_PKEY_CTX(ctx, rctx->md);
|
|
ret = sltmp;
|
|
} else if (rctx->pad_mode == RSA_X931_PADDING) {
|
|
if ((size_t)EVP_PKEY_size(ctx->pkey) < tbslen + 1) {
|
|
@@ -179,13 +177,12 @@ static int pkey_rsa_sign(EVP_PKEY_CTX *c
|
|
ret = RSA_private_encrypt(tbslen + 1, rctx->tbuf,
|
|
sig, rsa, RSA_X931_PADDING);
|
|
} else if (rctx->pad_mode == RSA_PKCS1_PADDING) {
|
|
- /* PKCS1-v1.5 padding is disallowed after 2023 */
|
|
- fips_sli_disapprove_EVP_PKEY_CTX(ctx);
|
|
unsigned int sltmp;
|
|
ret = RSA_sign(EVP_MD_type(rctx->md),
|
|
tbs, tbslen, sig, &sltmp, rsa);
|
|
if (ret <= 0)
|
|
return ret;
|
|
+ fips_sli_check_hash_siggen_EVP_PKEY_CTX(ctx, rctx->md);
|
|
ret = sltmp;
|
|
} else if (rctx->pad_mode == RSA_PKCS1_PSS_PADDING) {
|
|
if (!setup_tbuf(rctx, ctx))
|
|
@@ -290,10 +287,13 @@ static int pkey_rsa_verify(EVP_PKEY_CTX
|
|
|
|
if (rctx->md) {
|
|
if (rctx->pad_mode == RSA_PKCS1_PADDING) {
|
|
- /* PKCS1-v1.5 padding is disallowed after 2023 */
|
|
- fips_sli_disapprove_EVP_PKEY_CTX(ctx);
|
|
- return RSA_verify(EVP_MD_type(rctx->md), tbs, tbslen,
|
|
- sig, siglen, rsa);
|
|
+ int ret;
|
|
+ ret = RSA_verify(EVP_MD_type(rctx->md), tbs, tbslen,
|
|
+ sig, siglen, rsa);
|
|
+ if (ret <= 0)
|
|
+ return 0;
|
|
+ fips_sli_check_hash_sigver_EVP_PKEY_CTX(ctx, rctx->md);
|
|
+ return ret;
|
|
}
|
|
if (tbslen != (size_t)EVP_MD_size(rctx->md)) {
|
|
RSAerr(RSA_F_PKEY_RSA_VERIFY, RSA_R_INVALID_DIGEST_LENGTH);
|