* Major changes between OpenSSL 3.1.6 and OpenSSL 3.1.7 [3 Sep 2024] - Fixed possible denial of service in X.509 name checks (CVE-2024-6119) - Fixed possible buffer overread in SSL_select_next_proto() (CVE-2024-5535) * Major changes between OpenSSL 3.1.5 and OpenSSL 3.1.6 [4 Jun 2024] - Fixed potential use after free after SSL_free_buffers() is called (CVE-2024-4741) - Fixed an issue where checking excessively long DSA keys or parameters may be very slow (CVE-2024-4603) - Fixed unbounded memory growth with session handling in TLSv1.3 (CVE-2024-2511) * Major changes between OpenSSL 3.1.4 and OpenSSL 3.1.5 [30 Jan 2024] - Fixed PKCS12 Decoding crashes (CVE-2024-0727) - Fixed Excessive time spent checking invalid RSA public keys [CVE-2023-6237) - Fixed POLY1305 MAC implementation corrupting vector registers on PowerPC CPUs which support PowerISA 2.07 (CVE-2023-6129) - Fix excessive time spent in DH check / generation with large Q parameter value (CVE-2023-5678) * Update openssl.keyring with BA5473A2B0587B07FB27CF2D216094DFD0CB81EF * Rebase patches: - openssl-Force-FIPS.patch - openssl-FIPS-embed-hmac.patch - openssl-FIPS-services-minimize.patch - openssl-FIPS-RSA-disable-shake.patch - openssl-CVE-2023-50782.patch * Remove patches fixed in the update: - openssl-Improve-performance-for-6x-unrolling-with-vpermxor-i.patch - openssl-CVE-2024-6119.patch openssl-CVE-2024-5535.patch OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-3?expand=0&rev=119
70 lines
3.0 KiB
Diff
70 lines
3.0 KiB
Diff
From 915990e450e769e370fcacbfd8ed58ab6afaf2bf Mon Sep 17 00:00:00 2001
|
||
From: Dmitry Belyavskiy <dbelyavs@redhat.com>
|
||
Date: Mon, 21 Aug 2023 15:47:55 +0200
|
||
Subject: [PATCH 39/48]
|
||
0084-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
|
||
|
||
Patch-name: 0084-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
|
||
Patch-id: 84
|
||
---
|
||
providers/implementations/kdfs/pbkdf2.c | 27 ++++++++++++++++++++++++-
|
||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||
|
||
diff --git a/providers/implementations/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c
|
||
index 349c3dd657..11820d1e69 100644
|
||
--- a/providers/implementations/kdfs/pbkdf2.c
|
||
+++ b/providers/implementations/kdfs/pbkdf2.c
|
||
@@ -35,6 +35,21 @@
|
||
#define KDF_PBKDF2_MAX_KEY_LEN_DIGEST_RATIO 0xFFFFFFFF
|
||
#define KDF_PBKDF2_MIN_ITERATIONS 1000
|
||
#define KDF_PBKDF2_MIN_SALT_LEN (128 / 8)
|
||
+/* The Implementation Guidance for FIPS 140-3 says in section D.N
|
||
+ * "Password-Based Key Derivation for Storage Applications" that "the vendor
|
||
+ * shall document in the module’s Security Policy the length of
|
||
+ * a password/passphrase used in key derivation and establish an upper bound
|
||
+ * for the probability of having this parameter guessed at random. This
|
||
+ * probability shall take into account not only the length of the
|
||
+ * password/passphrase, but also the difficulty of guessing it. The decision on
|
||
+ * the minimum length of a password used for key derivation is the vendor’s,
|
||
+ * but the vendor shall at a minimum informally justify the decision."
|
||
+ *
|
||
+ * We are choosing a minimum password length of 8 bytes, because NIST's ACVP
|
||
+ * testing uses passwords as short as 8 bytes, and requiring longer passwords
|
||
+ * combined with an implicit indicator (i.e., returning an error) would cause
|
||
+ * the module to fail ACVP testing. */
|
||
+#define KDF_PBKDF2_MIN_PASSWORD_LEN (20)
|
||
|
||
static OSSL_FUNC_kdf_newctx_fn kdf_pbkdf2_new;
|
||
static OSSL_FUNC_kdf_dupctx_fn kdf_pbkdf2_dup;
|
||
@@ -219,9 +234,15 @@ static int kdf_pbkdf2_set_ctx_params(void *vctx, const OSSL_PARAM params[])
|
||
ctx->lower_bound_checks = pkcs5 == 0;
|
||
}
|
||
|
||
- if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_PASSWORD)) != NULL)
|
||
+ if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_PASSWORD)) != NULL) {
|
||
+ if (ctx->lower_bound_checks != 0
|
||
+ && p->data_size < KDF_PBKDF2_MIN_PASSWORD_LEN) {
|
||
+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
|
||
+ return 0;
|
||
+ }
|
||
if (!pbkdf2_set_membuf(&ctx->pass, &ctx->pass_len, p))
|
||
return 0;
|
||
+ }
|
||
|
||
if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_SALT)) != NULL) {
|
||
if (ctx->lower_bound_checks != 0
|
||
@@ -331,6 +352,10 @@ static int pbkdf2_derive(const char *pass, size_t passlen,
|
||
}
|
||
|
||
if (lower_bound_checks) {
|
||
+ if (passlen < KDF_PBKDF2_MIN_PASSWORD_LEN) {
|
||
+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
|
||
+ return 0;
|
||
+ }
|
||
if ((keylen * 8) < KDF_PBKDF2_MIN_KEY_LEN_BITS) {
|
||
ERR_raise(ERR_LIB_PROV, PROV_R_KEY_SIZE_TOO_SMALL);
|
||
return 0;
|
||
--
|
||
2.41.0
|
||
|