Issue summary: Applications using RSASVE key encapsulation to establish a secret encryption key can send contents of an uninitialized memory buffer to a malicious peer.
Impact summary: The uninitialized buffer might contain sensitive data from the previous execution of the application process which leads to sensitive data leakage to an attacker.
RSA_public_encrypt() returns the number of bytes written on success and -1 on error. The affected code tests only whether the return value is non-zero. As a result, if RSA encryption fails, encapsulation can still return success to the caller, set the output lengths, and leave the caller to use the contents of the ciphertext buffer as if a valid KEM ciphertext had been produced.
If applications use EVP_PKEY_encapsulate() with RSA/RSASVE on an attacker-supplied invalid RSA public key without first validating that key, then this may cause stale or uninitialized contents of the caller-provided ciphertext buffer to be disclosed to the attacker in place of the KEM ciphertext.
As a workaround calling EVP_PKEY_public_check() or EVP_PKEY_public_check_quick() before EVP_PKEY_encapsulate() will mitigate the issue.
The FIPS modules in 3.6, 3.5, 3.4, 3.3, 3.1 and 3.0 are affected by this issue.
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Openssl | Openssl | 3.0.0 (including) | 3.0.20 (excluding) |
| Openssl | Openssl | 3.3.0 (including) | 3.3.7 (excluding) |
| Openssl | Openssl | 3.4.0 (including) | 3.4.5 (excluding) |
| Openssl | Openssl | 3.5.0 (including) | 3.5.6 (excluding) |
| Openssl | Openssl | 3.6.0 (including) | 3.6.2 (excluding) |
| Red Hat Enterprise Linux 10 | RedHat | openssl-1:3.5.5-2.el10_2 | * |
| Red Hat Enterprise Linux 10 | RedHat | openssl-fips-provider-0:3.0.7-11.el10_2 | * |
| Red Hat Enterprise Linux 10.0 Extended Update Support | RedHat | openssl-fips-provider-0:3.0.7-11.el10_0 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.5-2.el9_8 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.5-2.el9_8 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-fips-provider-0:3.0.7-11.el9_8 | * |
| Red Hat JBoss Web Server 6.2.2 | RedHat | openssl | * |
| Red Hat Hardened Images | RedHat | openssl-main-3.5.6-0.1.hum1 | * |
| Red Hat Insights proxy 1.5 | RedHat | insights-proxy/insights-proxy-container-rhel9:1780420428 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/cds-rhel9:1779798159 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/haproxy-rhel9:1779798164 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/installer-rhel9:1779798165 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/rhua-rhel9:1779798222 | * |
| Edk2 | Ubuntu | devel | * |
| Edk2 | Ubuntu | noble | * |
| Edk2 | Ubuntu | questing | * |
| Edk2 | Ubuntu | resolute | * |
| Openssl | Ubuntu | devel | * |
| Openssl | Ubuntu | jammy | * |
| Openssl | Ubuntu | noble | * |
| Openssl | Ubuntu | questing | * |
| Openssl | Ubuntu | resolute | * |
| Openssl | Ubuntu | upstream | * |
The programmer may assume that certain events or conditions will never occur or do not need to be worried about, such as low memory conditions, lack of access to resources due to restrictive permissions, or misbehaving clients or components. However, attackers may intentionally trigger these unusual conditions, thus violating the programmer’s assumptions, possibly introducing instability, incorrect behavior, or a vulnerability. Note that this entry is not exclusively about the use of exceptions and exception handling, which are mechanisms for both checking and handling unusual or unexpected conditions.