All of lore.kernel.org
 help / color / mirror / Atom feed
* Busted by constraints.
@ 2005-05-12 14:32 Daniel J Walsh
  2005-05-12 14:30 ` Stephen Smalley
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel J Walsh @ 2005-05-12 14:32 UTC (permalink / raw)
  To: Stephen Smalley, SE Linux

Auditing of constraint failures sucks.  We are putting out incorrect 
error messages.  Or at least not informative enough to help the 
user/policy writer to figure out what is wrong.

Yesterday,  Another engineer and I spent a lot of time trying to figure 
out why setfscreatecon was failing.  The only indication was the the
application was not allowed to created a directory.  Of course the allow 
rule was present in the policy.  Eventually we figured out we needed
the privowner priv to get by a constraint.    Shouldn't the kernel be 
reporting a constraint failure.  Isn't this going to become a lot more
important with MLS?

Dan

-- 



--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: Busted by constraints.
@ 2005-05-12 20:37 Casey Schaufler
  2005-05-13 11:16 ` Stephen Smalley
  0 siblings, 1 reply; 18+ messages in thread
From: Casey Schaufler @ 2005-05-12 20:37 UTC (permalink / raw)
  To: SE Linux


--- Stephen Smalley <sds@tycho.nsa.gov> wrote:


> But nothing prevents you from creating a simple tool
> linked against
> libsepol that takes an avc denial and determines
> which part of the
> policy caused it.

I seriously doubt this would be a "simple" tool.
Two months after the event are you absolutely sure
you are going to have all the information you need
to reconstruct the policy and file system context
that was in force at the time of a particular
access attempt?

One of the first MLS systems (System V/MLS)
did reconstructive audit. The experience of
that system lead all of the Unix vendors after
to use schemes that created individual records
that include all interesting information.

I disagree with your assessment that it's easier
to do this is user space after the fact than in
the kernel as the action happens.


Casey Schaufler
casey@schaufler-ca.com


		
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: Busted by constraints.
@ 2005-05-13 15:10 Casey Schaufler
  2005-05-13 15:20 ` Stephen Smalley
  0 siblings, 1 reply; 18+ messages in thread
From: Casey Schaufler @ 2005-05-13 15:10 UTC (permalink / raw)
  To: SE Linux


--- Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Thu, 2005-05-12 at 13:37 -0700, Casey Schaufler
> wrote:

> Everything we need to reproduce the denial is
> included in the audit
> message (i.e. the relevant security contexts and
> object information)
> except for the policy itself.

Yup.

> So all you need is
> the audit log and the
> policy that was in effect at the time, and you can
> reproduce the
> computation.

So where is the policy-in-effect stored?
Certainly you're not going to suggest using
the policy source file that happens to be there
at the time of analysis. That policy file
(actually, that set of policy files soon)
may bear little resemblence to the policy
that was in force at the time the event
occured. Even if you're talking about the
policy file at the time of collection
there is real risk that the content of the
policy file does not match what the kernel
is enforcing.

> I'll make a simple patch to libsepol
> and a trivial utility
> that does this.

Enjoy. It's pretty pointless.


Casey Schaufler
casey@schaufler-ca.com


		
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: Busted by constraints.
@ 2005-05-13 15:56 Casey Schaufler
  0 siblings, 0 replies; 18+ messages in thread
From: Casey Schaufler @ 2005-05-13 15:56 UTC (permalink / raw)
  To: Stephen Smalley, Casey Schaufler; +Cc: SE Linux


--- Stephen Smalley <sds@tycho.nsa.gov> wrote:

 
> audit2why/libsepol actually acts on the binary
> policy file, and libsepol
> has the same policy engine code as the kernel, but I
> understand your
> concern about matching up with the policy that was
> in effect at the time
> of the denial.

Since the policy is a variable in the security
lattice it needs to be included in the audit 
information.

> However, keep in mind that:
> a) keeping a versioned repository of your policies
> is a good idea
> independent of this issue,

Sure, just as versioned repositories of your
users and system installation is a good idea.

> b) we are only trying to identify what component of
> the policy caused a
> denial (e.g. Type Enforcement, RBAC, or constraint),
> and this is not
> likely to be highly variable across policy
> changes/upgrades for a given
> denial.

The likelyhood of change does not discount the
threat of change.

> It might be useful if the kernel audit messages
> included some kind of
> policy identifier / hash that could be used in
> correlating against a
> versioned repository of policies.   That wouldn't be
> difficult.

Your audit message should explicitly identify
what policy resulted in any failure.
 
> > Enjoy. It's pretty pointless.
> 
> To the contrary, it specifically addresses Dan's
> problem

OKay, it's a valuable debug tool until such
time as you repair the audit records.


Casey Schaufler
casey@schaufler-ca.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-05-17 12:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 14:32 Busted by constraints Daniel J Walsh
2005-05-12 14:30 ` Stephen Smalley
2005-05-12 14:46   ` Daniel J Walsh
2005-05-13 15:00     ` Stephen Smalley
2005-05-13 19:30       ` Stephen Smalley
2005-05-13 20:00         ` Stephen Smalley
2005-05-16 18:44       ` Stephen Smalley
2005-05-16 22:00         ` Daniel J Walsh
2005-05-17 11:39           ` Stephen Smalley
2005-05-17 11:50             ` Stephen Smalley
2005-05-17 12:41             ` Daniel J Walsh
2005-05-17 12:05           ` Stephen Smalley
2005-05-13 15:35   ` Stephen Smalley
  -- strict thread matches above, loose matches on Subject: below --
2005-05-12 20:37 Casey Schaufler
2005-05-13 11:16 ` Stephen Smalley
2005-05-13 15:10 Casey Schaufler
2005-05-13 15:20 ` Stephen Smalley
2005-05-13 15:56 Casey Schaufler

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.