Skip to content

Fix checkpoint issue regarding AUDIT_USER end of event detection#396

Merged
stevegrubb merged 1 commit intolinux-audit:masterfrom
sergio-correia:eoe-detection
Sep 11, 2024
Merged

Fix checkpoint issue regarding AUDIT_USER end of event detection#396
stevegrubb merged 1 commit intolinux-audit:masterfrom
sergio-correia:eoe-detection

Conversation

@sergio-correia
Copy link
Copy Markdown
Contributor

@sergio-correia sergio-correia commented Sep 9, 2024

While consolidating the end of event function to a function, in
commit ccd4bdb, the behavior changed as some messages -- such as
AUDIT_USER messages -- were not considered anymore.

Example:

  1. Before the change:
ts1="$(date +%T)"
touch test1.log
auditctl -m test1
ausearch -ts "${ts1}"  --checkpoint chk1

----
time->Tue Sep 10 14:45:20 2024
type=USER msg=audit(1725993920.729:2968): pid=63311 uid=0 auid=0 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='text=test1 exe="/usr/sbin/auditctl" hostname=hostname-here addr=? terminal=pts/0 res=success'
  1. After the change (current behavior):
ts2="$(date +%T)"
touch test2.log
auditctl -m test2
ausearch -ts "${ts2}" --checkpoint chk2

<no matches>

This commit gets the previous behavior back.

While consolidating the end of event function to a function, in
commit ccd4bdb, the behavior changed as some messages -- such as
AUDIT_USER messages -- were not considered anymore.

Example:

1) Before the change:

ts1="$(date +%T)"
touch test1.log
auditctl -m test1
ausearch -ts "${ts1}"  --checkpoint chk1

----
time->Tue Sep 10 14:45:20 2024
type=USER msg=audit(1725993920.729:2968): pid=63311 uid=0 auid=0 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='text=test1 exe="/usr/sbin/auditctl" hostname=hostname-here addr=? terminal=pts/0 res=success'

2) After the change (current behavior):

ts2="$(date +%T)"
touch test2.log
auditctl -m test2
ausearch -ts "${ts2}" --checkpoint chk2
<no matches>

This commit gets the previous behavior back.

Signed-off-by: Sergio Correia <scorreia@redhat.com>
@sergio-correia sergio-correia changed the title Restore end of event detection behavior Fix checkpoint issue regarding AUDIT_USER end of event detection Sep 10, 2024
@stevegrubb
Copy link
Copy Markdown
Contributor

Thanks

@stevegrubb stevegrubb merged commit 93727ef into linux-audit:master Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants