File CVE-2010-4180.patch of Package compat-openssl097g.import4909
Index: openssl-0.9.7d/doc/ssl/SSL_CTX_set_options.pod
===================================================================
--- openssl-0.9.7d.orig/doc/ssl/SSL_CTX_set_options.pod
+++ openssl-0.9.7d/doc/ssl/SSL_CTX_set_options.pod
@@ -63,18 +63,7 @@ this breaks this server so 16 bytes is t
=item SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
-ssl3.netscape.com:443, first a connection is established with RC4-MD5.
-If it is then resumed, we end up using DES-CBC3-SHA. It should be
-RC4-MD5 according to 7.6.1.3, 'cipher_suite'.
-
-Netscape-Enterprise/2.01 (https://merchant.netscape.com) has this bug.
-It only really shows up when connecting via SSLv2/v3 then reconnecting
-via SSLv3. The cipher list changes....
-
-NEW INFORMATION. Try connecting with a cipher list of just
-DES-CBC-SHA:RC4-MD5. For some weird reason, each new connection uses
-RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when
-doing a re-connect, always takes the first cipher in the cipher list.
+As of OpenSSL 0.9.8q and 1.0.0c, this option has no effect.
=item SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
Index: openssl-0.9.7d/ssl/s3_clnt.c
===================================================================
--- openssl-0.9.7d.orig/ssl/s3_clnt.c
+++ openssl-0.9.7d/ssl/s3_clnt.c
@@ -705,8 +705,11 @@ static int ssl3_get_server_hello(SSL *s)
s->session->cipher_id = s->session->cipher->id;
if (s->hit && (s->session->cipher_id != c->id))
{
+/* Workaround is now obsolete */
+#if 0
if (!(s->options &
SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG))
+#endif
{
al=SSL_AD_ILLEGAL_PARAMETER;
SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED);
Index: openssl-0.9.7d/ssl/s3_srvr.c
===================================================================
--- openssl-0.9.7d.orig/ssl/s3_srvr.c
+++ openssl-0.9.7d/ssl/s3_srvr.c
@@ -775,6 +775,10 @@ static int ssl3_get_client_hello(SSL *s)
}
if (j == 0)
{
+/* Disabled because it can be used in a ciphersuite downgrade
+ * * attack: CVE-2010-4180.
+ * */
+#if 0
if ((s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1))
{
/* Very bad for multi-threading.... */
@@ -782,6 +786,7 @@ static int ssl3_get_client_hello(SSL *s)
0);
}
else
+#endif
{
/* we need to have the cipher in the cipher
* list if we are asked to reuse it */