]> jfr.im git - solanum.git/commitdiff
Remove SSL_OP_NO_COMPRESSION from openssl initialization.
authorKeith Buck <redacted>
Fri, 21 Feb 2014 09:17:29 +0000 (09:17 +0000)
committerKeith Buck <redacted>
Fri, 21 Feb 2014 09:17:29 +0000 (09:17 +0000)
SSL_OP_NO_COMPRESSION was presumably added in an attempt to prevent
information leakage in a manner similar to recent attacks on HTTPS.
However, assuming that IRC is vulnerable to the same class of attacks is
incorrect: the behavior of the IRC protocol (a single long-running
connection) is not the same as that of HTTPS (multiple ephemeral
connections). HTTPS's use of ephemeral connections means that certain
assumptions can be made about the contents of the compression
algorithm's dictionaries and the content exchanged between the client
and server (e.g. the content being nearly the same for each connection),
which is not true for IRC. Additionally, they rely on the attacker being
able to coerce the client into creating many HTTPS connections (and
resending some secret token belonging to the user, along with
attacker-controlled data) each time, none of which is possible with IRC.
Lastly, since compression is no longer performed, this option will
result in leaking the lengths of messages transmitted to and from the
client. This option does reduce CPU utilization on Charybdis servers but
also increases bandwidth consumed.

libratbox/src/openssl.c

index a94c09350a66299d034ed0873b903812c8057008..defcfa9334572939c4762201cffd565cdce09697 100644 (file)
@@ -313,9 +313,6 @@ rb_init_ssl(void)
        }
        /* Disable SSLv2, make the client use our settings */
        SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_CIPHER_SERVER_PREFERENCE
-#ifdef SSL_OP_NO_COMPRESSION
-                       | SSL_OP_NO_COMPRESSION
-#endif
 #ifdef SSL_OP_SINGLE_DH_USE
                        | SSL_OP_SINGLE_DH_USE
 #endif