From: Eric Paris <eparis@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>,
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 11:21:49 -0500 [thread overview]
Message-ID: <1229617309.3384.62.camel@localhost.localdomain> (raw)
In-Reply-To: <1229608651.27670.14.camel@localhost.localdomain>
On Thu, 2008-12-18 at 08:57 -0500, Stephen Smalley wrote:
> 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.
The only point of this new impossible to find and twittle flag would be
to get notification of what would have been denied. I think I gave 2
ways to get such notification and you already get one "correct" denial
which audit2allow will be able to translate. What tools really
differentiate between one denial and 1000? Setroubleshoot I guess sorta
does...
I know in the past I've wished something like this flag was present, so
I'm not going to stand in the way, but it seems to me like one can
already get the info and we are just cluttering the kernel code so we
can get the same info another way....
-Eric
--
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 16:21 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
2008-12-18 16:21 ` Eric Paris [this message]
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=1229617309.3384.62.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=CHR010@motorola.com \
--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.