Podatność w OpenSSL polega na braku wystarczającej walidacji pól cipher oraz długości tagu w kontenerach AuthEnvelopedData (CMS), co umożliwia atakującemu uzyskanie funkcjonalności równoważnej kluczowi szyfrowania lub ominięcie weryfikacji integralności wiadomości. Ze względu na sieciową dostępność bez wymaganych uprawnień oraz krytyczny wpływ na poufność i integralność, podatność jest oceniana jako krytyczna.
▸ Pokaż oryginał (EN)
Issue Summary: Cryptographic Message Services (CMS) processing fails to perform sufficient input validation on the cipher and tag length fields of AuthEnvelopedData containers, leading to various potential compromises. Impact Summary: Attackers making use of these vulnerabilities may achieve key-equivalent functionality for a given CMS recipient and/or bypass integrity validation for a given message. In one use case, an attacker may send a CMS message containing AuthEnvelopedData with the cipher specified as a non-AEAD cipher. OpenSSL erroneously allows this selection, and attempts to decrypt and validate the message. An on-path attacker who captures one legitimate AES-GCM AuthEnvelopedData addressed to the victim can re-emit it with the recipientInfos set left byte-for-byte intact, so the victim's private key still unwraps the genuine CEK (the content-encryption key), but with the inner OID rewritten to AES-256-OFB (Output Feedback Mode, an unauthenticated keystream mode) and with an attacker-chosen IV and ciphertext. The victim initializes AES-256-OFB under the real CEK, never consults the MAC field, and CMS_decrypt() returns success. If the application under attack responds to the attacker with any indicator showing success or failure of the decryption effort, it is possible for the attacker to use this as an oracle to obtain key equivalent functionality for the CEK used for the chosen recipient of the message. In another use case, an attacker can reduce the tag length of the chosen AEAD cipher for a given AuthEnvelopedData container to be a single byte long, allowing an attacker to brute force CMS decryption, producing an integrity bypass for applications that trust CMS_decrypt() to reject modified content. The FIPS modules are not affected by this issue.
W pierwszym scenariuszu atakujący przechwytuje prawidłową wiadomość AES-GCM AuthEnvelopedData i ponownie ją wysyła, podmieniając wewnętrzny identyfikator OID szyfrowania na AES-256-OFB (tryb strumieniowy bez uwierzytelniania) przy zachowaniu oryginalnych recipientInfos. Ofiara poprawnie odwija CEK (Content Encryption Key) swoim kluczem prywatnym, inicjalizuje AES-256-OFB z wybranym przez atakującego IV i szyfrogramem, pomija weryfikację MAC, a CMS_decrypt() zwraca sukces. Jeśli aplikacja ofiary ujawnia wynik operacji deszyfrowania, atakujący może wielokrotnie powtarzać ten proces, używając odpowiedzi jako wyroczni (oracle) do uzyskania funkcjonalności równoważnej CEK. W drugim scenariuszu atakujący skraca długość tagu AEAD do jednego bajtu, co umożliwia brute-force weryfikacji MAC i efektywne ominięcie sprawdzania integralności treści.
Atakujący może uzyskać funkcjonalność równoważną kluczowi szyfrowania treści (CEK) dla wybranego odbiorcy wiadomości CMS oraz ominąć weryfikację integralności, co skutkuje wysokim naruszeniem poufności i integralności chronionych danych. Moduły FIPS nie są podatne na ten problem.
Należy zastosować patche dostępne u producenta zgodnie z referencjami — poprawki zostały opublikowane w repozytorium OpenSSL (commity: 03c1f4d, 439ed7d, 7947e6a, 9fd97f8, d2ca86b). Należy zaktualizować OpenSSL do wersji zawierającej wymienione poprawki oraz zweryfikować, czy aplikacje korzystające z CMS_decrypt() posiadają dodatkową walidację po stronie aplikacji.
OpenSSL w wersjach przetwarzających CMS AuthEnvelopedData (szczegółowe wersje wskazane w referencjach producenta); moduły FIPS nie są podatne.
Podatność dotyczy wyłącznie przetwarzania kontenerów CMS AuthEnvelopedData; moduły FIPS nie są nią dotknięte, co zostało wprost wskazane w opisie oryginalnym.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NOpenSSL
APPOpenssl4.0.03.0.0 – 3.0.21 (bez)3.4.0 – 3.4.6 (bez)3.5.0 – 3.5.7 (bez)3.6.0 – 3.6.3 (bez)
Powiązane podatności
OpenSSL: heap buffer overflow przy konwersji OCTET STRING na hex (32-bit)
The OpenSSL 3.0.4 release introduced a serious bug in the RSA implementation for X86_64 CPUs supporting the AV...
In order to decrypt SM2 encrypted data an application is expected to call the API function EVP_PKEY_decrypt()....
An issue was discovered in openfortivpn 1.11.0 when used with OpenSSL before 1.0.2. tunnel.c mishandles certif...
statem/statem.c in OpenSSL 1.1.0a does not consider memory-block movement after a realloc call, which allows r...