Re: [Openvpn-devel] [PATCH] Disable SSL compression

2015-02-16 Thread David Sommerseth
On 15/02/15 16:00, Arne Schwabe wrote:
> On 15.02.2015 15:24, Steffan Karger wrote:
>> As reported in trac #502, SSL compression can cause problems in some corner
>> cases.  OpenVPN does not need SSL compression, since the control channel is
>> low bandwidth.  This does not influence the data channel compressen (i.e.
>> --comp or --comp-lzo).
>>
>> Even though this has not yet been relevant for OpenVPN (since an attacker
>> can not easily control contents of control channel messages), SSL
>> compression has been used in the CRIME and BREACH attacks on TLS.  TLS 1.3
>> will probably even remove support for compression all together, for
>> exactly this reason.
>>
>> Since we don't need it, and SSL compression causes issues, let's just
>> disable it in OpenSSL builds.  PolarSSL has no run-time flag to disable
>> compression, but is by default compiled without compression.
>>
> ACK from me. Sounds sensible to me. If do not support 0.9.8 anymore (in
> -master perhaps?) I would like this to be commited without ifdef.

We've agreed to support RHEL5 until it goes EOL, which is March 31,
2017. [1]  As RHEL5 is on 0.9.8 we need to support it.  RHEL6 is on
1.0.1, so we'll have something to look forward too ;-)


[1] There is also an additional "extended life cycle" which RHEL
customers may opt-in for (for an additional fee), which I don't
think we should relate too.



-- 
kind regards,

David Sommerseth



Re: [Openvpn-devel] [PATCH] Disable SSL compression

2015-02-15 Thread Steffan Karger
On 15-02-15 16:00, Arne Schwabe wrote:
> ACK from me. Sounds sensible to me. If do not support 0.9.8 anymore (in
> -master perhaps?) I would like this to be commited without ifdef.

Agreed, but we went from 0.9.6+ in 2.3 to 0.9.8+ in 2.4/master.

I put 0.9.8 explicitly in the comment, so that if we decide to drop
support for 0.9.8, it is easy to spot that we can remove these ifdefs.
(and if we drop 0.9.8, we can probably remove a lot more code :) ).

-Steffan



Re: [Openvpn-devel] [PATCH] Disable SSL compression

2015-02-15 Thread Arne Schwabe
On 15.02.2015 15:24, Steffan Karger wrote:
> As reported in trac #502, SSL compression can cause problems in some corner
> cases.  OpenVPN does not need SSL compression, since the control channel is
> low bandwidth.  This does not influence the data channel compressen (i.e.
> --comp or --comp-lzo).
>
> Even though this has not yet been relevant for OpenVPN (since an attacker
> can not easily control contents of control channel messages), SSL
> compression has been used in the CRIME and BREACH attacks on TLS.  TLS 1.3
> will probably even remove support for compression all together, for
> exactly this reason.
>
> Since we don't need it, and SSL compression causes issues, let's just
> disable it in OpenSSL builds.  PolarSSL has no run-time flag to disable
> compression, but is by default compiled without compression.
>
ACK from me. Sounds sensible to me. If do not support 0.9.8 anymore (in
-master perhaps?) I would like this to be commited without ifdef.

Arne



[Openvpn-devel] [PATCH] Disable SSL compression

2015-02-15 Thread Steffan Karger
As reported in trac #502, SSL compression can cause problems in some corner
cases.  OpenVPN does not need SSL compression, since the control channel is
low bandwidth.  This does not influence the data channel compressen (i.e.
--comp or --comp-lzo).

Even though this has not yet been relevant for OpenVPN (since an attacker
can not easily control contents of control channel messages), SSL
compression has been used in the CRIME and BREACH attacks on TLS.  TLS 1.3
will probably even remove support for compression all together, for
exactly this reason.

Since we don't need it, and SSL compression causes issues, let's just
disable it in OpenSSL builds.  PolarSSL has no run-time flag to disable
compression, but is by default compiled without compression.

Signed-off-by: Steffan Karger 
---
 src/openvpn/ssl_openssl.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 48c0571..d9abc6e 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -203,6 +203,10 @@ tls_ctx_set_options (struct tls_root_ctx *ctx, unsigned 
int ssl_flags)
 if (tls_ver_min > TLS_VER_1_2 || tls_ver_max < TLS_VER_1_2)
   sslopt |= SSL_OP_NO_TLSv1_2;
 #endif
+#ifdef SSL_OP_NO_COMPRESSION
+/* Disable compression - flag not available in OpenSSL 0.9.8 */
+sslopt |= SSL_OP_NO_COMPRESSION;
+#endif
 SSL_CTX_set_options (ctx->ctx, sslopt);
   }

-- 
2.1.0