Skip to contentSkip to conversation

polarssl: disable 1/n-1 record splitting

PATCH In review Steffan Karger 2 participants 2 messages May 4, 2015 – May 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 polarssl: disable 1/n-1 record splitting

Disable record splitting (for now). OpenVPN assumes records are sent unfragmented, which is no longer a valid assumption when record splitting is enabled (which polarssl/mbedtls did in 1.3.10, see trac #524). Changing the code to deal with record splitting will require intrusive changes that need thorough review and testing. Since OpenVPN is not susceptible to BEAST (the data transmitted over the control channel is very hard to influence for a remote attacker), we can just disable record splitting as a quick fix. This gives us the time to develop a proper solution in the mean time, and test that thoroughly.

---
 src/openvpn/ssl_polarssl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
src/openvpn/ssl_polarssl.c +8 -0
index 1a40304..158088f 100644
@@ -727,6 +727,14 @@ void key_state_ssl_init(struct key_state_ssl *ks_ssl,
       if (ssl_ctx->allowed_ciphers)
 	ssl_set_ciphersuites (ks_ssl->ctx, ssl_ctx->allowed_ciphers);
 
+      /* Disable record splitting (for now).  OpenVPN assumes records are sent
+       * unfragmented, and changing that will require thorough review and
+       * testing.  Since OpenVPN is not susceptible to BEAST, we can just
+       * disable record splitting as a quick fix. */
+#if defined(POLARSSL_SSL_CBC_RECORD_SPLITTING)
+      ssl_set_cbc_record_splitting (ks_ssl->ctx, SSL_CBC_RECORD_SPLITTING_DISABLED);
+#endif /* POLARSSL_SSL_CBC_RECORD_SPLITTING */
+
       /* Initialise authentication information */
       if (is_server)
 	polar_ok(ssl_set_dh_param_ctx(ks_ssl->ctx, ssl_ctx->dhm_ctx));
Signature · 1 line
2.1.4
#1 lore raw

Hi,

Quoted 3 lines · Steffan Karger

Disable record splitting (for now). OpenVPN assumes records are sent unfragmented, which is no longer a valid assumption when record splitting is enabled (which polarssl/mbedtls did in 1.3.10, see trac #524).

ACK. Had to manually apply it, as the line numbers differed too much for git to be comfortable - patch was fine with it, though...

Patching file ssl_polarssl.c using Plan A... Hunk #1 succeeded at 738 with fuzz 1 (offset 11 lines). Hmm... Ignoring the trailing garbage.

commit d0f26fb524744a63615a1bf4e7ddcefcd102b328 (master)

Author: Steffan Karger <[email protected]...>
Date:   Mon May 4 21:06:38 2015 +0200
    polarssl: disable 1/n-1 record splitting

    Signed-off-by: Steffan Karger <[email protected]...>
    Acked-by: Gert Doering <[email protected]...>
    Message-Id: <[email protected]...>
    URL: http://article.gmane.org/gmane.network.openvpn.devel/9646
    Signed-off-by: Gert Doering <[email protected]...>
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...