CVE-2023-5678 Excessive time spent in DH check / generation with large Q parameter value

Medium 5.3 Published Updated

Attackers can cause denial of service by supplying large Q parameters to vulnerable OpenSSL DH key generation or checking functions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-5678?

CVE-2023-5678 is a medium-severity denial of service vulnerability in Openssl Openssl, published on 6 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Issue summary: Generating excessively long X9.42 DH keys or checking excessively long X9.42 DH keys or parameters may be very slow.

Impact summary: 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.

While DH_check() performs all the necessary checks (as of CVE-2023-3817), DH_check_pub_key() doesn't make any of these checks, and is therefore vulnerable for excessively large P and Q parameters.

Likewise, while DH_generate_key() performs a check for an excessively large P, it doesn't check for an excessively large Q.

An application that calls DH_generate_key() or DH_check_pub_key() and supplies a key or parameters obtained from an untrusted source could be vulnerable to a Denial of Service attack.

DH_generate_key() and DH_check_pub_key() are also called by a number of other OpenSSL functions. An application calling any of those other functions may similarly be affected. The other functions affected by this are DH_check_pub_key_ex(), EVP_PKEY_public_check(), and EVP_PKEY_generate().

Also vulnerable are the OpenSSL pkey command line application when using the "-pubcheck" option, as well as the OpenSSL genpkey command line application.

The OpenSSL SSL/TLS implementation is not affected by this issue.

The OpenSSL 3.0 and 3.1 FIPS providers are not affected by this issue.

Weakness: CWE-754, CWE-606

Which versions are affected by CVE-2023-5678?

It affects 1 product.

Linux distribution packages (40)
openssl-1_0_0 SUSE:Enterprise Storage 7.1All versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Enterprise Storage 7.1All versions1.1.1d-150200.11.82.1
openssl-1_1 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.1.0i-150100.14.68.1
openssl-1_1 SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.1.1d-150200.11.82.1
openssl-1_0_0 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions1.1.1d-150200.11.82.1
openssl-1_0_0 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions1.1.1d-150200.11.82.1
openssl-1_1-livepatches SUSE:Linux Enterprise Live Patching 15 SP4All versions0.2-150400.3.6.1
openssl-1_1-livepatches SUSE:Linux Enterprise Live Patching 15 SP5All versions0.2-150500.6.3.1
openssl-1_1 SUSE:Linux Enterprise Micro 5.1All versions1.1.1d-150200.11.82.1
openssl-1_1 SUSE:Linux Enterprise Micro 5.2All versions1.1.1d-150200.11.82.1
openssl-1_1 SUSE:Linux Enterprise Micro 5.3All versions1.1.1l-150400.7.60.2
openssl-3 SUSE:Linux Enterprise Micro 5.3All versions3.0.8-150400.4.42.1
openssl-1_1 SUSE:Linux Enterprise Micro 5.4All versions1.1.1l-150400.7.60.2
openssl-3 SUSE:Linux Enterprise Micro 5.4All versions3.0.8-150400.4.42.1
openssl-1_1 SUSE:Linux Enterprise Micro 5.5All versions1.1.1l-150500.17.22.1
openssl-1_1 SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.1.1l-150400.7.60.2
openssl-3 SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions3.0.8-150400.4.42.1
openssl-1_1 SUSE:Linux Enterprise Module for Basesystem 15 SP5All versions1.1.1l-150500.17.22.1
openssl-3 SUSE:Linux Enterprise Module for Basesystem 15 SP5All versions3.0.8-150500.5.19.1
compat-openssl098 SUSE:Linux Enterprise Module for Legacy 12All versions0.9.8j-106.61.1
openssl-1_0_0 SUSE:Linux Enterprise Module for Legacy 15 SP4All versions1.0.2p-150000.3.88.1
openssl-1_0_0 SUSE:Linux Enterprise Module for Legacy 15 SP5All versions1.0.2p-150000.3.88.1
openssl SUSE:Linux Enterprise Server 11 SP4 LTSS EXTREME COREAll versions0.9.8j-0.106.80.1
openssl1 SUSE:Linux Enterprise Server 11 SP4 LTSS EXTREME COREAll versions1.0.1g-0.58.76.1
openssl-1_0_0 SUSE:Linux Enterprise Server 12 SP5All versions1.0.2p-3.87.1
openssl-1_1 SUSE:Linux Enterprise Server 12 SP5All versions1.1.1d-2.101.1
openssl-1_0_0 SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.1.0i-150100.14.68.1
openssl-1_0_0 SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.1.1d-150200.11.82.1
openssl-1_0_0 SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions1.1.1d-150200.11.82.1
compat-openssl098 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions0.9.8j-106.61.1
openssl-1_0_0 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.0.2p-3.87.1
openssl-1_1 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.1.1d-2.101.1
openssl-1_0_0 SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.0.2p-150000.3.88.1
openssl-1_1 SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.1.0i-150100.14.68.1
openssl-1_0_0 SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions1.0.2p-150000.3.88.1

Products include Openssl Openssl.

How do I fix CVE-2023-5678?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-5678 being exploited?

There is no known exploitation of CVE-2023-5678 in the wild and no public exploit code.

All Openssl Openssl vulnerabilities

Sources

Also known as ALPINE-CVE-2023-5678, AZL-31872, AZL-31880, AZL-34666, AZL-35084, AZL-37740 and 32 more.

Is CVE-2023-5678 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free