Disable TLS compression to protect against CRIME-like attacks

Bug #1058955 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Microfiber
Fix Released
Critical
Jason Gerard DeRose

Bug Description

Thanks to prodding from David Jordan, I've looked into the CRIME attack more closely, and as a result figured out how to disable compression via SSLContext.options.

This article is a decent overview of the attack:

http://arstechnica.com/security/2012/09/crime-hijacks-https-sessions/

Python 3.3 adds the `ssl.OP_NO_COMPRESSION` constant. So my fix is to monkey patch Python3.2 to add this, and then to change build_ssl_context() so that it sets the appropriate options like this:

    ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
    ctx.verify_mode = ssl.CERT_REQUIRED
    ctx.options |= ssl.OP_NO_COMPRESSION

Although Novacut and Dmedia use client side certs rather than sending a secret session cookie or password with each request, these are use cases Microfiber supports so we should use good, secure defaults. And you never know in what ways this compression attack might be extended.

Tags: security

Related branches

description: updated
summary: - Disabled SSL compression to protect against CRIME like attacks
+ Disabled TLS compression to protect against CRIME like attacks
Revision history for this message
David Jordan (dmj726) wrote : Re: Disabled TLS compression to protect against CRIME like attacks

Thanks, it never hurts to be careful!

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Interestingly, it's not possible to disable TLS compression under Apache 2.2, something we should keep in mind for our Apache SSL frontend servers:

https://issues.apache.org/bugzilla/show_bug.cgi?id=53219

From testing I've done, I've confirmed you can disabled it from the client-side, so we're covered as far as Microfiber goes. But we also have to worry about the CouchDB replicator.

Changed in microfiber:
status: In Progress → Fix Committed
summary: - Disabled TLS compression to protect against CRIME like attacks
+ Disable TLS compression to protect against CRIME like attacks
summary: - Disable TLS compression to protect against CRIME like attacks
+ Disable TLS compression to protect against CRIME-like attacks
Changed in microfiber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.