public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Tyler Hicks <tyhicks@canonical.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: wpreston@suse.com, seth.arnold@canonical.com, linux-audit@redhat.com
Subject: Re: [PATCH] userspace: audit: ausearch doesn't return entries for AppArmor events that exist in the log
Date: Thu, 29 May 2014 17:15:53 +0200	[thread overview]
Message-ID: <20140529151553.GA12950@boyd> (raw)
In-Reply-To: <1848635.5JdHFUO0Yd@x2>


[-- Attachment #1.1: Type: text/plain, Size: 3377 bytes --]

On 2014-05-29 11:01:38, Steve Grubb wrote:
> On Thursday, May 29, 2014 10:31:52 AM Tyler Hicks wrote:
> > On 2014-05-28 15:33:06, Tony Jones wrote:
> > > This patch came from our L3 department.  AppArmor LSM is logging using the
> > > common_lsm_audit() call but the audit userspace parsing code expects to
> > > see an SELinux tclass field. This patch doesn't address the lack of
> > > support for AppArmor in "aureport --avc".  Talking to Seth Arnold,
> > > Canonical apparently has patches for this; if this is true perhaps they
> > > can post for inclusion.
> > Making the audit tools work with AppArmor generated events has been on
> > my todo list for quite a while, but no patches exist.
> > 
> > I'm surprised that this patch makes ausearch work correctly for AppArmor
> > AVC events. The first thing that parse_avc() does is look for the
> > "avc: " term in the AVCs that SELinux generates. AppArmor's AVCs don't
> > include that string, so an.avc_result and an.avc_perm would not be set,
> > would they?
> 
> I have a feeling a whole lot of testing is needed for apparmor, smack, tomoyo, 
> or any other LSM besides SE Linux. (Maybe they work fine? I don't know.) 
> Ausearch/report, auparse, and auvirt would all need updating. I'd also suggest 
> sending patches to the ausearch test suite so that it can verify correctness 
> of finding events. 

Agreed. It felt to me like it would be a more work than just updating
parse_avc() to gain full support for other LSMs.

In addition, updating the ausearch test suite is a no-brainer so that
you can easily test with non-SELinux events.

With that said, I don't think these things should be prereqs for
Tony's patch being merged.

> One last area, perhaps the prelude plugin might need some updating as
> well....but then again the prelude project kind of died any ways.

I'm not really familiar with prelude, but I'll keep it in mind.

Tyler

> 
> -Steve
> 
> 
> > > Based-on-work-by: William Preston <wpreston@suse.com>
> > > Signed-off-by: Tony Jones <tonyj@suse.de>
> > > 
> > > --- a/src/ausearch-parse.c      2014-05-21 14:45:22.000000000 +0200
> > > +++ b/src/ausearch-parse.c      2014-05-21 14:53:55.000000000 +0200
> > > @@ -1735,17 +1735,15 @@ static int parse_avc(const lnode *n, sea
> > > 
> > >         // Now get the class...its at the end, so we do things different
> > >         str = strstr(term, "tclass=");
> > > 
> > > -       if (str == NULL) {
> > > -               rc = 9;
> > > -               goto err;
> > > +       if (str) {
> > > +               str += 7;
> > > +               term = strchr(str, ' ');
> > > +               if (term)
> > > +                       *term = 0;
> > > +               an.avc_class = strdup(str);
> > > +               if (term)
> > > +                       *term = ' ';
> > > 
> > >         }
> > > 
> > > -       str += 7;
> > > -       term = strchr(str, ' ');
> > > -       if (term)
> > > -               *term = 0;
> > > -       an.avc_class = strdup(str);
> > > -       if (term)
> > > -               *term = ' ';
> > > 
> > >         if (audit_avc_init(s) == 0) {
> > >         
> > >                 alist_append(s->avc, &an);
> > > 
> > > --
> > > Linux-audit mailing list
> > > Linux-audit@redhat.com
> > > https://www.redhat.com/mailman/listinfo/linux-audit
> 

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-05-29 15:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 22:33 [PATCH] userspace: audit: ausearch doesn't return entries for AppArmor events that exist in the log Tony Jones
2014-05-29  8:31 ` Tyler Hicks
2014-05-29 15:01   ` Steve Grubb
2014-05-29 15:15     ` Tyler Hicks [this message]
2014-06-03  1:00   ` Tony Jones
2014-06-03 14:47     ` Steve Grubb
2014-06-03 16:34       ` Tony Jones
2014-05-29 15:21 ` Tyler Hicks
2014-05-30 19:53 ` Steve Grubb
2014-05-30 20:16   ` Tyler Hicks
2014-05-30 21:00     ` Steve Grubb
2014-05-31  0:01       ` Tony Jones
2014-06-06 18:46       ` Tyler Hicks
2014-06-06 21:10         ` Tyler Hicks
2014-06-24  0:06           ` Tony Jones
2014-06-24 15:34             ` Eric Paris
  -- strict thread matches above, loose matches on Subject: below --
2016-04-29  7:03 Vincas Dargis
2016-04-29 13:39 ` Steve Grubb
2016-04-29 16:07   ` Vincas Dargis
2016-04-29 16:30     ` Steve Grubb
2016-05-02 21:18       ` Paul Moore
2016-04-29 15:41 ` Richard Guy Briggs
2016-04-29 16:58   ` Vincas Dargis

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=20140529151553.GA12950@boyd \
    --to=tyhicks@canonical.com \
    --cc=linux-audit@redhat.com \
    --cc=seth.arnold@canonical.com \
    --cc=sgrubb@redhat.com \
    --cc=wpreston@suse.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