summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2025-07-11 17:03:11 +0530
committerSteve Sakoman <steve@sakoman.com>2025-07-18 08:32:26 -0700
commit78620e54fd6cf9006e73aa147721db72930c1dc7 (patch)
treefab2b0f03b215e89d38ed14c8b29c1ebcf7dd276
parentd3219fb24b8503e678f1d23b7dea64d5555a83b6 (diff)
downloadpoky-78620e54fd6cf9006e73aa147721db72930c1dc7.tar.gz
openssl: fix CVE-2024-41996
Validating the order of the public keys in the Diffie-Hellman Key Agreement Protocol, when an approved safe prime is used, allows remote attackers (from the client side) to trigger unnecessarily expensive server-side DHE modular-exponentiation calculations. The client may cause asymmetric resource consumption. The basic attack scenario is that the client must claim that it can only communicate with DHE, and the server must be configured to allow DHE and validate the order of the public key. Reference: https://github.com/openssl/openssl/pull/25088 (From OE-Core rev: 635fc639a13a6b28cac5c67cff23b7f4477bc41c) Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch48
-rw-r--r--meta/recipes-connectivity/openssl/openssl_3.0.17.bb1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch
new file mode 100644
index 0000000000..49ec9c0130
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch
@@ -0,0 +1,48 @@
1From e70e34d857d4003199bcb5d3b52ca8102ccc1b98 Mon Sep 17 00:00:00 2001
2From: Tomas Mraz <tomas@openssl.org>
3Date: Mon, 5 Aug 2024 17:54:14 +0200
4Subject: [PATCH] dh_kmgmt.c: Avoid expensive public key validation for known
5 safe-prime groups
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10The partial validation is fully sufficient to check the key validity.
11
12Thanks to Szilárd Pfeiffer for reporting the issue.
13
14Reviewed-by: Neil Horman <nhorman@openssl.org>
15Reviewed-by: Matt Caswell <matt@openssl.org>
16Reviewed-by: Paul Dale <ppzgs1@gmail.com>
17(Merged from https://github.com/openssl/openssl/pull/25088)
18
19CVE: CVE-2024-41996
20
21Upstream-Status: Backport [https://github.com/openssl/openssl/commit/e70e34d857d4003199bcb5d3b52ca8102ccc1b98]
22
23Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
24---
25 providers/implementations/keymgmt/dh_kmgmt.c | 8 +++++---
26 1 file changed, 5 insertions(+), 3 deletions(-)
27
28diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
29index 795a3f2..3e7a811 100644
30--- a/providers/implementations/keymgmt/dh_kmgmt.c
31+++ b/providers/implementations/keymgmt/dh_kmgmt.c
32@@ -387,9 +387,11 @@ static int dh_validate_public(const DH *dh, int checktype)
33 if (pub_key == NULL)
34 return 0;
35
36- /* The partial test is only valid for named group's with q = (p - 1) / 2 */
37- if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK
38- && ossl_dh_is_named_safe_prime_group(dh))
39+ /*
40+ * The partial test is only valid for named group's with q = (p - 1) / 2
41+ * but for that case it is also fully sufficient to check the key validity.
42+ */
43+ if (ossl_dh_is_named_safe_prime_group(dh))
44 return ossl_dh_check_pub_key_partial(dh, pub_key, &res);
45
46 return DH_check_pub_key_ex(dh, pub_key);
47--
482.40.0
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.17.bb b/meta/recipes-connectivity/openssl/openssl_3.0.17.bb
index 5bc8801b98..ee0ab2e498 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.17.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.17.bb
@@ -12,6 +12,7 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op
12 file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ 12 file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
13 file://afalg.patch \ 13 file://afalg.patch \
14 file://0001-Configure-do-not-tweak-mips-cflags.patch \ 14 file://0001-Configure-do-not-tweak-mips-cflags.patch \
15 file://CVE-2024-41996.patch \
15 " 16 "
16 17
17SRC_URI:append:class-nativesdk = " \ 18SRC_URI:append:class-nativesdk = " \