// For flags

CVE-2023-5363

Incorrect cipher key & IV length processing

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Issue summary: A bug has been identified in the processing of key and
initialisation vector (IV) lengths. This can lead to potential truncation
or overruns during the initialisation of some symmetric ciphers.

Impact summary: A truncation in the IV can result in non-uniqueness,
which could result in loss of confidentiality for some cipher modes.

When calling EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2() or
EVP_CipherInit_ex2() the provided OSSL_PARAM array is processed after
the key and IV have been established. Any alterations to the key length,
via the "keylen" parameter or the IV length, via the "ivlen" parameter,
within the OSSL_PARAM array will not take effect as intended, potentially
causing truncation or overreading of these values. The following ciphers
and cipher modes are impacted: RC2, RC4, RC5, CCM, GCM and OCB.

For the CCM, GCM and OCB cipher modes, truncation of the IV can result in
loss of confidentiality. For example, when following NIST's SP 800-38D
section 8.2.1 guidance for constructing a deterministic IV for AES in
GCM mode, truncation of the counter portion could lead to IV reuse.

Both truncations and overruns of the key and overruns of the IV will
produce incorrect results and could, in some cases, trigger a memory
exception. However, these issues are not currently assessed as security
critical.

Changing the key and/or IV lengths is not considered to be a common operation
and the vulnerable API was recently introduced. Furthermore it is likely that
application developers will have spotted this problem during testing since
decryption would fail unless both peers in the communication were similarly
vulnerable. For these reasons we expect the probability of an application being
vulnerable to this to be quite low. However if an application is vulnerable then
this issue is considered very serious. For these reasons we have assessed this
issue as Moderate severity overall.

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 because
the issue lies outside of the FIPS provider boundary.

OpenSSL 3.1 and 3.0 are vulnerable to this issue.

Resumen del problema: se ha identificado un error en el procesamiento de longitudes de clave y vector de inicialización (IV). Esto puede provocar posibles truncamientos o desbordamientos durante la inicialización de algunos cifrados simétricos. Resumen de impacto: un truncamiento en el IV puede dar como resultado una falta de unicidad, lo que podría resultar en la pérdida de confidencialidad para algunos modos de cifrado. Al llamar a EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2() or EVP_CipherInit_ex2(), la matriz OSSL_PARAM proporcionada se procesa después de que se hayan establecido la clave y el IV. Cualquier modificación en la longitud de la clave, a través del parámetro "keylen" o la longitud del IV, a través del parámetro "ivlen", dentro de la matriz OSSL_PARAM no tendrá efecto según lo previsto, lo que podría provocar el truncamiento o la sobrelectura de estos valores. Los siguientes cifrados y modos de cifrado se ven afectados: RC2, RC4, RC5, CCM, GCM y OCB. Para los modos de cifrado CCM, GCM y OCB, el truncamiento del IV puede provocar una pérdida de confidencialidad. Por ejemplo, al seguir la guía de la sección 8.2.1 SP 800-38D del NIST para construir un IV determinista para AES en modo GCM, el truncamiento de la parte del contador podría llevar a la reutilización del IV. Tanto los truncamientos como los desbordamientos de la clave y del IV producirán resultados incorrectos y, en algunos casos, podrían desencadenar una excepción de memoria. Sin embargo, actualmente estos problemas no se consideran críticos para la seguridad. Cambiar la clave y/o las longitudes de IV no se considera una operación común y la API vulnerable se introdujo recientemente. Además, es probable que los desarrolladores de aplicaciones hayan detectado este problema durante las pruebas, ya que el descifrado fallaría a menos que ambos interlocutores en la comunicación fueran igualmente vulnerables. Por estas razones, esperamos que la probabilidad de que una aplicación sea vulnerable a esto sea bastante baja. Sin embargo, si una aplicación es vulnerable, el problema se considera muy grave. Por estos motivos, hemos evaluado este problema como de gravedad moderada en general. La implementación de OpenSSL SSL/TLS no se ve afectada por este problema. Los proveedores FIPS OpenSSL 3.0 y 3.1 no se ven afectados por esto porque el problema se encuentra fuera de los límites del proveedor FIPS. OpenSSL 3.1 y 3.0 son vulnerables a este problema.

A flaw was found in OpenSSL in how it processes key and initialization vector (IV) lengths. This issue can lead to potential truncation or overruns during the initialization of some symmetric ciphers. A truncation in the IV can result in non-uniqueness, which could result in loss of confidentiality for some cipher modes. Both truncations and overruns of the key and the IV will produce incorrect results and could, in some cases, trigger a memory exception.

*Credits: Tony Battersby (Cybernetics), Dr Paul Dale
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-10-03 CVE Reserved
  • 2023-10-24 CVE Published
  • 2024-02-08 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-325: Missing Cryptographic Step
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Netapp
Search vendor "Netapp"
H300s Firmware
Search vendor "Netapp" for product "H300s Firmware"
--
Affected
in Netapp
Search vendor "Netapp"
H300s
Search vendor "Netapp" for product "H300s"
*-
Safe
Netapp
Search vendor "Netapp"
H410s Firmware
Search vendor "Netapp" for product "H410s Firmware"
--
Affected
in Netapp
Search vendor "Netapp"
H410s
Search vendor "Netapp" for product "H410s"
*-
Safe
Netapp
Search vendor "Netapp"
H500s Firmware
Search vendor "Netapp" for product "H500s Firmware"
--
Affected
in Netapp
Search vendor "Netapp"
H500s
Search vendor "Netapp" for product "H500s"
*-
Safe
Netapp
Search vendor "Netapp"
H700s Firmware
Search vendor "Netapp" for product "H700s Firmware"
--
Affected
in Netapp
Search vendor "Netapp"
H700s
Search vendor "Netapp" for product "H700s"
*-
Safe
Netapp
Search vendor "Netapp"
H410c Firmware
Search vendor "Netapp" for product "H410c Firmware"
--
Affected
in Netapp
Search vendor "Netapp"
H410c
Search vendor "Netapp" for product "H410c"
--
Safe
Openssl
Search vendor "Openssl"
Openssl
Search vendor "Openssl" for product "Openssl"
>= 3.0.0 < 3.0.12
Search vendor "Openssl" for product "Openssl" and version " >= 3.0.0 < 3.0.12"
-
Affected
Openssl
Search vendor "Openssl"
Openssl
Search vendor "Openssl" for product "Openssl"
>= 3.1.0 < 3.1.4
Search vendor "Openssl" for product "Openssl" and version " >= 3.1.0 < 3.1.4"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
12.0
Search vendor "Debian" for product "Debian Linux" and version "12.0"
-
Affected