From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path: processing of the event. If the format is enriched, it looks things up =
on a On Friday, January 1, 2021 4:22:33 PM EST Burn Alt=
ing wrote:
Sometimes, events recorded =
in /var/log/audit/audit.log appear some seconds
past co- located =
events which results in auparse:au_check_events() marking
these e=
vents complete before they are. An example of this can be seen
be=
low with the offending event id 44609.
This has be=
en plaguing me for a year or two and this morning was the first
t=
ime I still had access to the raw audit.log files (I monitor a lot of
=
event types and the log files roll over fairly quickly).
The=
example below is from a fully patched Centos 7 but I have also seen
<=
pre>this on a patched Fedora 32.Has this been see=
n before? Do we need to re-evaluate how auparse
'completes' an ev=
ent (ie 2 seconds is too quick).
I ha=
ve never seen this. But on the way to disk, auditd only does light
record by record basis. It does not collect events until th=
ey are complete -
it dumps it to disk as soon as it can tack on =
the extra information.
So, the question would be, =
does this delay happen on the way to disk? Or is
this an artifac=
t of post processing the logs with an auparse based utility?
Can=
this be observed repeatedly on the same raw logs? If so, then maybe
=
auparse does have some issue. But if this is a post processing issue, =
then
the wall clock doesn't matter because this event should hav=
e collected up
together.
I'd say this m=
erits some investigation.
OK. I think=
this needs to be addressed on two fronts. There may be more.
A.&=
nbsp; Within post processing ... a 2 second timeout is not sufficient. I wo=
uld suggest we modify auparse.c:au_check_events() to
i) perform=
the event type checks first, then
ii) increase the timeout of =
2 seconds to be a larger value based on empirical tests.
B. I will build a temporary auditd daemon to perform some empirical =
testing to see how long events can reside within the daemon. I may need som=
e advice on this.
I assume that the code that sets the timestamp =
is in src/auditd.c:send_audit_event(). If so, I will see if I can put orche=
stration debug code in to monitor an event's
'time in daemon' unt=
il this point. I will then report on this.
I belie=
ve given that AUDIT_PROCTITLE and AUDIT_EOE is fairly widespread, then the =
testing switch in A. will not be a big issue (time cost wise). It will also=
mean that if we
over compensate the timeout that would cause add=
itional memory cost in auparse() then this is mittigated.
With respect to 'There may be more' fronts. Are there other points = in the 'audit ecosystem' that makes use of the '2 second timeout'.
I will start work on this, this coming weekend if the abov= e makes sense.
Regards
Burn
--=-O4TszlkkvPyOe8mZZtui-- --===============8323029703331272199== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit --===============8323029703331272199==--