Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH 1/1] audit: log binding and unbinding to netlink multicast
Date: Mon, 16 Oct 2017 23:37:19 -0400	[thread overview]
Message-ID: <2770303.9aGXvmWi9g@x2> (raw)
In-Reply-To: <20171016230414.gezfqdsh7rcastdz@madcap2.tricolour.ca>

On Monday, October 16, 2017 7:04:14 PM EDT Richard Guy Briggs wrote:
> On 2017-10-16 22:28, Steve Grubb wrote:
> > On Monday, October 16, 2017 6:06:47 PM EDT Steve Grubb wrote:
> > > > > +/* Log information about who is connecting to the audit multicast
> > > > > socket
> > > > > */ +static void audit_log_multicast_bind(int group, const char *op,
> > > > > int
> > > > > err) +{
> > > > > +       const struct cred *cred;
> > > > > +       struct tty_struct *tty;
> > > > > +       char comm[sizeof(current->comm)];
> > > > > +       struct audit_buffer *ab;
> > > > > +
> > > > > +       ab = audit_log_start(NULL, GFP_KERNEL,
> > > > > AUDIT_EVENT_LISTENER);
> > > > 
> > > > It really seems like this should be associated with the current task,
> > > > e.g. "audit_log_start(current->audit_context, ...)".  After all, the
> > > > whole point of this record is to capture information about the subject
> > > > who is binding to the multicast socket.
> > > 
> > > OK, easy enough.
> > 
> > But wouldn't that make it an auxiliary record (if there happens to be a
> > syscall record) instead of a standalone event? The intention is that this
> > event is standalone just like AUDIT_SECCOMP or AUDIT_LOGIN. Associating
> > with the current task is done by using current in formatting the message
> > as seen below. (e.g.  task_pid_nr(current), audit_get_sessionid(current))
> > 
> > I think it's correct as is.
> 
> Yes, this would associate this record with the tentatively generated
> SYSCALL record for this task.

OK, then my secondary assessment was right. The patch in this hunk is fine. 
This is a standalone event. I have a patch ready with the .bind/.unbind 
function pointers grouped together. I can add the ghak issue easily enough. I 
just need a ruling on what define number to use for AUDIT_EVENT_LISTENER. 
Should it be 1331 or 1332 (which is its actual number)?

-Steve

  reply	other threads:[~2017-10-17  3:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 19:58 [PATCH 1/1] audit: log binding and unbinding to netlink multicast Steve Grubb
2017-10-16 18:56 ` Richard Guy Briggs
2017-10-16 19:09   ` Richard Guy Briggs
2017-10-16 21:35 ` Paul Moore
2017-10-16 22:06   ` Steve Grubb
2017-10-16 22:28     ` Steve Grubb
2017-10-16 23:04       ` Richard Guy Briggs
2017-10-17  3:37         ` Steve Grubb [this message]
2017-10-17 14:56         ` Paul Moore
2017-10-17 15:11       ` Paul Moore
2017-10-17 16:01         ` Steve Grubb
2017-10-17 16:39           ` Paul Moore
2017-10-17 14:51     ` Paul Moore

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=2770303.9aGXvmWi9g@x2 \
    --to=sgrubb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox