[CONTROLLER-1354] [SECURITY] LOGJAM: TLS connections which support export grade DHE key-exchange are vulnerable to MITM attacks CVE-2015-4000 Created: 03/Jun/15 Updated: 15/Jun/15 Resolved: 15/Jun/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | karaf |
| Affects Version/s: | Lithium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | David Jorm | Assignee: | Maros Marsalek |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| External issue ID: | 3552 | ||||||||||||||||
| Priority: | Normal | ||||||||||||||||
| Description |
|
Various components of OpenDaylight are affected by the LOGJAM TLS downgrade vulnerability: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-4000 |
| Comments |
| Comment by Maros Marsalek [ 03/Jun/15 ] |
|
Looking for various vulnerable components, found these so far:
Started looking at PCEP and its cipher suits, listing default enabled cipher suits returns following list: ENABLED = [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 There is no DHE with EXPORT among them so my question is, how to move on with this. Do we want to review this list and reorder/filter these ciphers and set this new list as enabled ciphers where SSL is used ? |
| Comment by Anton Ivanov [ 04/Jun/15 ] |
|
This contains RC4 which is banned by RFC7465 https://tools.ietf.org/html/rfc7465 It will be good if we can pull crypto initialization into a utility class for all to use. Otherwise when people for example resolve 3554 https://bugs.opendaylight.org/show_bug.cgi?id=3554 they will reintroduce the same problem once more. |
| Comment by Maros Marsalek [ 04/Jun/15 ] |
|
Yeah, we should provide a utility class for this. We need to find out exactly what will it do. First thing would be to disable RC4 ciphers (similar what patch for 3554 does). It should also disable EXPORT and NULL ciphers. What else ? Also we need to find a place for it somewhere, available for all projects. This would fix the vulnerabilities in the code started components, but we should also modify the xml configs for tomcat and jetty in a similar fashion. |
| Comment by Maros Marsalek [ 04/Jun/15 ] |
|
My proposal for a common "CryptoUtils" class: https://git.opendaylight.org/gerrit/#/c/21880/ Its located in the protocol framework in controller project for now. |
| Comment by Anton Ivanov [ 05/Jun/15 ] |
|
Adding Robert as a watcher, a testcase to verify his proposed approach will be attached shortly. |
| Comment by Anton Ivanov [ 05/Jun/15 ] |
|
Attached is a java cipher list example courtesy of Atlassian. If you specify RC4, etc in the disabled cipher list the security.properties they disappear from the list (good). However the actual ciphers involved in Logjam - the export 40 bit ones cannot be removed this way. While in theory that (rather badly documented) property should be able to take f.e. DES keylength < 56 it does not. The cipher stays. Specifying DES40 also does not remove it. So unless I am missing a possible option on how to configure it, this approach does not work (besides it being documented as sun specific and not guaranteed to be supported across the board). |
| Comment by Anton Ivanov [ 05/Jun/15 ] |
|
Attachment Ciphers.java has been added with description: Java cipher list test courtesy of Atlassian |
| Comment by Maros Marsalek [ 05/Jun/15 ] |
|
Anton, can you show me the exact settings for Also, you are mentioning keylength, shouldnt it be keySize ? |
| Comment by Anton Ivanov [ 05/Jun/15 ] |
|
My final security.properties which seems to yield what we want is: jdk.tls.disabledAlgorithms=EXPORT, RC4, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5, TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, anon This works. The problem was that I had it scripted for testing and the -D argument ended up after the java file, not before. As a result the property was not being set. After fixing my testcase it all worked fine (with these settings). It works with OpenJDK, it works with Oracle JDK and it is honoured by IBM (if they ever decide to contribute something). That for me is good enough. We can close this one and leave the relevant settings to the actual packagers. |
| Comment by Robert Varga [ 05/Jun/15 ] |
|
Can we propose a patch which will add these properties to the base karaf-empty (or whichever) distribution, that way they will get picked up by integration as well per-project distros. |
| Comment by Maros Marsalek [ 09/Jun/15 ] |
|
I can do that tomorrow... if anyone else is interested in taking it, feel free. |
| Comment by Maros Marsalek [ 10/Jun/15 ] |
|
https://git.opendaylight.org/gerrit/#/c/22261/ This commit introduces custom odl.java.security config file and modifies the startup scripts to include this file by default. |
| Comment by David Jorm [ 15/Jun/15 ] |
|
Thanks for the patch, Maros. It would be great if we can get this merged in time for GA of Lithium. |