-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aucoalesce: CoalesceMessages fails with "missing syscall message in compound event" #127
Comments
👋 @v1v @andrewkroh!! I work with @stephen-fox. Think you could give this a quick look and see what may be involved here? We could maybe contribute a fix for it. Thanks! |
Hi @drewr 😄 , it looks like the assumption that a For failure cases 2 and 3, what auditd rules were used to generate those groups of messages? If you were auditing I think it should possible to relax the requirement on having a One other problem I see is with failure case 1. Normally the key/value pairs are dumped into the |
Hi @andrewkroh! Thank you for the explanation. All three examples came from a single computer that has the following
|
The CoalesceMessages function takes one or more audit messages and creates an Event object. An Event containing more than one message is known as a "compound event". Prior to this commit, the compound event parsing logic required that a "syscall" message be included in the slice passed to the function. This requirement may be a little over-zealous. In GitHub issue 127, we discovered examples of audit events that did not include a syscall message. [1] This resulted in CoalesceMessages returning an error. This commit modifies the syscall message check to only return an error if both the "special" and syscall audit messages are missing. In such a case, a new (testable) error is returned. 1. elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Refer to the following URLs for more information: - metal-toolbox/go-libaudit#3 - elastic/go-libaudit#127
Hello,
While experimenting with this library on flatcar Linux, I noticed that the
aucoalesce.CoalesceMessages
function returns the following error when it encounters certain audit events:missing syscall message in compound event
If I supply the same events to the
aureport
tool (installed as a part ofauditd
package on Ubuntu), it appears to successfully parse those events - at least in the sense it does not produce error messages or exit with a non-zero status. It looks like commit 666ff1c introduced the formerly-mentioned error - but it does not reference any Linux audit documentation or code that contextualizes the check.tl;dr - I am not sure if this check is required - or if the audit logs I happened to encounter are just broken. Any kind of guidance would be appreciated :)
Below are the three audit events and the
aureport
stderr/out for them. For reference, the--debug
argument should result in error messages if any events cannot be parsed and-e
generates a report about events:Failure 1
Failure 2
Failure 3
Other notes
I commented out the code that returns the error and tried running the project's Go tests with
go test ./...
. The tests ran successfully. Based on the test result and the error being generated witherrors.New
- it appears to be both untested and not programmatically checkable (e.g.,errors.As
).The text was updated successfully, but these errors were encountered: