All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: Linux-Audit Mailing List <linux-audit@redhat.com>
Cc: Richard Guy Briggs <rgb@redhat.com>
Subject: Question about audit_filter_rules
Date: Wed, 16 May 2018 08:57:09 +0200	[thread overview]
Message-ID: <CAFqZXNvNscyn4d7y0wJH-=NMNit=xQ5R_-buT1Lzc+r87FrHng@mail.gmail.com> (raw)

Hi,

I noticed this suspicious line in the definition of the
audit_filter_rules function in auditsc.c:

[...]
case AUDIT_SESSIONID:
        sessionid = audit_get_sessionid(current);     // <--- HERE
        result = audit_comparator(sessionid, f->op, f->val);
        break;
[...]

Here, the sessionid is retrieved from the current task pointer, while
all the other code in this function compares against the tsk task
pointer. It seems that it is not always guaranteed that tsk ==
current, so my question is: Is it intentional for some reason or
should it be tsk instead of current?

Thanks,
-- 
Ondrej Mosnacek <omosnace at redhat dot com>
Associate Software Engineer, Security Technologies
Red Hat, Inc.

             reply	other threads:[~2018-05-16  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  6:57 Ondrej Mosnacek [this message]
2018-05-16  8:43 ` Question about audit_filter_rules Ondrej Mosnacek
2018-05-16 11:46   ` Richard Guy Briggs
2018-05-16 12:27     ` Ondrej Mosnacek
2018-05-16 11:37 ` Richard Guy Briggs

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='CAFqZXNvNscyn4d7y0wJH-=NMNit=xQ5R_-buT1Lzc+r87FrHng@mail.gmail.com' \
    --to=omosnace@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=rgb@redhat.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 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.