Linux-audit Archive mirror
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Eric Paris <eparis@parisplace.org>,
	Linux-Audit Mailing List <linux-audit@redhat.com>
Subject: Re: [PATCH v6] audit: log AUDIT_TIME_* records only from rules
Date: Tue, 22 Feb 2022 14:02:53 -0500	[thread overview]
Message-ID: <YhUzXXs7UFk0yBil@madcap2.tricolour.ca> (raw)
In-Reply-To: <CAHC9VhRWK1=kmCAF6Axde=S5=xvzcYDNZHY70UOFak_8aUNvDg@mail.gmail.com>

On 2022-02-22 13:56, Paul Moore wrote:
> On Tue, Feb 22, 2022 at 11:45 AM Richard Guy Briggs <rgb@redhat.com> wrote:
> > AUDIT_TIME_* events are generated when there are syscall rules present
> > that are not related to time keeping.  This will produce noisy log
> > entries that could flood the logs and hide events we really care about.
> >
> > Rather than immediately produce the AUDIT_TIME_* records, store the data
> > in the context and log it at syscall exit time respecting the filter
> > rules.
> >
> > Note: This eats the audit_buffer, unlike any others in show_special().
> >
> > Please see https://bugzilla.redhat.com/show_bug.cgi?id=1991919
> >
> > Fixes: 7e8eda734d30 ("ntp: Audit NTP parameters adjustment")
> > Fixes: 2d87a0674bd6 ("timekeeping: Audit clock adjustments")
> > Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> > ---
> > Changelog:
> > v2:
> > - rename __audit_ntp_log_ to audit_log_ntp
> > - pre-check ntp before storing
> > - move tk out of the context union and move ntp logging to the bottom of audit_show_special()
> > - restructure logging of ntp to use ab and allocate more only if more
> > - add Fixes lines
> > v3
> > - move tk into union
> > - rename audit_log_ntp() to audit_log_time() and add tk
> > - key off both AUDIT_TIME_* but favour NTP
> > v4
> > - drop tk goto in favour of ntp if clause
> > - add comments to clarify calling function buffer expectations
> > v5
> > - hold my nose and swallow the audit_buffer in audit_log_time()
> > v6
> > - declare audit_log_time() and ntp_name as static
> >
> >  kernel/audit.h   |  4 +++
> >  kernel/auditsc.c | 85 ++++++++++++++++++++++++++++++++++++------------
> >  2 files changed, 69 insertions(+), 20 deletions(-)
> 
> Merged into audit/next.

Thank you.

> paul-moore.com

- RGB

--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


      reply	other threads:[~2022-02-22 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 16:44 [PATCH v6] audit: log AUDIT_TIME_* records only from rules Richard Guy Briggs
2022-02-22 18:56 ` Paul Moore
2022-02-22 19:02   ` Richard Guy Briggs [this message]

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=YhUzXXs7UFk0yBil@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=linux-audit@redhat.com \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).