Summary

Provide a means for administrators and users to opt into AppArmor confinement in firefox.

Impact

The end-user impact for users in default installations will be non-existent. The firefox package will ship in complain-mode during the development cycle and before release (or at some point in the cycle) be updated to be disabled. Users must opt-in to using the profile and therefore should know that AppArmor confinement could cause firefox to behave unexpectedly.

Rationale

Firefox is one of the most popular desktop applications in Ubuntu and is very popular outside of Ubuntu. It is an attractive target for security research and exploitation, having 58 CVEs patched in last 6 months.

Design

Read-write access to $HOME/.mozilla and explicit deny rules for sensitive files in $HOME, such as $HOME/.ssh. Plugins in Ubuntu should work by default (possibly excepting gnupg). Have commented sections in the profile to allow people to selectively enable certain plugins and addons. but provide a somewhat lenient policy to execute applications in /usr/bin.

Implementation

Binary currently uses version number as part of the path which makes upgrades tricky (eg, /usr/lib/firefox-3.5.1/firefox is confined, then upgrade to /usr/lib/firefox-3.5.2/firefox). To address this:

/usr/lib/firefox-3.5.*/firefox {

Test/Demo Plan

The following tests should be performed:

Future Work

Future work includes, but is not limited to:

Enabling the profile by default

Along with the kernel, Firefox (as a popular browser) is one of the most interesting targets for attackers and vulnerability research and has one of the highest CVE counts of any application in Ubuntu (this is not a reflection of code quality so much as on its ubiquity and impact on users).

The profile's requirements are to protect against:

The profile's intended usability requirements are to work:

The profile as implemented is general enough to meet the intended usability requirements while at the same time meets the security requirements. Please note that the profile is a general purpose profile and may not be strict enough for certain environments.

While the profile does work well for many users as is and in the default Ubuntu installation, there are several roadblocks to rolling it out to all Ubuntu users and Ubuntu derivatives (some of these were discovered after 9.10 was released):

While AppArmor is relatively easy to understand, the profile tools in Ubuntu are CLI, require root access and require a basic knowledge of AppArmor rules syntax. The GUI notifications and tools are required since firefox is a very complex GUI application with disparate use cases. In contrast, these GUI tools were not required for evince (a GUI application which ships an enforcing AppArmor profile by default) because its usage requirements are well-understood and relatively easy to confine.

Proactively protecting Ubuntu users against unknown and future vulnerabilities is why the profile was developed; however, enabling the profile by default has a high risk associated with it. The expectation for default enforcing AppArmor profiles in Ubuntu is that the profile must work for the vast majority of users in the default install, without any intervention on the part of the user. Looking at other operating systems shows that when users are faced with a security mechanism that gets in the way, they turn off the security mechanism rather than fix it. Since some usage scenarios are known to conflict with the security and intended usability requirements of the profile (see the roadblocks, above), GUI tools need to be added and carefully designed to not take away from the desktop experience. Currently, if a user encounters a bug or an intended profile behavior, the desktop user experience is poor and the user might decide to turn AppArmor off entirely, thus decreasing the overall security of the system (since several profiles are enabled in the default installation).

Recommendation

Due to the known limitations of the profile and the high risk associated with enabling it for all users, it is recommended that the profile not be enabled by default at this time. It is important to remember that while the profile may not be turned on by default, Ubuntu is the only major operating system to have an officially-supported MAC configuration for its browser.


CategorySpec

SecurityTeam/Specifications/Karmic/AppArmorFirefoxProfile (last edited 2010-03-21 02:41:39 by pool-71-123-4-188)