From: Steve Grubb <sgrubb@redhat.com>
To: Paul Moore <paul@paul-moore.com>
Cc: LSM <linux-security-module@vger.kernel.org>,
Linux Audit <linux-audit@redhat.com>
Subject: Re: Differentiating audit rules in an LSM stack
Date: Tue, 02 Jan 2018 10:48:40 -0500 [thread overview]
Message-ID: <2471440.Usxef9eJXA@x2> (raw)
In-Reply-To: <CAHC9VhTDepkZ=073kuP25Jz-XAh4aK94tBb8tNGjxdz6c-1EPA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2313 bytes --]
On Friday, December 22, 2017 4:02:41 PM EST Paul Moore wrote:
> On Fri, Dec 22, 2017 at 3:01 PM, Casey Schaufler <casey@schaufler-ca.com>
wrote:
> > The audit rule field types AUDIT_SUBJ_* and AUDIT_OBJ_* are
> > defined generically and used by both SELinux and Smack to identify
> > fields that are interesting to them. If SELinux and Smack are running
> > concurrently both modules will identify audit rules as theirs if
> > either has requested the field. Before I go off and create a clever
> > solution I think it wise to ask if anyone has thought about or has
> > strong opinions on how best to address this unfortunate situation.
> >
> > We know that SELinux and Smack together is not an especially
> > interesting configuration. It is, however, a grand test case for
> > generality of the solution. Any module that wanted to audit fields
> > that are defined generically will have this sort of problem.
>
> I think the biggest concern here is going to be what Steve's audit
> userspace will tolerate. I might suggest simply duplicating the
> fields for each LSM that is running, e.g. "subj=<selinux_label>
> subj=<smack_label> subj=<lsmX_label> ...", but I have no idea if
> Steve's userspace can handle multiple instances of the same field in a
> single record.
That would be bad in general because we have a field dictionary that defines the
value side of the field=value. Another alternative might be to prepend an lsm
specific abbreviation? This keeps the field dictionary correct.
I originally thought we were talking about AVC's and reusing the same record type
for the different LSM's. That would be simple to fix by just adding a "lsm=x" field at
the beginning.
But if we are talking about each and every syscall or path record, I think this will
make things ugly fast. I'd prefer prepending an identifier to the field name so that
we can do LSM specific reporting. I have never seen or heard of a system that has a
subject or object with multiple labels. We don't even include supplemental groups in
syscall records and that is usually pretty important information.
> My initial thinking is that adding LSM-specific subj/obj fields would
> be a mistake.
How so? If someone wanted a selinux specific report, how else would you detangle
which representation is selinux's?
-Steve
[-- Attachment #1.2: Type: text/html, Size: 7649 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2018-01-02 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 20:01 Differentiating audit rules in an LSM stack Casey Schaufler
2017-12-22 21:02 ` Paul Moore
2018-01-02 15:48 ` Steve Grubb [this message]
2018-01-02 17:05 ` Casey Schaufler
2018-01-02 17:20 ` Casey Schaufler
2018-01-02 15:35 ` Steve Grubb
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=2471440.Usxef9eJXA@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).