All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <brindle@quarksecurity.com>
To: Dominick Grift <dominick.grift@gmail.com>
Cc: 'selinux' <selinux@tycho.nsa.gov>
Subject: Re: do user space object managers really provide mandatory access control
Date: Mon, 28 Jul 2014 07:00:27 -0400	[thread overview]
Message-ID: <53D62D4B.3080402@quarksecurity.com> (raw)
In-Reply-To: <1406544263.850.11.camel@x220.localdomain>

Dominick Grift wrote:
> On Mon, 2014-07-28 at 11:13 +0200, Andy Warner wrote:
>> MAC is usually defined as not being discretionary (it is mandatory). That
>> is, the enforcement of the policy is not at the discretion of a user or
>> owner. In my experience it is not defined as "being enforced by the kernel."
>> Generally MAC also implies (and sometimes demands) implementation principles
>> like encapsulation and non-bypassibility, which a kernel based
>> implementation might satisfy, but it is not a requirement of MAC to be
>> implemented in the kernel.
>>
>
> Thank you. I should rephrase "if one defines" to "when one defines"
>

One should not define MAC that way. MAC has nothing to do with where it 
is implemented. The original FLASK implementation [1] was actually 
implemented on a microkernel so most of the access control was in userspace.

[1] http://www.cs.utah.edu/flux/fluke/html/index.html

> I wonder whether the SELinux object manager related code implements any
> meaningful implementation principles like encapsulation,
> non-bypassibility, or others.
>

Insomuch as the policies prevent other, non-enforcing, applications from 
accessing the data, then yes. If the SELinux kernel objects that 
encapsulate SEPostgreSQL objects are only accessible by SEPostgreSQL 
then SEPostgreSQL can completely arbitrate access to its objects (rows, 
tables, etc) that the kernel does not know about.

>> I work in MAC based DBMS's which from your perspective could just be
>> considered an application layer, but it is implementing real MAC.  One
>> reason it cannot be totally implemented in the kernel is that the MAC is
>> arbitrating access to non-OS objects, such as database rows, tables, etc.
>> The DBMS can cooperate with the kernel and use the kernel for MAC based
>> decisions (if the MAC policy objectives are the same) but it cannot be
>> totally implemented in the kernel. At least, not without lots of tricky
>> theoretical work, which was my research topic years ago in grad school.
>> Enforcement of the policy is a key difficult issue.
>
> Depending on the answer to my question above that might beg the question
> then: why not implement a security server, and cache in the user space
> object manager itself. Although i think i know the answer to that
> question in advance: to facilitate centralized government of the policy
> rather than having that scattered all over.
>

You can. There was even a userspace security server project a few years 
back.

> All-in-all it sound like a lot of compromise.
>

Try getting Linus to let in patches that let the kernel understand 
database rows and tables for the sake of security and you'll quickly 
find that it is not a compromise, but the only practical answer.

> What, other than providing a central place of governance, would be the
> benefits of SELinux user space object managers, over any other "MAC"
> solutions implemented solely in the user space c.q. application layer?
>

You got it. The flask architecture is decide in one place, enforce 
everywhere else. Just because an object owner is in userspace does not 
make it fundamentally different from an object owner in the kernel. Who 
owns the objects should be enforcing access control. If all your 
filesystems were actually userspace processes, would it not make sense 
for them to still enforce access to files?

One practical benefit is the ability to get an active policy from the 
security server and run analysis on it. Granted you need to understand 
how object managers interact - this goes for kernel too. If you can 
access block devices directly then filesystem object managers can be 
bypassed. The policy needs to take that into account, and an analyst 
needs to understand it.

  reply	other threads:[~2014-07-28 11:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28  8:33 do user space object managers really provide mandatory access control Dominick Grift
2014-07-28  9:13 ` Andy Warner
2014-07-28 10:44   ` Dominick Grift
2014-07-28 11:00     ` Joshua Brindle [this message]
2014-07-28 11:07     ` Andy Warner
2014-07-28 11:28       ` Dominick Grift
2014-07-28 12:01       ` Dominick Grift
2014-07-28 14:33     ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D62D4B.3080402@quarksecurity.com \
    --to=brindle@quarksecurity.com \
    --cc=dominick.grift@gmail.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.