CVE Vulnerabilities

CVE-2022-0778

Loop with Unreachable Exit Condition ('Infinite Loop')

Published: Mar 15, 2022 | Modified: Nov 21, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
7.5 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
HIGH
root.io logo minimus.io logo echo.ai logo

The BN_mod_sqrt() function, which computes a modular square root, contains a bug that can cause it to loop forever for non-prime moduli. Internally this function is used when parsing certificates that contain elliptic curve public keys in compressed form or explicit elliptic curve parameters with a base point encoded in compressed form. It is possible to trigger the infinite loop by crafting a certificate that has invalid explicit curve parameters. Since certificate parsing happens prior to verification of the certificate signature, any process that parses an externally supplied certificate may thus be subject to a denial of service attack. The infinite loop can also be reached when parsing crafted private keys as they can contain explicit elliptic curve parameters. Thus vulnerable situations include: - TLS clients consuming server certificates - TLS servers consuming client certificates - Hosting providers taking certificates or private keys from customers - Certificate authorities parsing certification requests from subscribers - Anything else which parses ASN.1 elliptic curve parameters Also any other applications that use the BN_mod_sqrt() where the attacker can control the parameter values are vulnerable to this DoS issue. In the OpenSSL 1.0.2 version the public key is not parsed during initial parsing of the certificate which makes it slightly harder to trigger the infinite loop. However any operation which requires the public key from the certificate will trigger the infinite loop. In particular the attacker can use a self-signed certificate to trigger the loop during verification of the certificate signature. This issue affects OpenSSL versions 1.0.2, 1.1.1 and 3.0. It was addressed in the releases of 1.1.1n and 3.0.2 on the 15th March 2022. Fixed in OpenSSL 3.0.2 (Affected 3.0.0,3.0.1). Fixed in OpenSSL 1.1.1n (Affected 1.1.1-1.1.1m). Fixed in OpenSSL 1.0.2zd (Affected 1.0.2-1.0.2zc).

Weakness

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

Affected Software

