Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was reviewing several different comparison of AppArmor and Selinux which include

From these articles I conclude that AppArmor is better than SELinux based on AppArmor is far less complex and far shorter learning curve. Thus majority of comparsion are in favour of AppArmor but how can i say that AppArmor is more secure than Selinux?

share|improve this question
up vote 15 down vote accepted

These security systems provide tools to isolate applications from each other... and in turn isolate an attacker from the rest of the system when an application is compromised.

SELinux rule sets are incredibly complex but with this complexity you have more control over how processes are isolated. Generating these policies can be automated. A strike against this security system is that its very difficult to independently verify.

AppArmor (and SMACK) is very straight forward. These rule-sets really have to be written by a human, and is just adding another level of file access control (RWX). In Linux everything is a file and this level of control "should be enough". This system is very easy to independently verify.

share|improve this answer
"very difficult" and "very easy" sounds very subjective an answer to me. Besides, I think anyone willing to choose between AA and SELinux should ask themselves if the tools they need have a policy written in either of them, as a starter. Which of the two support namespaces, cgroups, Docker containers? – Steve DL Jul 6 '14 at 17:49
@Steve DL SE Linux is so complex its impossible for even the developers to verify* – rook Jul 30 '14 at 14:48
I'm quite aware of the complexity of SELinux, did research on MAC tools based on it. The only comparative usability study on AA and SELinux is… and it's not without drawbacks (not a population representative of sysadms or CISOs, and applying MAC to programs for which it was never intended). For the context being studied both AA and SELinux are insufficient, and that comes as no surprise. Your answer does not answer the question, and there is not enough fact-based evidence to answer it properly. – Steve DL Jul 30 '14 at 15:09

the insanitybit link is to my website. I'd just like to justify my opinion on here :)

If you look at SELinux and Apparmor, they are both strong and weak in the same ways. SELinux is "stronger" in that it can get even more finely grained access to files, but what does that gain an attacker over being in an apparmor profile? You're already significantly restricted in an apparmor profile. So, do you truly gain much more with SELinux?

What you do gain with SELinux (especially for policy creation, much moreso than auditing - though audit-to-allow is painful too) is added complexity. A lot of it.

The path of least resistance in a Linux sandbox, such as SELinux or Apparmor, is the kernel. SELinux does nothing more than Apparmor to secure the kernel.

So if an attacker wants to go the stupid route of going for design issues in Apparmor/SELinux, SELinux is potentially more secure - but that assumes the profiles are built well, and, since SELinux is so complex, we've actually seen vulnerabilties introduced with it.

If an attacker is smart they'll go for the kernel, bypassing both.

So they are both weak in the same ways, both strong in every way that matters, and one of them is MUCH simpler.


The butterknife metaphor doesn't work, that should be obvious.

share|improve this answer
Since you're pointing the kernel as the "weak point", maybe it's worth mentioning GrSecurity. – Xaqq Apr 1 '14 at 17:44
Yes, I've written quite a bit about Grsecurity on my website. No Linux system aiming for security is complete without it, and no one should rely on MAC without first addressing kernel weaknesses. – IBit Apr 3 '14 at 5:08

The whole point of mandatory access control is to allow fine grained configuration. Simplicity is completely irrelevant unless the two are equal on all other counts. Sometimes complexity is what it takes to get the job done.

As it happens, SELinux has much better granularity, is more mature, more widely deployed and in my subjective opinion, better engineered. Your conclusion is more like pop culture than a real assessment.

(I conclude that a butter knife is better than a chainsaw, based on a butter knife is far less complex and less dangerous)

share|improve this answer
A butter knife is better than a chainsaw... until you have to cut down a tree! – Michael Hampton Oct 18 '13 at 0:50

In general, you cannot say that appArmor is better than SELinux. This is because a lot depends on what it is you are securing and what you are securing against and on the individual skills and preferences of the person/people responsible for maintaining the system.

SELinux has greater fine grained control. In some situations, this would make it more appropriate than AppArmor. On the other hand, AppArmor is likely to be sufficiently powerful for a majority of Linux users. Furthermore, many report that it is easier to understand and use, which means it is less likely that errors in configuration will cause dangerous holes that are difficult to find. On the other hand, making someone who is comfortable and familiar with SELinux use AppArmor could easly result in configuration errors simply because it is not the system they know.

The point is, you need to evaluate based on the specific situation and the skill sets/preferences of those involved. Both are good systems - it is choosing the right tool for the right situation that matters, not which is better than the other.

share|improve this answer

AppArmor is more secure through its simplicity which makes it easier to review and validate policies. Mistakes are less likely to make, easier to spot, and a backdoor attempt is harder to disguise.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.