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
112 lines
4.7 KiB
Diff
112 lines
4.7 KiB
Diff
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
|
|
index 43c916fc1..fab410b9e 100644
|
|
--- a/crypto/ec/ec_key.c
|
|
+++ b/crypto/ec/ec_key.c
|
|
@@ -472,16 +472,16 @@ int ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx)
|
|
*/
|
|
if (eckey->priv_key != NULL) {
|
|
if (BN_cmp(eckey->priv_key, order) >= 0) {
|
|
- ECerr(EC_F_EC_KEY_SIMPLE_CHECK_KEY, EC_R_WRONG_ORDER);
|
|
+ ECerr(EC_F_EC_KEY_PUBLIC_CHECK, EC_R_WRONG_ORDER);
|
|
goto err;
|
|
}
|
|
if (!EC_POINT_mul(eckey->group, point, eckey->priv_key,
|
|
NULL, NULL, ctx)) {
|
|
- ECerr(EC_F_EC_KEY_SIMPLE_CHECK_KEY, ERR_R_EC_LIB);
|
|
+ ECerr(EC_F_EC_KEY_PUBLIC_CHECK, ERR_R_EC_LIB);
|
|
goto err;
|
|
}
|
|
if (EC_POINT_cmp(eckey->group, point, eckey->pub_key, ctx) != 0) {
|
|
- ECerr(EC_F_EC_KEY_SIMPLE_CHECK_KEY, EC_R_INVALID_PRIVATE_KEY);
|
|
+ ECerr(EC_F_EC_KEY_PUBLIC_CHECK, EC_R_INVALID_PRIVATE_KEY);
|
|
goto err;
|
|
}
|
|
}
|
|
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c
|
|
index 8794a6781..f38137388 100644
|
|
--- a/crypto/ec/ecdh_ossl.c
|
|
+++ b/crypto/ec/ecdh_ossl.c
|
|
@@ -28,7 +28,7 @@ int ossl_ecdh_compute_key(unsigned char **psec, size_t *pseclen,
|
|
{
|
|
#ifdef OPENSSL_FIPS
|
|
if (FIPS_selftest_failed()) {
|
|
- FIPSerr(FIPS_F_ECDH_COMPUTE_KEY, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_OSSL_ECDH_COMPUTE_KEY, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
return -1;
|
|
}
|
|
#endif
|
|
diff --git a/crypto/ec/ecdsa_ossl.c b/crypto/ec/ecdsa_ossl.c
|
|
index 3445abd02..9e9526241 100644
|
|
--- a/crypto/ec/ecdsa_ossl.c
|
|
+++ b/crypto/ec/ecdsa_ossl.c
|
|
@@ -204,7 +204,7 @@ ECDSA_SIG *ecdsa_simple_sign_sig(const unsigned char *dgst, int dgst_len,
|
|
|
|
#ifdef OPENSSL_FIPS
|
|
if (FIPS_selftest_failed()) {
|
|
- FIPSerr(FIPS_F_OSSL_ECDSA_SIGN_SIG, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_ECDSA_SIMPLE_SIGN_SIG, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
return NULL;
|
|
}
|
|
#endif
|
|
@@ -373,7 +373,7 @@ int ecdsa_simple_verify_sig(const unsigned char *dgst, int dgst_len,
|
|
|
|
#ifdef OPENSSL_FIPS
|
|
if (FIPS_selftest_failed()) {
|
|
- FIPSerr(FIPS_F_OSSL_ECDSA_VERIFY_SIG, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_ECDSA_SIMPLE_VERIFY_SIG, FIPS_R_FIPS_SELFTEST_FAILED);
|
|
return -1;
|
|
}
|
|
#endif
|
|
diff --git a/crypto/fips/fips_sha_selftest.c b/crypto/fips/fips_sha_selftest.c
|
|
index 035c2c092..4a6336248 100644
|
|
--- a/crypto/fips/fips_sha_selftest.c
|
|
+++ b/crypto/fips/fips_sha_selftest.c
|
|
@@ -195,25 +195,25 @@ int FIPS_selftest_sha3(void)
|
|
|
|
EVP_Digest(msg_sha3_256, sizeof(msg_sha3_256), md, NULL, EVP_sha3_256(), NULL);
|
|
if (memcmp(dig_sha3_256, md, sizeof(dig_sha3_256))) {
|
|
- FIPSerr(FIPS_F_FIPS_SELFTEST, FIPS_R_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_FIPS_SELFTEST_SHA3, FIPS_R_SELFTEST_FAILED);
|
|
return 0;
|
|
}
|
|
|
|
EVP_Digest(msg_sha3_512, sizeof(msg_sha3_512), md, NULL, EVP_sha3_512(), NULL);
|
|
if (memcmp(dig_sha3_512, md, sizeof(dig_sha3_512))) {
|
|
- FIPSerr(FIPS_F_FIPS_SELFTEST, FIPS_R_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_FIPS_SELFTEST_SHA3, FIPS_R_SELFTEST_FAILED);
|
|
return 0;
|
|
}
|
|
|
|
EVP_Digest(msg_shake_128, sizeof(msg_shake_128), md, NULL, EVP_shake128(), NULL);
|
|
if (memcmp(dig_shake_128, md, sizeof(dig_shake_128))) {
|
|
- FIPSerr(FIPS_F_FIPS_SELFTEST, FIPS_R_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_FIPS_SELFTEST_SHA3, FIPS_R_SELFTEST_FAILED);
|
|
return 0;
|
|
}
|
|
|
|
EVP_Digest(msg_shake_256, sizeof(msg_shake_256), md, NULL, EVP_shake256(), NULL);
|
|
if (memcmp(dig_shake_256, md, sizeof(dig_shake_256))) {
|
|
- FIPSerr(FIPS_F_FIPS_SELFTEST, FIPS_R_SELFTEST_FAILED);
|
|
+ FIPSerr(FIPS_F_FIPS_SELFTEST_SHA3, FIPS_R_SELFTEST_FAILED);
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/include/openssl/fips.h b/include/openssl/fips.h
|
|
index e4208cbfa..7af006e7b 100644
|
|
--- a/include/openssl/fips.h
|
|
+++ b/include/openssl/fips.h
|
|
@@ -130,8 +130,13 @@ extern "C" {
|
|
# define FIPS_F_FIPS_SELFTEST_HKDF 155
|
|
# define FIPS_F_FIPS_SELFTEST_SHA1 115
|
|
# define FIPS_F_FIPS_SELFTEST_SHA2 105
|
|
+# define FIPS_F_FIPS_SELFTEST_SHA3 156
|
|
+# define FIPS_F_ECDSA_SIMPLE_VERIFY_SIG 157
|
|
+# define FIPS_F_ECDSA_SIMPLE_SIGN_SIG 158
|
|
# define FIPS_F_OSSL_ECDSA_SIGN_SIG 143
|
|
# define FIPS_F_OSSL_ECDSA_VERIFY_SIG 148
|
|
+# define FIPS_F_OSSL_ECDSA_SIMPLE_VERIFY_SIG 159
|
|
+# define FIPS_F_OSSL_ECDH_COMPUTE_KEY 160
|
|
# define FIPS_F_RSA_BUILTIN_KEYGEN 116
|
|
# define FIPS_F_RSA_OSSL_INIT 149
|
|
# define FIPS_F_RSA_OSSL_PRIVATE_DECRYPT 117
|