From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>
Subject: Re: avc: granted null messages
Date: Tue, 18 Dec 2007 18:46:03 -0500 [thread overview]
Message-ID: <47685BBB.7060308@tycho.nsa.gov> (raw)
In-Reply-To: <1198014552.11568.49.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> If a (buggy) caller passes a requested permission value of zero to
> avc_has_perm, it correctly returns a permission denial (if enforcing),
>
Now I'm questioning why we don't just return success. Doesn't everyone
have permission to do nothing? It seems odd to think that a process
could receive "granted" for a set of permissions A, but "denied" for a
subset of A.
> 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.
>
>
--
Eamon Walsh <ewalsh@tycho.nsa.gov>
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.
next prev parent reply other threads:[~2007-12-18 23:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 21:49 avc: granted null messages Stephen Smalley
2007-12-18 23:46 ` Eamon Walsh [this message]
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
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=47685BBB.7060308@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=sds@tycho.nsa.gov \
--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.