Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package openssl-1_0_0 for openSUSE:Factory 
checked in at 2023-11-16 20:28:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openssl-1_0_0 (Old)
 and      /work/SRC/openSUSE:Factory/.openssl-1_0_0.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openssl-1_0_0"

Thu Nov 16 20:28:38 2023 rev:41 rq:1126788 version:1.0.2u

Changes:
--------
--- /work/SRC/openSUSE:Factory/openssl-1_0_0/openssl-1_0_0.changes      
2023-08-08 17:26:03.443220012 +0200
+++ /work/SRC/openSUSE:Factory/.openssl-1_0_0.new.2521/openssl-1_0_0.changes    
2023-11-16 20:28:40.192608882 +0100
@@ -1,0 +2,15 @@
+Mon Nov 13 09:29:26 UTC 2023 - Otto Hollmann <otto.hollm...@suse.com>
+
+- Security fix: [bsc#1216922, CVE-2023-5678]
+  * Fix excessive time spent in DH check / generation with large Q
+    parameter value.
+  * Applications that use the functions DH_generate_key() to generate
+    an X9.42 DH key may experience long delays. Likewise,
+    applications that use DH_check_pub_key(), DH_check_pub_key_ex
+    () or EVP_PKEY_public_check() to check an X9.42 DH key or X9.42
+    DH parameters may experience long delays. Where the key or
+    parameters that are being checked have been obtained from an
+    untrusted source this may lead to a Denial of Service.
+  * Add openssl-CVE-2023-5678.patch
+
+-------------------------------------------------------------------

New:
----
  openssl-CVE-2023-5678.patch

BETA DEBUG BEGIN:
  New:    untrusted source this may lead to a Denial of Service.
  * Add openssl-CVE-2023-5678.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openssl-1_0_0.spec ++++++
--- /var/tmp/diff_new_pack.M6DW3g/_old  2023-11-16 20:28:42.564696341 +0100
+++ /var/tmp/diff_new_pack.M6DW3g/_new  2023-11-16 20:28:42.568696489 +0100
@@ -132,6 +132,9 @@
 Patch102:       openssl-CVE-2023-3446.patch
 # PATCH-FIX-UPSTREAM bsc#1213853 CVE-2023-3817 Excessive time spent checking 
DH q parameter value
 Patch103:       openssl-1_0-CVE-2023-3817.patch
+# PATCH-FIX-UPSTREAM: bsc#1216922 CVE-2023-5678 Generating excessively long 
X9.42 DH keys or
+# checking excessively long X9.42 DH keys or parameters may be very slow
+Patch104:       openssl-CVE-2023-5678.patch
 # steam patches
 Patch150:       openssl-fix-cpuid_setup.patch
 # compat patches to build with soversion 10 (bsc#1175429)
@@ -298,6 +301,7 @@
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
 
 # clean up patching leftovers
 find . -name '*.orig' -delete


++++++ openssl-CVE-2023-5678.patch ++++++
>From db925ae2e65d0d925adef429afc37f75bd1c2017 Mon Sep 17 00:00:00 2001
From: Richard Levitte <levi...@openssl.org>
Date: Fri, 20 Oct 2023 09:18:19 +0200
Subject: [PATCH] Make DH_check_pub_key() and DH_generate_key() safer yet

We already check for an excessively large P in DH_generate_key(), but not in
DH_check_pub_key(), and none of them check for an excessively large Q.

This change adds all the missing excessive size checks of P and Q.

It's to be noted that behaviours surrounding excessively sized P and Q
differ.  DH_check() raises an error on the excessively sized P, but only
sets a flag for the excessively sized Q.  This behaviour is mimicked in
DH_check_pub_key().

Reviewed-by: Tomas Mraz <to...@openssl.org>
Reviewed-by: Matt Caswell <m...@openssl.org>
Reviewed-by: Hugo Landau <hlan...@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22518)

(cherry picked from commit ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6)
---
 crypto/dh/dh_check.c    | 12 ++++++++++++
 crypto/dh/dh_err.c      |  3 ++-
 crypto/dh/dh_key.c      | 12 ++++++++++++
 crypto/err/openssl.txt  |  1 +
 include/crypto/dherr.h  |  2 +-
 include/openssl/dh.h    |  6 +++---
 include/openssl/dherr.h |  3 ++-
 7 files changed, 33 insertions(+), 6 deletions(-)

