Skip to content

Errors with several auditd rules on ARM (aarch64) #38

Closed
@jakob-cf

Description

@jakob-cf

Description:
Some auditd rules in templates/audit/99_auditd.rules.j2 are incorrect for ARM systems. For example this line:
-a always,exit -F arch=b64 -S creat,open,openat,truncate,ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access

Expected Behavior
The correct auditd rules for the architecure should be used.

Actual Behavior
The following error occurs on ARM systems when auditd is restarted:

Jul 03 16:27:03 docker-2 augenrules[66289]: Syscall name unknown: creat
Jul 03 16:27:03 docker-2 augenrules[66289]: There was an error in line 20 of /etc/audit/audit.rules

Control(s) Affected
ubtu22cis_rule_4_1_3_x

Environment:

root@docker-2:~# uname -a
Linux docker-2 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:21:56 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Possible Solution
There should be a distinction for the different supported architectures (aarch64, x86_64, etc.) in templates/audit/99_auditd.rules.j2 with each having the correct syscalls in the affected rules. Available syscalls can be checked with the ausyscall command.
The following syscalls would need to be removed for aarch64:

  • arch=b64: creat, open, chmod, chown, lchown, unlink, rename, create_module, query_module
  • arch=b32: create_module, query_module

I am not sure if any would need to be added instead.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions