{"action":"created","issue":{"url":"https://api.github.com/repos/haraka/Haraka/issues/1395","repository_url":"https://api.github.com/repos/haraka/Haraka","labels_url":"https://api.github.com/repos/haraka/Haraka/issues/1395/labels{/name}","comments_url":"https://api.github.com/repos/haraka/Haraka/issues/1395/comments","events_url":"https://api.github.com/repos/haraka/Haraka/issues/1395/events","html_url":"https://github.com/haraka/Haraka/pull/1395","id":144386034,"number":1395,"title":"Disable SSLv2 (for DROWN)","user":{"login":"chazomaticus","id":366268,"avatar_url":"https://avatars.githubusercontent.com/u/366268?v=3","gravatar_id":"","url":"https://api.github.com/users/chazomaticus","html_url":"https://github.com/chazomaticus","followers_url":"https://api.github.com/users/chazomaticus/followers","following_url":"https://api.github.com/users/chazomaticus/following{/other_user}","gists_url":"https://api.github.com/users/chazomaticus/gists{/gist_id}","starred_url":"https://api.github.com/users/chazomaticus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chazomaticus/subscriptions","organizations_url":"https://api.github.com/users/chazomaticus/orgs","repos_url":"https://api.github.com/users/chazomaticus/repos","events_url":"https://api.github.com/users/chazomaticus/events{/privacy}","received_events_url":"https://api.github.com/users/chazomaticus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-29T20:59:02Z","updated_at":"2016-04-07T19:45:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haraka/Haraka/pulls/1395","html_url":"https://github.com/haraka/Haraka/pull/1395","diff_url":"https://github.com/haraka/Haraka/pull/1395.diff","patch_url":"https://github.com/haraka/Haraka/pull/1395.patch"},"body":"This prevents clients from using SSLv2 (for the DROWN attack) *and*\r\nSSLv3 (for the POODLE attack) when they issue STARTTLS.  See\r\n<https://poodle.io/>, <https://drownattack.com/>, and\r\n<http://disablessl3.com/#nodejs>.\r\n\r\nThe only way I know to test is a bit odd--you need an openssl version compiled with SSLv2 support.  This can be hard to find on modern systems; for example: the openssl that comes with Ubuntu 14.04 will say `unknown option -ssl2` even though later in the usage docs it has `-ssl2 - just use SSLv2`).  Run haraka, then:\r\n\r\n    openssl s_client -ssl2 -starttls smtp -connect localhost:25\r\n\r\n(Replace `localhost`/`25` with the hostname and port of haraka.)  If you get an error that includes a line like:\r\n\r\n    140690032785224:error:1406D0B8:SSL routines:GET_SERVER_HELLO:no cipher list:s2_clnt.c:452:\r\n\r\nthen it successfully initiated the SSLv2 handshake and just got stymied by a lack of cipher suites, meaning *your install is vulnerable to DROWN attacks*.\r\n\r\nIf, however, you get an error like:\r\n\r\n    140695119636296:error:1407F0E5:SSL routines:SSL2_WRITE:ssl handshake failure:s2_pkt.c:429:\r\n\r\nthen it could *not* initiate the SSLv2 handshake, and your install is *not* vulnerable to DROWN.\r\n\r\nWe've been running this a while now without issue, and 3rd parties have tested and agree that our harakas aren't susceptible to DROWN."},"comment":{"url":"https://api.github.com/repos/haraka/Haraka/issues/comments/207063159","html_url":"https://github.com/haraka/Haraka/pull/1395#issuecomment-207063159","issue_url":"https://api.github.com/repos/haraka/Haraka/issues/1395","id":207063159,"user":{"login":"chazomaticus","id":366268,"avatar_url":"https://avatars.githubusercontent.com/u/366268?v=3","gravatar_id":"","url":"https://api.github.com/users/chazomaticus","html_url":"https://github.com/chazomaticus","followers_url":"https://api.github.com/users/chazomaticus/followers","following_url":"https://api.github.com/users/chazomaticus/following{/other_user}","gists_url":"https://api.github.com/users/chazomaticus/gists{/gist_id}","starred_url":"https://api.github.com/users/chazomaticus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chazomaticus/subscriptions","organizations_url":"https://api.github.com/users/chazomaticus/orgs","repos_url":"https://api.github.com/users/chazomaticus/repos","events_url":"https://api.github.com/users/chazomaticus/events{/privacy}","received_events_url":"https://api.github.com/users/chazomaticus/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T19:45:30Z","updated_at":"2016-04-07T19:45:30Z","body":"> did you test with a version of node > 0.10.29 and discover that Haraka was vulnerable?\r\n\r\nYes, our haraka (2.7.2-ish plus a few local mods) on node v0.12.9 was vulnerable.  Not sure what flags that node was compiled with.\r\n\r\nI'd just like to reiterate my support for this patch.  In my opinion, it's not great security if it can be defeated with a compile flag on the language runtime, which many people who would deploy haraka might not have control over or care about.  This patch would keep everyone secure from this threat regardless of the whims of administrators of the machines it's running on.\r\n\r\n> I'm seeing a risk of constants.SSL_OP_NO_SSLv2 no longer existing in the future, causing a new maintenance issue.\r\n\r\nI'd also like to point out that I don't see a maintenance issue here.  I believe js coerces an undefined value, e.g. if SSL_OP_NO_SSLv2 were no longer defined by node, into a 0 in this expression, without warning or error.\r\n\r\nIn other words, I think this code would ensure haraka is doing the right thing regardless of node version or compile flags, and that sounds like a good idea to me."}}