Skip to content
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

ausearch does not find messages of type AVC #351

Closed
vam67423 opened this issue Feb 5, 2024 · 4 comments
Closed

ausearch does not find messages of type AVC #351

vam67423 opened this issue Feb 5, 2024 · 4 comments

Comments

@vam67423
Copy link

vam67423 commented Feb 5, 2024

When searching the audit logs for messages using type=AVC, ausearch returns nothing even if the audit.log file does contain those entries:

$ ausearch -m AVC
<no matches>
$ cat /var/log/audit/audit.log | grep AVC
type=AVC msg=audit(1707163426.971:4088): apparmor="ALLOWED" operation="open" class="file" profile=....

This makes the audit framework quite difficult to use, especially in combination with tools like apparmor/SELinux. While the logs are still present, users would expect to find them with ausearch.

Audit Version: 4.0-1
Linux Kernel: 6.7.3

@stevegrubb
Copy link
Member

If the event is malformed, it is skipped. You can use --debug to see the malformed events. An event is malformed if searchable fields are not in the right order or missing.

@vam67423
Copy link
Author

vam67423 commented Feb 7, 2024

I can confirm that AVC type logs created by apparmor version 3.1.6 are all marked as malformed events.

The malformed events would be an issue with apparmor I suppose?

@stevegrubb
Copy link
Member

Yes. If they are going to emit an access decision as an AVC, it has to exactly follow the format of an SE Linux AVC. The AppArmor kernel developers were given the AUDIT type block from 1500 to 1599 a long time ago so that they can format their events any way they wish. The AVC they are using is type number 1400. They should really define AUDIT_AA_DECISION 1500 (or whatever makes sense to AppArmor) and then use that.

@stevegrubb
Copy link
Member

Thanks for the report. I don't think there's anything here for us to do. I hope this was reported to the distribution with the malformed events. Closing this.

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

No branches or pull requests

2 participants