NameVendorStart VersionEnd Version
OpensslOpenssl1.0.2 (including)1.0.2zd (excluding)
OpensslOpenssl1.1.0 (including)1.1.1n (excluding)
OpensslOpenssl3.0.0 (including)3.0.2 (excluding)
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-apr-util-0:1.6.1-91.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-curl-0:7.78.0-3.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-httpd-0:2.4.37-80.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-mod_cluster-native-0:1.3.16-10.Final_redhat_2.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-mod_http2-0:1.15.7-22.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-mod_jk-0:1.2.48-29.redhat_1.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-mod_md-1:2.0.8-41.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-mod_security-0:2.9.2-68.GA.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-nghttp2-0:1.39.2-41.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-openssl-1:1.1.1g-11.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-openssl-chil-0:1.0.0-11.el8jbcs*
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-openssl-pkcs11-0:0.4.10-26.el8jbcs*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-apr-util-0:1.6.1-91.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-curl-0:7.78.0-3.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-httpd-0:2.4.37-80.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-mod_cluster-native-0:1.3.16-10.Final_redhat_2.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-mod_http2-0:1.15.7-22.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-mod_jk-0:1.2.48-29.redhat_1.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-mod_md-1:2.0.8-41.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-mod_security-0:2.9.2-68.GA.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-nghttp2-0:1.39.2-41.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-openssl-1:1.1.1g-11.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-openssl-chil-0:1.0.0-11.jbcs.el7*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-openssl-pkcs11-0:0.4.10-26.jbcs.el7*
Red Hat Enterprise Linux 6 Extended Lifecycle SupportRedHatopenssl-0:1.0.1e-60.el6_10*
Red Hat Enterprise Linux 7RedHatopenssl-1:1.0.2k-25.el7_9*
Red Hat Enterprise Linux 7.3 Advanced Update SupportRedHatopenssl-1:1.0.1e-62.el7_3*
Red Hat Enterprise Linux 7.4 Advanced Update SupportRedHatopenssl-1:1.0.2k-10.el7_4*
Red Hat Enterprise Linux 7.6 Advanced Update Support(Disable again in 2026 - SPRHEL-7118)RedHatopenssl-1:1.0.2k-18.el7_6*
Red Hat Enterprise Linux 7.6 Telco Extended Update SupportRedHatopenssl-1:1.0.2k-18.el7_6*
Red Hat Enterprise Linux 7.6 Update Services for SAP SolutionsRedHatopenssl-1:1.0.2k-18.el7_6*
Red Hat Enterprise Linux 7.7 Advanced Update SupportRedHatopenssl-1:1.0.2k-21.el7_7*
Red Hat Enterprise Linux 7.7 Telco Extended Update SupportRedHatopenssl-1:1.0.2k-21.el7_7*
Red Hat Enterprise Linux 7.7 Update Services for SAP SolutionsRedHatopenssl-1:1.0.2k-21.el7_7*
Red Hat Enterprise Linux 8RedHatcompat-openssl10-1:1.0.2o-4.el8_6*
Red Hat Enterprise Linux 8RedHatopenssl-1:1.1.1k-6.el8_5*
Red Hat Enterprise Linux 8.1 Update Services for SAP SolutionsRedHatopenssl-1:1.1.1c-5.el8_1.1*
Red Hat Enterprise Linux 8.2 Extended Update SupportRedHatopenssl-1:1.1.1c-19.el8_2*
Red Hat Enterprise Linux 8.4 Extended Update SupportRedHatopenssl-1:1.1.1g-16.el8_4*
Red Hat Enterprise Linux 9RedHatcompat-openssl11-1:1.1.1k-4.el9_0*
Red Hat JBoss Web Server 5RedHatopenssl*
Red Hat JBoss Web Server 5.6 on RHEL 7RedHatjws5-tomcat-0:9.0.50-5.redhat_00007.1.el7jws*
Red Hat JBoss Web Server 5.6 on RHEL 7RedHatjws5-tomcat-native-0:1.2.30-4.redhat_4.el7jws*
Red Hat JBoss Web Server 5.6 on RHEL 8RedHatjws5-tomcat-0:9.0.50-5.redhat_00007.1.el8jws*
Red Hat JBoss Web Server 5.6 on RHEL 8RedHatjws5-tomcat-native-0:1.2.30-4.redhat_4.el8jws*
Red Hat Virtualization 4 for Red Hat Enterprise Linux 7RedHatredhat-virtualization-host-0:4.3.22-20220330.1.el7_9*
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8RedHatredhat-virtualization-host-0:4.5.0-202205291010_8.6*
Text-Only JBCSRedHatopenssl*
Edk2Ubuntubionic*
Edk2Ubuntufocal*
Edk2Ubuntuimpish*
Edk2Ubuntujammy*
Edk2Ubuntutrusty*
Edk2Ubuntuxenial*
NodejsUbuntuesm-apps/jammy*
NodejsUbuntujammy*
NodejsUbuntutrusty*
OpensslUbuntubionic*
OpensslUbuntudevel*
OpensslUbuntuesm-infra-legacy/trusty*
OpensslUbuntuesm-infra/bionic*
OpensslUbuntuesm-infra/focal*
OpensslUbuntuesm-infra/xenial*
OpensslUbuntufips-preview/jammy*
OpensslUbuntufips-updates/bionic*
OpensslUbuntufips-updates/focal*
OpensslUbuntufips-updates/jammy*
OpensslUbuntufips-updates/xenial*
OpensslUbuntufips/bionic*
OpensslUbuntufips/focal*
OpensslUbuntufips/xenial*
OpensslUbuntufocal*
OpensslUbuntuimpish*
OpensslUbuntujammy*
OpensslUbuntukinetic*
OpensslUbuntulunar*
OpensslUbuntumantic*
OpensslUbuntunoble*
OpensslUbuntuoracular*
OpensslUbuntuplucky*
OpensslUbuntuquesting*
OpensslUbuntutrusty/esm*
OpensslUbuntuupstream*
Openssl1.0Ubuntubionic*
Openssl1.0Ubuntuesm-infra/bionic*

References