Index: openssl-1.0.2p/crypto/dh/dh_check.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_check.c
+++ openssl-1.0.2p/crypto/dh/dh_check.c
@@ -230,6 +230,18 @@ static int dh_check_pub_key_int(const DH
  */
 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
 {
+    /* Don't do any checks at all with an excessively large modulus */
+    if (BN_num_bits(dh->p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) {
+        DHerr(DH_F_DH_CHECK_PUB_KEY, DH_R_MODULUS_TOO_LARGE);
+        *ret = DH_MODULUS_TOO_LARGE | DH_CHECK_PUBKEY_INVALID;
+        return 0;
+    }
+
+    if (dh->q != NULL && BN_ucmp(dh->p, dh->q) < 0) {
+        *ret |= DH_CHECK_INVALID_Q_VALUE | DH_CHECK_PUBKEY_INVALID;
+        return 1;
+    }
+
     return dh_check_pub_key_int(dh, dh->q, pub_key, ret);
 }
 
Index: openssl-1.0.2p/crypto/dh/dh_key.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_key.c
+++ openssl-1.0.2p/crypto/dh/dh_key.c
@@ -95,6 +95,13 @@ int DH_compute_key(unsigned char *key, c
         return 0;
     }
 #endif
+
+    if (dh->q != NULL
+        && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) {
+        DHerr(DH_F_DH_COMPUTE_KEY, DH_R_Q_TOO_LARGE);
+        return 0;
+    }
+
     return dh->meth->compute_key(key, pub_key, dh);
 }
 
@@ -159,6 +166,12 @@ static int generate_key(DH *dh)
     }
 #endif
 
+    if (dh->q != NULL
+        && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) {
+        DHerr(DH_F_GENERATE_KEY, DH_R_Q_TOO_LARGE);
+        return 0;
+    }
+
     ctx = BN_CTX_new();
     if (ctx == NULL)
         goto err;
Index: openssl-1.0.2p/crypto/dh/dh.h
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh.h
+++ openssl-1.0.2p/crypto/dh/dh.h
@@ -175,8 +175,9 @@ struct dh_st {
 # define DH_UNABLE_TO_CHECK_GENERATOR    0x04
 # define DH_NOT_SUITABLE_GENERATOR       0x08
 # define DH_CHECK_Q_NOT_PRIME            0x10
-# define DH_CHECK_INVALID_Q_VALUE        0x20
+# define DH_CHECK_INVALID_Q_VALUE        0x20 /* +DH_check_pub_key */
 # define DH_CHECK_INVALID_J_VALUE        0x40
+# define DH_MODULUS_TOO_LARGE            0x100 /* +DH_check_pub_key */
 
 /* DH_check_pub_key error codes */
 # define DH_CHECK_PUBKEY_TOO_SMALL       0x01
@@ -400,6 +401,7 @@ void ERR_load_DH_strings(void);
 # define DH_F_DHPARAMS_PRINT_FP                           101
 # define DH_F_DH_BUILTIN_GENPARAMS                        106
 # define DH_F_DH_CHECK                                    126
+# define DH_F_DH_CHECK_PUB_KEY                            128
 # define DH_F_DH_CMS_DECRYPT                              117
 # define DH_F_DH_CMS_SET_PEERKEY                          118
 # define DH_F_DH_CMS_SET_SHARED_INFO                      119
@@ -434,6 +436,7 @@ void ERR_load_DH_strings(void);
 # define DH_R_NO_PRIVATE_VALUE                            100
 # define DH_R_PARAMETER_ENCODING_ERROR                    105
 # define DH_R_PEER_KEY_ERROR                              113
+# define DH_R_Q_TOO_LARGE                                 130
 # define DH_R_SHARED_INFO_ERROR                           114
 # define DH_R_INVALID_PARAMETER_NID                       120
 
Index: openssl-1.0.2p/crypto/dh/dh_err.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_err.c
+++ openssl-1.0.2p/crypto/dh/dh_err.c
@@ -74,6 +74,7 @@ static ERR_STRING_DATA DH_str_functs[] =
     {ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
     {ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
     {ERR_FUNC(DH_F_DH_CHECK), "DH_check"},
+    {ERR_FUNC(DH_F_DH_CHECK_PUB_KEY), "DH_check_pub_key"},
     {ERR_FUNC(DH_F_DH_CMS_DECRYPT), "DH_CMS_DECRYPT"},
     {ERR_FUNC(DH_F_DH_CMS_SET_PEERKEY), "DH_CMS_SET_PEERKEY"},
     {ERR_FUNC(DH_F_DH_CMS_SET_SHARED_INFO), "DH_CMS_SET_SHARED_INFO"},
@@ -111,6 +112,7 @@ static ERR_STRING_DATA DH_str_reasons[]
     {ERR_REASON(DH_R_NO_PRIVATE_VALUE), "no private value"},
     {ERR_REASON(DH_R_PARAMETER_ENCODING_ERROR), "parameter encoding error"},
     {ERR_REASON(DH_R_PEER_KEY_ERROR), "peer key error"},
+    {ERR_REASON(DH_R_Q_TOO_LARGE), "q too large"},
     {ERR_REASON(DH_R_SHARED_INFO_ERROR), "shared info error"},
     {0, NULL}
 };

Reply via email to