Vulnerability in OpenSSL library

Summary

A security advisory was released affecting the version of OpenSSL library used in some Fortinet products:

CVE-2022-0778:

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).

Affected Products

FortiOS version 6.0.0 through 6.0.14 FortiOS version 6.2.0 through 6.2.10 FortiOS version 6.4.0 through 6.4.8 FortiOS version 7.0.0 through 7.0.5 FortiManager version 6.2.0 through 6.2.9 FortiManager version 6.4.0 through 6.4.7 FortiManager version 7.0.0 through 7.0.3 FortiAnalyzer version 6.2.0 through 6.2.9 FortiAnalyzer version 6.4.0 through 6.4.7 FortiAnalyzer version 7.0.0 through 7.0.3

FortiDeceptor version 3.x all versions FortiDeceptor version 4.0 all versions FortiDeceptor version 4.1.0 FortiAuthenticator version 6.0 all versions FortiAuthenticator version 6.1 all versions FortiAuthenticator version 6.2 all versions FortiAuthenticator version 6.3 all versions FortiAuthenticator version 6.4.0 through 6.4.1

FortiMail version 6.0 all versions FortiMail version 6.2.0 through 6.2.8 FortiMail version 6.4.0 through 6.4.6 FortiMail version 7.0.0 through 7.0.3 FortiRecorder version 6.0.0 through 6.0.10 FortiRecorder version 6.4.0 through 6.4.2 FortiProxy version 7.0.0 through 7.0.3 FortiSwitch version 6.0 all versions FortiSwitch version 6.2 all versions FortiSwitch version 6.4.0 through 6.4.10 FortiSwitch version 7.0.0 through 7.0.4 FortiWeb version 6.3.0 through 6.3.18 FortiWeb version 6.4.0 through 6.4.2 FortiWeb version 7.0.0 FortiADCManager version 5.x all versions FortiADCManager version 6.x all versions

FortiSIEM version 5.0 all versions FortiSIEM version 6.1 all versions FortiSIEM version 6.2 all versions FortiSIEM version 6.3 all versions FortiSIEM version 6.4.0

FortiVoiceEnterprise version 6.0.0 through 6.0.11 FortiVoiceEnterprise version 6.4.0 through 6.4.4 FortiNDR version 1.x all versions

FortiClientWindows version 6.2 all versions FortiClientWindows version 6.4.0 through 6.4.8 FortiClientWindows version 7.0.0 through 7.0.3

FortiClientEMS version 6.2 all versions FortiClientEMS version 6.4.0 through 6.4.7 FortiClientEMS version 7.0.0 through 7.0.3

FortiADC version 6.0 all versions FortiADC version 6.1 all versions FortiADC version 6.2.0 through 6.2.3 FortiADC version 7.0.0 through 7.0.1

FortiTester 7.1.0 and below

FortiAIOps 1.0.x

FortiAP version 7.2.0 FortiAP version 7.0 all versions FortiAP version 6.4 all versions FortiAP version 6.0 all versions

FortiAP-W2 version 7.2.0 FortiAP-W2 version 7.0 all versions FortiAP-W2 version 6.4 all versions

FortiClientMac version 7.0.0 through 7.0.5 FortiClientMac version 6.4.0 through 6.4.8 FortiClientMac version 6.2 all versions

FortiClientLinux version 7.0.0 through 7.0.5 FortiClientLinux version 6.4 all versions FortiClientLinux version 6.2 all versions

FortiClientiOS version 6.0 all versions FortiClientiOS version 5.0 all versions

FortiDDoS-F version 6.3.0 through 6.3.3 FortiDDoS-F version 6.2.0 through 6.2.2 FortiDDoS-F version 6.1.0 through 6.1.4

FortiClientAndroid version 6.0 all versions FortiClientAndroid version 5.0 all versions

FortiIsolator version 2.4.0 FortiIsolator version 2.3.0 through 2.3.4 FortiIsolator version 2.2 all versions FortiIsolator version 2.1 all versions FortiIsolator version 2.0 all versions

FortiWAN version 4.5.0 through 4.5.9 FortiWAN version 4.4 all versions FortiWAN version 4.3 all versions

