All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Dave Jones <davej@codemonkey.org.uk>,
	linux-audit@redhat.com,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: ntp audit spew.
Date: Tue, 24 Sep 2019 09:50:46 -0400	[thread overview]
Message-ID: <20190924135046.kkt5hntbjpcampwr@madcap2.tricolour.ca> (raw)
In-Reply-To: <CAHC9VhQPvS7mfmeomRLJ+SyXk=tZprSJQ9Ays3qr=+rqd=L16Q@mail.gmail.com>

On 2019-09-23 23:01, Paul Moore wrote:
> On Mon, Sep 23, 2019 at 5:00 PM Richard Guy Briggs <rgb@redhat.com> wrote:
> > On 2019-09-23 12:14, Paul Moore wrote:
> > > On Mon, Sep 23, 2019 at 11:50 AM Dave Jones <davej@codemonkey.org.uk> wrote:
> > > >
> > > > I have some hosts that are constantly spewing audit messages like so:
> > > >
> > > > [46897.591182] audit: type=1333 audit(1569250288.663:220): op=offset old=2543677901372 new=2980866217213
> > > > [46897.591184] audit: type=1333 audit(1569250288.663:221): op=freq old=-2443166611284 new=-2436281764244
> >
> > Odd.  It appears these two above should have the same serial number and
> > should be accompanied by a syscall record.  It appears that it has no
> > context to update to connect the two records.  Is it possible it is not
> > being called in a task context?  If that were the case though, I'd
> > expect audit_dummy_context() to return 1...
> 
> Yeah, I'm a little confused with these messages too.  As you pointed
> out, the different serial numbers imply that the audit_context is NULL
> and if the audit_context is NULL I would have expected it to fail the
> audit_dummy_context() check in audit_ntp_log().  I'm looking at this
> with tired eyes at the moment, so I'm likely missing something, but I
> just don't see it right now ...
> 
> What is even more confusing is that I don't see this issue on my test systems.
> 
> > Checking audit_enabled should not be necessary but might fix the
> > problem, but still not explain why we're getting these records.
> 
> I'd like to understand why this is happening before we start changing the code.

Absolutely.

This looks like a similar issue to the AUDIT_NETFILTER_CFG issue where
we get a lone record unconnected to a syscall when one of the netfilter
table initialization (ipv4 filter) is linked into the kernel rather than
compiled as a module, so it is run in kernel context at boot rather than
in user context as a module load later.  This is why I ask if it is
being run by a kernel thread rather than a user task, perhaps using a
syscall function call internally.

> paul moore

- 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

  reply	other threads:[~2019-09-24 13:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 15:50 ntp audit spew Dave Jones
2019-09-23 16:14 ` Paul Moore
2019-09-23 16:58   ` Dave Jones
2019-09-23 18:57     ` Paul Moore
2019-09-23 19:49       ` Dave Jones
2019-09-23 19:49         ` Eric Paris
2019-09-24  2:39           ` Paul Moore
2019-09-24 13:30           ` Steve Grubb
2019-09-23 21:00   ` Richard Guy Briggs
2019-09-24  3:01     ` Paul Moore
2019-09-24 13:50       ` Richard Guy Briggs [this message]
2019-09-24 17:05         ` Paul Moore
2019-09-26 15:50           ` Paul Moore
2019-09-24 13:19   ` Steve Grubb
2019-09-24 17:01     ` Paul Moore
2019-10-31 16:39   ` [PATCH] audit: set context->dummy even when audit is off Chris Mason
2019-10-31 16:39     ` Chris Mason
2019-10-31 23:27     ` Paul Moore
2019-11-01 13:24       ` Chris Mason
2019-11-01 14:16         ` Steve Grubb
2019-11-01 14:26           ` Lenny Bruzenak
2019-11-01 14:49             ` Steve Grubb
2019-11-01 14:58               ` Lenny Bruzenak
2019-11-01 15:55           ` Chris Mason
2019-11-05  0:15         ` Paul Moore
2019-11-05  0:39           ` Chris Mason
2019-11-05  0:45             ` 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=20190924135046.kkt5hntbjpcampwr@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@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 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.