All of lore.kernel.org
 help / color / mirror / Atom feed
* avc:  granted null messages
@ 2007-12-18 21:49 Stephen Smalley
  2007-12-18 23:46 ` Eamon Walsh
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Smalley @ 2007-12-18 21:49 UTC (permalink / raw)
  To: selinux; +Cc: Eamon Walsh, James Morris, Eric Paris

If a (buggy) caller passes a requested permission value of zero to
avc_has_perm, it correctly returns a permission denial (if enforcing),
but avc_audit will report it as a granted message with a "null" access
vector (also if enforcing) due to the way in which avc_audit checks for
the denied case.  This was reported for nscd in
https://bugzilla.redhat.com/show_bug.cgi?id=352601,
but applies to both the libselinux AVC and the kernel AVC.

In permissive mode, avc_has_perm permits the operation, and avc_audit
reports nothing at all.

So the question is how do we want to handle this case?

It is a bug in the caller, but making it a BUG_ON() in the kernel and an
assert() in libselinux doesn't seem very graceful, especially if in
permissive mode.

We could easily adjust avc_audit() to report it as a denied message with
a 'null' access vector, although running audit2allow on that output will
yield a broken policy module.

-- 
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

end of thread, other threads:[~2007-12-20 23:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 21:49 avc: granted null messages Stephen Smalley
2007-12-18 23:46 ` Eamon Walsh
2007-12-19  0:09   ` James Morris
2007-12-19 16:15     ` Stephen Smalley
2007-12-19 16:36       ` Stephen Smalley
2007-12-20 22:20         ` Eamon Walsh
2007-12-20 22:42           ` Stephen Smalley
2007-12-20 23:31             ` Eamon Walsh

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.