FortiDDoS 5.6 all versions FortiDDoS 5.5 all versions FortiDDoS 5.4 all versions FortiDDoS 5.3 all versions FortiDDoS 5.2 all versions FortiDDoS 5.1 all versions FortiDDoS 5.0 all versions FortiDDoS 4.7 all versions FortiDDoS 4.6 all versions FortiDDoS 4.5 all versions FortiDDoS 4.4 all versions The Following Products are not impacted: FortiSandbox The following products are under investigation: FortiAP-S FortiAP-U FortiConnect FortiEdge FortiPentest FortiWLM FortiWLC

Solutions

Please upgrade to FortiOS version 6.0.15 or above. Please upgrade to FortiOS version 6.2.11 or above. Please upgrade to FortiOS version 6.4.9 or above. Please upgrade to FortiOS version 7.0.6 or above. Please upgrade to FortiOS version 7.2.0 or above. Please upgrade to FortiManager version 6.4.8 or above. Please upgrade to FortiManager version 7.0.4 or above. Please upgrade to FortiManager version 7.2.0 or above. Please upgrade to FortiAnalyzer version 6.4.8 or above Please upgrade to FortiAnalyzer version 7.0.4 or above Please upgrade to FortiAnalyzer version 7.2.0 or above Please upgrade to FortiAuthenticator version 6.4.2 or above Please upgrade to FortiAuthenticator version 6.5.0 or above Please upgrade to FortiDeceptor version 4.2.0 or above Please upgrade to FortiMail version 7.2.0 or above Please upgrade to FortiMail version 7.0.4 or above Please upgrade to FortiMail version 6.4.7 or above Please upgrade to FortiMail version 6.2.9 or above Please upgrade to FortiRecorder version 7.0.0 or above Please upgrade to FortiRecorder version 6.4.3 or above Please upgrade to FortiRecorder version 6.0.11 or above Please upgrade to FortiProxy version 7.0.4 or above Please upgrade to FortiWeb version 7.0.1 or above Please upgrade to FortiWeb version 6.4.3 or above Please upgrade to FortiWeb version 6.3.19 or above Please upgrade to FortiSwitch version 7.2.0 or above Please upgrade to FortiSwitch version 7.0.5 or above Please upgrade to FortiSwitch version 6.4.11 or above

Please upgrade to FortiADCManager version 7.0.0 or above

Please upgrade to FortiSIEM 6.5.0 or above

Please upgrade to FortiNDR 7.0.0 or above

Please upgrade to FortiVoiceEnterprise 6.4.5 or above Please upgrade to FortiVoiceEnterprise 6.0.12 or above

Please upgrade to FortiClientWindows 7.0.4 or above Please upgrade to FortiClientWindows 6.4.9 or above

Please upgrade to FortiClientEMS 7.0.4 or above Please upgrade to FortiClientEMS 6.4.8 or above

Please upgrade to FortiADC 7.1.0 or above Please upgrade to FortiADC 7.0.2 or above Please upgrade to FortiADC 6.2.4 or above

Please upgrade to FortiTester 7.2.0 or above

Please upgrade to FortiAIOps 1.1.0 or above

Please upgrade to FortiPortal 7.0.0 or above

Please upgrade to FortiAP version 7.2.1 or above Please upgrade to FortiAP-W2 version 7.2.1 or above

Please upgrade to FortiClientMac version 7.0.6 or above Please upgrade to FortiClientMac version 6.4.9 or above

Please upgrade to FortiClientLinux version 7.0.6 or above

Please upgrade to FortiClientiOS version 7.0.3 or above

Please upgrade to FortiClientAndroid version 7.0.3 or above

Please upgrade to FortiIsolator 2.4.1 or above Please upgrade to FortiIsolator 2.3.5 or above

Please upgrade to FortiWAN version 4.5.10 or above Please upgrade to FortiDDoS-F version 6.4.0 or above Please upgrade to FortiDDoS version 5.7.0 or above Protection with IPS signature: Upgrade to IPS definitions version 20.292 or above, and make sure the action for signature 51345 is set to block.