Issue summary: The implementations of AES-SIV (RFC 5297) and AES-GCM-SIV (RFC 8452) mishandle the authentication of AAD (Additional Authenticated Data) with an empty ciphertext allowing a forgery of such messages.
Impact summary: An attacker can forge empty messages with arbitrary AAD to the victims application using these ciphers.
AES-SIV (RFC 5297) and AES-GCM-SIV (RFC 8452) are nonce-misuse-resistant AEAD
modes: they accept a key, nonce, optional AAD (bytes that are authenticated
but not encrypted), and plaintext, and produces ciphertext plus a 16-byte
tag. On decrypt, EVP_DecryptFinal_ex() is documented to return success only
if the tag is verified succesfully.
In OpenSSLs provider implementation of these ciphers, the expected tag is
computed only when decryption function is invoked with non-empty data.
If the caller supplies AAD and then calls EVP_DecryptFinal_ex() without
invocation of the ciphertext update, which can happen when the received
ciphertext length is zero, the tag is never recalculated and still holds its
all-zeros value.
When AES-GCM-SIV is used, an attacker who sends arbitrary AAD, empty ciphertext, and all-zeros tag passes authentication under any key they do not know, single-shot. When AES-SIV is used, for mounting the attack its necessary for the application to reuse the decryption context without resetting the key.
AES-SIV is implemented since OpenSSL 3.0. AES-GCM-SIV is implemented since OpenSSL 3.2.
No protocols implemented in OpenSSL itself (TLS/CMS/PKCS7/HPKE/QUIC) support either AES-GCM-SIV or AES-SIV. To mount an attack, the applications must implement their own protocol and use the EVP interface. Also they must skip the ciphertext update when a message with an empty ciphertext arrives.
The FIPS modules in 4.0, 3.6, 3.5, 3.4, and 3.0 are not affected by this issue, as these algorithms are not FIPS approved and the affected code is outside the OpenSSL FIPS module boundary.
The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Openssl | Openssl | 3.0.0 (including) | 3.0.21 (excluding) |
| Openssl | Openssl | 3.4.0 (including) | 3.4.6 (excluding) |
| Openssl | Openssl | 3.5.0 (including) | 3.5.7 (excluding) |
| Openssl | Openssl | 3.6.0 (including) | 3.6.3 (excluding) |
| Openssl | Openssl | 4.0.0 (including) | 4.0.0 (including) |
| Red Hat Enterprise Linux 10 | RedHat | openssl-1:3.5.5-4.el10_2 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.5-4.el9_8 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.5-4.el9_8 | * |
| Red Hat Discovery 2 | RedHat | discovery/discovery-server-rhel9:1782159791 | * |
| Red Hat Discovery 2 | RedHat | discovery/discovery-ui-rhel9:1782166952 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/cds-rhel9:1781525684 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/haproxy-rhel9:1781525671 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/installer-rhel9:1781525693 | * |
| Red Hat Update Infrastructure 5 | RedHat | rhui5/rhua-rhel9:1781525739 | * |
| Nodejs | Ubuntu | esm-apps/jammy | * |
| Nodejs | Ubuntu | jammy | * |
| Openssl | Ubuntu | devel | * |
| Openssl | Ubuntu | fips-preview/jammy | * |
| Openssl | Ubuntu | fips-updates/jammy | * |
| Openssl | Ubuntu | jammy | * |
| Openssl | Ubuntu | noble | * |
| Openssl | Ubuntu | questing | * |
| Openssl | Ubuntu | resolute | * |