From: Stephen Smalley <sds@tycho.nsa.gov>
To: James Morris <jmorris@namei.org>
Cc: Hasan Rezaul-CHR010 <CHR010@motorola.com>,
selinux@tycho.nsa.gov, Eric Paris <eparis@parisplace.org>
Subject: Re: Avc denies while running in Permissive mode...
Date: Thu, 18 Dec 2008 08:57:31 -0500 [thread overview]
Message-ID: <1229608651.27670.14.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LRH.1.10.0812181525050.30403@tundra.namei.org>
On Thu, 2008-12-18 at 15:30 +1100, James Morris wrote:
> On Wed, 17 Dec 2008, Stephen Smalley wrote:
>
> > In permissive mode, when a permission would be denied for a given
> > (source context, target context, target class) triple for the first
> > time, the kernel audits the denial (avc: denied) and then adds that
> > permission to the allowed vector for that triple in the AVC (access
> > vector cache). Thus, subsequent uses of that same permission on that
> > same triple will not trigger further denials until the cache entry is
> > evicted from the cache (which can happen automatically if we need to
> > free up space for use by other entries or explicitly upon either a
> > policy reload or changing a policy boolean).
>
> What about adding a kernel option (say, selinux_permissive_debug), which
> causes the permission update to be bypassed, but still allows the
> operation?
>
> Something like:
>
> int avc_has_perm_noaudit(...)
> {
>
> ...
>
> if (denied) {
> if (flags & AVC_STRICT)
> rc = -EACCES;
> else if (!selinux_enforcing || security_permissive_sid(ssid))
> if (!selinux_permissive_debug)
> avc_update_node(AVC_CALLBACK_GRANT, requested, ssid,
> tsid, tclass);
> else
> rc = -EACCES;
> }
>
> ...
> }
Yes, that was what I had in mind, although Eric seems to think we can
get by via existing auditallow and/or syscall audit mechanisms.
Such an option could have its initial value specified via kernel config
or via boot parameter (so that one can boot a kernel in this state
initially and collect all avc messages in permissive) and the value
could subsequently be changed via a new selinuxfs node.
--
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.
next prev parent reply other threads:[~2008-12-18 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 23:31 [PATCH] SELinux: open perms on sockets, AF_UNIX Eric Paris
2008-12-09 23:47 ` James Morris
2008-12-10 13:33 ` Stephen Smalley
2008-12-10 14:05 ` Eric Paris
2008-12-10 16:10 ` Daniel J Walsh
2008-12-17 17:08 ` Avc denies while running in Permissive mode Hasan Rezaul-CHR010
2008-12-17 17:42 ` Stephen Smalley
2008-12-17 17:54 ` Eric Paris
2008-12-17 18:00 ` Eric Paris
2008-12-18 4:30 ` James Morris
2008-12-18 13:57 ` Stephen Smalley [this message]
2008-12-18 16:21 ` Eric Paris
2008-12-18 16:26 ` Stephen Smalley
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=1229608651.27670.14.camel@localhost.localdomain \
--to=sds@tycho.nsa.gov \
--cc=CHR010@motorola.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--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.