Skip to content

Commit 5971ee6

Browse files
committed
Fail if SSLInsecureRenegotiation is used with mod_ssl, CVE-2009-3555
is now approaching 15 years old. * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLInsecureRenegotiation): Fail if used. (ssl_config_server_new, ssl_config_server_merge): Remove insecure reneg handling. * modules/ssl/ssl_engine_init.c (ssl_init_ctx_protocol): Remove insecure_reneg handling. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1917600 13f79535-47bb-0310-9956-ffa450edef68
1 parent ac774f7 commit 5971ee6

File tree

4 files changed

+1
-62
lines changed

4 files changed

+1
-62
lines changed

docs/manual/mod/mod_ssl.xml

-44
Original file line numberDiff line numberDiff line change
@@ -2623,50 +2623,6 @@ all queries to OCSP responders.</p>
26232623
</usage>
26242624
</directivesynopsis>
26252625

2626-
<directivesynopsis>
2627-
<name>SSLInsecureRenegotiation</name>
2628-
<description>Option to enable support for insecure renegotiation</description>
2629-
<syntax>SSLInsecureRenegotiation on|off</syntax>
2630-
<default>SSLInsecureRenegotiation off</default>
2631-
<contextlist><context>server config</context>
2632-
<context>virtual host</context></contextlist>
2633-
<compatibility>Available if using OpenSSL 0.9.8m or later</compatibility>
2634-
2635-
<usage>
2636-
<p>As originally specified, all versions of the SSL and TLS protocols
2637-
(up to and including TLS/1.2) were vulnerable to a Man-in-the-Middle
2638-
attack
2639-
(<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>)
2640-
during a renegotiation. This vulnerability allowed an attacker to
2641-
"prefix" a chosen plaintext to the HTTP request as seen by the web
2642-
server. A protocol extension was developed which fixed this
2643-
vulnerability if supported by both client and server.</p>
2644-
2645-
<p>If <module>mod_ssl</module> is linked against OpenSSL version 0.9.8m
2646-
or later, by default renegotiation is only supported with
2647-
clients supporting the new protocol extension. If this directive is
2648-
enabled, renegotiation will be allowed with old (unpatched) clients,
2649-
albeit insecurely.</p>
2650-
2651-
<note type="warning"><title>Security warning</title>
2652-
<p>If this directive is enabled, SSL connections will be vulnerable to
2653-
the Man-in-the-Middle prefix attack as described
2654-
in <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>.</p>
2655-
</note>
2656-
2657-
<example><title>Example</title>
2658-
<highlight language="config">
2659-
SSLInsecureRenegotiation on
2660-
</highlight>
2661-
</example>
2662-
2663-
<p>The <code>SSL_SECURE_RENEG</code> environment variable can be used
2664-
from an SSI or CGI script to determine whether secure renegotiation is
2665-
supported for a given SSL connection.</p>
2666-
2667-
</usage>
2668-
</directivesynopsis>
2669-
26702626
<directivesynopsis>
26712627
<name>SSLUseStapling</name>
26722628
<description>Enable stapling of OCSP responses in the TLS handshake</description>

modules/ssl/ssl_engine_config.c

+1-11
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
214214
sc->vhost_id = NULL; /* set during module init */
215215
sc->session_cache_timeout = UNSET;
216216
sc->cipher_server_pref = UNSET;
217-
sc->insecure_reneg = UNSET;
218217
#ifdef HAVE_TLSEXT
219218
sc->strict_sni_vhost_check = SSL_ENABLED_UNSET;
220219
#endif
@@ -348,7 +347,6 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
348347
cfgMerge(enabled, SSL_ENABLED_UNSET);
349348
cfgMergeInt(session_cache_timeout);
350349
cfgMergeBool(cipher_server_pref);
351-
cfgMergeBool(insecure_reneg);
352350
#ifdef HAVE_TLSEXT
353351
cfgMerge(strict_sni_vhost_check, SSL_ENABLED_UNSET);
354352
#endif
@@ -983,14 +981,7 @@ const char *ssl_cmd_SSLSessionTickets(cmd_parms *cmd, void *dcfg, int flag)
983981

984982
const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag)
985983
{
986-
#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
987-
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
988-
sc->insecure_reneg = flag?TRUE:FALSE;
989-
return NULL;
990-
#else
991-
return "The SSLInsecureRenegotiation directive is not available "
992-
"with this SSL library";
993-
#endif
984+
return "The SSLInsecureRenegotiation directive is no longer supported";
994985
}
995986

996987

@@ -2648,7 +2639,6 @@ static void ssl_srv_dump(SSLSrvConfigRec *sc, apr_pool_t *p,
26482639
modssl_ctx_dump(sc->server, p, 0, out, indent, psep);
26492640

26502641
DMP_LONG( "SSLSessionCacheTimeout", sc->session_cache_timeout);
2651-
DMP_ON_OFF("SSLInsecureRenegotiation", sc->insecure_reneg);
26522642
DMP_ON_OFF("SSLStrictSNIVHostCheck", sc->strict_sni_vhost_check);
26532643
DMP_ON_OFF("SSLSessionTickets", sc->session_tickets);
26542644
}

modules/ssl/ssl_engine_init.c

-6
Original file line numberDiff line numberDiff line change
@@ -847,12 +847,6 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
847847
}
848848
#endif
849849

850-
#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
851-
if (sc->insecure_reneg == TRUE) {
852-
SSL_CTX_set_options(ctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
853-
}
854-
#endif
855-
856850
SSL_CTX_set_app_data(ctx, s);
857851

858852
/*

modules/ssl/ssl_private.h

-1
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ struct SSLSrvConfigRec {
825825
const unsigned char *vhost_md5; /* = ap_md5_binary(vhost_id, ...) */
826826
int session_cache_timeout;
827827
BOOL cipher_server_pref;
828-
BOOL insecure_reneg;
829828
modssl_ctx_t *server;
830829
#ifdef HAVE_TLSEXT
831830
ssl_enabled_t strict_sni_vhost_check;

0 commit comments

Comments
 (0)