CVE-2008-5077: Input Validation
Draft advisory from OpenSSL team:
OpenSSL Security Advisory [07-Jan-2009]
Incorrect checks for malformed signatures -------------------------------------------
Several functions inside OpenSSL incorrectly checked the result after calling the EVPVerifyFinal function, allowing a malformed signature to be treated as a good signature rather than as an error. This issue affected the signature checks on DSA and ECDSA keys used with SSL/TLS.
One way to exploit this flaw would be for a remote attacker who is in control of a malicious server or who can use a 'man in the middle' attack to present a malformed SSL/TLS signature from a certificate chain to a vulnerable client, bypassing validation.
This vulnerability is tracked as CVE-2008-5077.
The OpenSSL security team would like to thank the Google Security Team for reporting this issue.
Who is affected? -----------------
Everyone using OpenSSL releases prior to 0.9.8j as an SSL/TLS client when connecting to a server whose certificate contains a DSA or ECDSA key.
Use of OpenSSL as an SSL/TLS client when connecting to a server whose certificate uses an RSA key is NOT affected.
Verification of client certificates by OpenSSL servers for any key type is NOT affected.
Recommendations for users of OpenSSL ------------------------------------
Users of OpenSSL 0.9.8 should update to the OpenSSL 0.9.8j release which contains a patch to correct this issue.
The patch used is also appended to this advisory for users or distributions who wish to backport this patch to versions they build from source. Please note: this patch also includes fixes for a few other cases where return codes are not correctly checked, but these do not have a security implication
Recommendations for projects using OpenSSL ------------------------------------------
Projects and products using OpenSSL should audit any use of the routine EVPVerifyFinal() to ensure that the return code is being correctly handled. As documented, this function returns 1 for a successful verification, 0 for failure, and -1 for an error.
General recommendations -----------------------
Any SSL/TLS server with clients that OpenSSL to verify DSA or ECDSA certificates, regardless of the software used by the server, should either ensure that all clients are upgraded or should stop using DSA/ECDSA certificates. Note that unless certificates are revoked (and clients check for revocation) impersonation will still be possible until the certificate expires.
Other sources
OpenSSL 0.9.8i and earlier does not properly check the return value from the EVPVerifyFinal function, which allows remote attackers to bypass validation of the certificate chain via a malformed SSL/TLS signature for DSA and ECDSA keys.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2008-5077?
CVE-2008-5077 is classified as a high severity vulnerability that can allow attackers to bypass certificate chain validation.
How do I fix CVE-2008-5077?
To fix CVE-2008-5077, you should upgrade to an OpenSSL version that is higher than 0.9.8h.
Which versions of OpenSSL are affected by CVE-2008-5077?
CVE-2008-5077 affects OpenSSL versions 0.9.8i and earlier, including versions 0.9.6 and 0.9.7.
What types of keys are impacted by CVE-2008-5077?
CVE-2008-5077 impacts SSL/TLS signatures for DSA and ECDSA keys.
Can CVE-2008-5077 be exploited remotely?
Yes, CVE-2008-5077 can be exploited remotely, allowing attackers to bypass validation without needing local access.