Busted by constraints.
Quoted 8 lines · --- Stephen Smalley
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.
Quoted 5 lines
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.
Quoted 3 lines
I'll make a simple patch to libsepol
and a trivial utility
that does this.
Enjoy. It's pretty pointless.
Casey Schaufler
[email protected]
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Casey Schaufler
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
Quoted 8 lines
(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.
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. However, keep in mind that:
a) keeping a versioned repository of your policies is a good idea independent of this issue,
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.
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.
Quoted 1 line
Enjoy. It's pretty pointless.
To the contrary, it specifically addresses Dan's problem (i.e. being able to quickly determine which part of the policy caused a given denial for application and policy debugging), where he knows what policy he is using at the time of the denial. And it should provide a basis for future work on audit analysis tools, even if we have to make further enhancements to support that functionality fully.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.