Re: AppArmor FAQ

Stephen Smalley
2007-04-19T17:39:22Z

On Thu, 2007-04-19 at 16:35 +0000, David Wagner wrote:
> James Morris wrote:
> >On Wed, 18 Apr 2007, Crispin Cowan wrote:
> >> How is it that you think a buffer overflow in httpd could allow an
> >> attacker to break out of an AppArmor profile?
> >
> >Because you can change the behavior of the application and then bypass
> >policy entirely by utilizing any mechanism other than direct filesystem
> >access: IPC, shared memory, Unix domain sockets, local IP networking,
> >remote networking etc.
>
> Any halfway decent jail will let you control access to all of those
> things, thereby preventing an 0wned httpd from breaking out of the jail.
> (For instance, Janus did. So does Systrace.)
>
> Are you saying AppArmor does not allow that kind of control? Specifics
> would be useful.

Just look at their code and their own description of AppArmor. It does
not provide that level of control, and by your own metric, it is thus
not a halfway decent jail. Which begs the question - if that is the
kind of approach you want, why not use a real jail/containers mechanism
for it?

> >Also worth noting here is that you have to consider any limited
> >environment as enforcing security policy, and thus its configuration
> >becomes an additional component of security policy.
>
> I don't understand what you are saying. Yes, the AppArmor policy
> file is part of policy. Is that what you mean?

I think he means the dependencies on which AppArmor relies, not just its
policy, e.g. since it is name-based, it presumes the filesystem
namespace has been set up by a trusted agent and is correct.

--
Stephen Smalley
National Security Agency