Bug 1005611 - BEAST workaround not enabled in Firefox
Summary: BEAST workaround not enabled in Firefox
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 19
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-08 23:55 UTC by Cesar Eduardo Barros
Modified: 2013-10-17 10:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 10:32:27 UTC
Type: Bug
Embargoed:
mattdm: fedora_requires_release_note+


Attachments (Terms of Use)

Description Cesar Eduardo Barros 2013-09-08 23:55:53 UTC
Description of problem:

Due to https://bugzilla.redhat.com/show_bug.cgi?id=770682, the 1/n-1 record split which is needed to protect against BEAST on CBC suites was disabled globally on NSS. Firefox (and Thunderbird) should enable the workaround by default.

Version-Release number of selected component (if applicable):

firefox-23.0.1-4.fc19.x86_64
nss-3.15.1-3.fc19.x86_64

How reproducible:

Every time.

Steps to Reproduce:
1. Disable all RC4 suites in about:config, or choose a https server which does not force RC4 to be preferred.
2. Connect to the https server.
3. Verify (using Wireshark) that a block cipher was chosen, and that the Application Data records sent by the browser were not split.

Actual results:

The browser sends a single Application Data record.

Expected results:

The browser sends a pair of Application Data records, the first one with length 32, the second one with the rest of the data.

Additional info:

Recompiling nss with patch 29 commented out (nss-ssl-cbc-random-iv-off-by-default.patch) fixes the bug, but probably reintroduces bug 770682.

It seems to be possible for firefox to force the workaround to be enabled, even if it is off by default. A comment at https://bugzilla.mozilla.org/show_bug.cgi?id=723109 mentions a SSL_OptionSet function which appears to be able to disable or enable the workaround directly. Another option would be to fudge the environment before calling any function of the NSS library, forcing NSS_SSL_CBC_RANDOM_IV=1 on the environment unless it already has a NSS_SSL_CBC_RANDOM_IV with any value.

This bug report is about firefox, since I did not test thunderbird; a similar bug report could be made about it. For thunderbird, see also https://bugzilla.mozilla.org/show_bug.cgi?id=723109.

Comment 1 Tomas Hoger 2013-09-09 06:39:24 UTC
(In reply to Cesar Eduardo Barros from comment #0)
> Recompiling nss with patch 29 commented out
> (nss-ssl-cbc-random-iv-off-by-default.patch) fixes the bug, but probably
> reintroduces bug 770682.

CCing NSS maintainer to see when we're finally dropping that patch.  It is still applied in F19, I though it was supposed to be gone by now.

> It seems to be possible for firefox to force the workaround to be enabled,
> even if it is off by default. A comment at
> https://bugzilla.mozilla.org/show_bug.cgi?id=723109 mentions a SSL_OptionSet
> function which appears to be able to disable or enable the workaround
> directly. Another option would be to fudge the environment before calling
> any function of the NSS library, forcing NSS_SSL_CBC_RANDOM_IV=1 on the
> environment unless it already has a NSS_SSL_CBC_RANDOM_IV with any value.

This is already done in firefox and thunderbird packages in Red Hat Enterprise Linux 5 and 6 using the following in the launcher shell script:

  # BEAST fix (rhbz#838879)
  NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1}
  export NSS_SSL_CBC_RANDOM_IV

https://bugzilla.redhat.com/show_bug.cgi?id=737506#c36
https://bugzilla.redhat.com/show_bug.cgi?id=838879

Comment 3 Hubert Kario 2013-09-12 12:14:53 UTC
Fedora 18 is also affected.

Comment 4 Elio Maldonado Batiz 2013-09-12 14:29:54 UTC
I bit of information from the nss side of things. The nss disabling patch is not applied on Rawhide or f20, onlt applied on stable branches. After we branch Rawhide for the next fedora release and we enter in Alpha, I send emails to the fedora development mailing list telling them that NSS_SSL_CBC_RANDOM_IV=1 will be the default as they use updates-testing and ask for feedback on whether it causes problems. Twice they have said it still causes problems. There are still unpatches servers out there. Once we go beta I have to enable the patch again. f20 is entering Alpha soon so I'll send that email again. I know this bug is for Firefox but I though worth informing you that we monitor this every six months for nss.

Comment 5 Simo Sorce 2013-09-12 16:52:10 UTC
Elio, sorry but this is backwards.

The default should be secure, and then if some applications tiull have issues they can add setenv("NSS_SSL_CBC_RANDOM_IV", "0", 1); as a patch until things work.

We shouldn't make *all* applications vulnerable because a handful have issues.

Comment 6 Matthew Miller 2013-10-17 02:19:26 UTC
See https://fedorahosted.org/fesco/ticket/1181 and the fesco meeting log. We'd like this to be applied in F20 and also as an update to F19 to go into updates-testing.

I think this probably also could use a release note. Elio, do you have some text for that? On the devel mailing list you note:

> Also, the notes in the Bodhi update should be very clear and explain that
> user that, for reasons of compatibility, needs to opt out of the more
> secure default can do so by setting the environment variable
> NSS_SSL_CBC_RANDOM_IV=0.


Is there anything more to say?

Comment 7 Martin Stransky 2013-10-17 09:51:51 UTC
Please note that this bug is about Firefox. I'll update Firefox/Thunderbird with the BEAST workaround we already have in RHEL:

# BEAST fix (rhbz#838879)
NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV:-1}
export NSS_SSL_CBC_RANDOM_IV

For other packages or default NSS setup please file another bug.

Comment 8 Martin Stransky 2013-10-17 10:10:42 UTC
Actually, the right one is ${NSS_SSL_CBC_RANDOM_IV-1} because we don't want to perform null test.


Note You need to log in before you can comment on or make changes to this bug.