Share Next Entry
Linux fragmentation - a view from the Security community
Some History
I have lived the Unix wars over the past 20 years. I worked on Project
Athena back at Digital Equipment (DEC) in the late 1980's and remember
all the effort that it took to make it work on multiple UNIX versions.

We had the best technology at the time. MIT and DEC had awesome
technology including instant messaging (Zephyr), security (Kerberos),
distributed management (Moira), secure file systems with Kerberized NFS
and AFS, shared name service via DNS and Hesiod, and a network windowing
system (X). You could walk up to any machine and log in and have the
same environment. We had single sign-on. We had universities working on
the product. It was a perfect system. But then we decided it need to run
on multiple different Unixes. We spent untold dollars making it work.
The problem was instead of improving the overall product, we spent all
of our time dealing with differences between the platforms. During this
time Microsoft was developing NT group-ware products and ended up
blowing us out of the water. The Unix wars had destroyed a great

Linux consistency refocuses Unix developers
After a few years of working on Microsoft platforms for managing
security infrastructure on Unix and Non-Unix platforms, I came to Linux.
Linux seemed to have corrected the problems of the UNIX wars. It was
community based, all vendors shared the same code and worked together to
build a common platform. Sure, there were multiple competing layered
products, but almost all could run on all the different distributions.
Third party vendors could fairly easily build to a single API and it
worked on everyone's Linux.

Three years ago, I was asked to work on the SELinux Team at Red Hat to
bring Mandatory Access Control to a mainstream operating system (OS).
MAC had been attempted before but had always failed or became a one-off
OS. OS vendors would ship the primary OS and then a "Trusted" version.
This "Trusted" version would quickly become out of date as the main
development efforts would always go into the primary OS and eventually
be ported to the "Trusted" version.

With SELinux we decided we could do both at the same time, using the
Open Source method, we could get multiple companies, and customers
working on it. We had some stumbles along the way, but through the use
of the Fedora Core collaborative development process we came up with a
single OS that uses MAC and handles everything from your laptop to a the
highest levels of security specified by government.

Today we have great technology. We have many companies and government
organizations collaboratively working on SELinux together, including Red
Hat, IBM, HP, NSA, DOD, Tresys, Trusted Computing Systems. We have a
significant open source community built around SELinux, colleges and
universities contributing and doing experiments with it. We have
multiple distributions shipping with SELinux including Fedora Core
(2,3,4 and soon 5), Red Hat Enterprise Linux 4, Gentoo, Debian, Ubuntu,
Suse and Slackware.

Security Deja Vu
Everything seems to be going great, but ... Novell, who last year
claimed to be the first Linux distribution to ship with SELinux
technology, suddenly announced that they are dropping support for it. To
replace it, they bought a product called AppArmor and are now asking
third party developers to use it instead of SELinux. Is this the
beginning of the Unix wars all over again?

Not only is AppArmor divergent from upstream/community, but it is also not
suitable as a real alternative to SELinux, because it lacks the flexibility
and scalability of SELinux to address the full range of security concerns,
and its limitations are not just in implementation but architectural.

Novell claims that AppArmor is easier to use for third parties. But now
users and developers have to choose one or the other mechanism for
providing MAC, and ignore the other platform's security mechanism. Or do
twice as much work, to support both. Think back to the Project Athena
example. Is this easier? Couldn't Novell have spent their money on
making SELinux easier to use? No, Novel chooses to split the user and
developer community. I am not sure what their goals are, but I feel this
hurts Linux and the open source movement. The community has now gotten
SELinux to the point where "easier" is coming, but built upon a solid

My fear now is that the Linux OS community has given application
developers an excuse to support neither security infrastructure, because
supporting either of them would prevent their product from running in
the other environment. So, for a developer, supporting neither SELinux
or AppArmor is the cheapest alternative, and maximizes the potential
customer base.

Instead of leveraging collaborative open source development to make
Linux the most secure operating system in the world, the now fragmented
Linux security community will be doing battle over who has the prettier
GUI. And the ISV community will ignore us.

The best outcome would be to have Novell work with the SELinux/open source
community to bring the benefits of AppArmor to the architecture/infrastucture
that is SELinux. This collaboration would benefit the entire Linux community.

My blog was about how Novell did not work with the community and I believe has hurt Linux development.
I did not intend it to be a point by point comparison of AppArmor and SELinux. But I will respond just
this once to some of the points.

- Interesting that comments made by me at the first SELinux conference are brought up, somewhat out of
context. Basically what I said is that in Fedora Core 2 we tried to use strict policy, which was
difficult to use because it tried to control user space and users wanted to setup their systems in a
many different ways. So the Open Source community told us they were not ready for such a drastic change.
We worked with the user community and the open source community. Together we decided what we needed was
to select a few "targets" to lock down and prove the technology and came up with targeted policy. This
proved the flexibility of SELinux and allowed us to ship SELinux turned on by default with FC3, FC4
and RHEL4.

- Any paradigm shift takes time for adoption, and SELinux/MAC is a paradigm shift in security, but one
that is necessary to make real progress in securing systems and one that gives enough flexibility to
permit people to gradually ease into it (ala RHEL4's targeted policy).

- AppArmor is not more flexible than SELinux. It controls based on fewer inputs (program/pathname),
controls fewer objects and fewer operations, and doesn't support entire classes of security policies
that are handled by SELinux.

- Through the use of SELinux, we have found potential security problems in many different applications.
This has allowed us to tighten security on applications whether SELinux is enabled or not. We have
removed many leaked file descriptors, We have worked with partners to remove unnecessary requirements
for execution of the memory stack using the execmod, execstack, execmem, execheap access checks.
We have worked with Open Source application developers to design and build better applications, to allow
SELinux to better protect their applications.

- SELinux policy can be modified on the fly without re-starting a "contained" process; you only have to
re-start the process if you are changing what domain you are putting it into (vs. just changing some
allow rules), and AppArmor is no different in that respect. Further, SELinux has runtime booleans which
AppArmor lacks. Booleans allows an administrator to change the way policy an application is allowed to
run without having to write policy. So if you want to turn off the ability for apache to run cgi scripts,
you simply set a boolean rather than having to change a line of policy.

- SELinux also supports dynamic context transitions, so we can create an Apache module that switches
domains for PHP scripts. We favor exec-based transitions because they are more "secure" (stronger
boundaries between domains, real control over the code executed in the new domain), but SELinux has the
flexibility to support it.

- Our goal is to give administrators choices of how they want to run their system, without forcing them
to write policies.

- The fact that "AppArmor doesn't require the developer to support AppArmor" is an indictment of AppArmor
not providing real security. Ultimately, applications have to be involved in providing higher level
security guarantees, and they need some awareness of the underlying security model. SELinux provides
the infrastructure and APIs for such applications.

- Open Source means more than just dumping code over the fence with a suitable license; it has connotations
of community and upstream, which SELinux has had since 2000, vs. AppArmor's recent entry.

- Alternatives are good, but I question at what level. If major distributions of Linux were suddenly to
choose a new C compiler and runtime, such that applications built for one platform would not run on the
other, that would not be a good Alternative for Linux as a whole. KDE versus Gnome is a decent alternative,
an alternative to XWindows that did not work with X Apps would not be a good alternative.

No HTML allowed in subject


(will be screened)


Log in