Skip to contentSkip to conversation

audit2allow and mls

DISCUSSION Rosalie Hiebel 2 participants 4 messages Feb 2, 2007 – Feb 6, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

Is there version of audit2allow which is capable of generating rules specific to the mls policy? I see that audit2allow's tests for mls (calling get_mls_flag), but this is after the rules in the .te file have been generated.

--
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.

#1 lore raw
Quoted 4 lines · Rosalie Hiebel

Is there version of audit2allow which is capable of generating rules specific to the mls policy? I see that audit2allow's tests for mls (calling get_mls_flag),
but this is after the rules in the .te file have been generated.

Not presently. Ideally, audit2allow could check whether the denial was caused by a constraint (as done by audit2why via libsepol) and then try to determine a type attribute that could be used as an override, and then call the appropriate refpolicy interface to add that attribute to the domain.

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.
#2 lore raw
Quoted 7 lines · Rosalie Hiebel
Quoted 5 lines

Is there version of audit2allow which is capable of generating
rules specific
to the mls policy? I see that audit2allow's tests for mls (calling get_mls_flag),
but this is after the rules in the .te file have been generated.

Quoted 5 lines

Not presently. Ideally, audit2allow could check whether the denial was caused by a constraint (as done by audit2why via libsepol) and then try to determine a type attribute that could be used as an override, and then call the appropriate refpolicy interface to add that attribute to the domain.

Do you mean that audit2why does check the constrain rules in mls policy ?

Quoted 9 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.

--
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.

#3 lore raw
Quoted 7 lines · Rosalie Hiebel
Quoted 7 lines · Rosalie Hiebel
Quoted 5 lines

Is there version of audit2allow which is capable of generating
rules specific
to the mls policy? I see that audit2allow's tests for mls (calling get_mls_flag),
but this is after the rules in the .te file have been generated.

Quoted 7 lines
Quoted 5 lines

Not presently. Ideally, audit2allow could check whether the denial was caused by a constraint (as done by audit2why via libsepol) and then try to determine a type attribute that could be used as an override, and then call the appropriate refpolicy interface to add that attribute to the domain.

Do you mean that audit2why does check the constrain rules in mls policy ?

audit2why effectively re-plays the permission check (via libsepol) to determine the underlying cause for the permission denial, whether it is due to a missing or disabled TE rule, a constraint violation (which could be any constraint, MLS or otherwise), or a missing role allow rule. It doesn't generate policy but just tries to diagnose the cause. It was a quick hack in response to frequent complaints from Dan Walsh that he wanted a way to quickly see whether a denial was caused by something other than missing TE rules.

A smarter audit2why would go further in its diagnosis, e.g.:
- if the cause is a missing or disable TE rule, check whether the necessary TE rule is present in a disabled conditional block and identify the boolean required to activate it,
- if the cause is a constraint violation, display the actual constraint, and identify the type attribute that can be used to override it (heuristic, as there is no guarantee of such an override)

And it would be linked into policy generation such that once the cause was determined, it could immediately generate suitable policy.

These sorts of improvements may become more feasible with the ongoing work by Karl on a sepolgen python library for policy generation and his reworking of the libsepol policy representation.

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.