I have a K8S Pod which is running on a Linux Vm. It has some security policies applied ( blocks some syscalls, & allows some). When my application executes this python code resource.getrlimit(resource.RLIMIT_NOFILE)
, I see a PermissionError
error
I just want to understand which syscall is getting executed in the background so that I can allow it. I tried to tail the audit logs at sudo tail -f /var/log/audit/audit.log
when the event happens but they don’t look very useful. Which file will give me the syscalls in a human readable format?
This is the output of the /var/log/audit/audit.log
when the application starts execution
type=UNKNOWN[1334] msg=audit(1723127982.604:3803): prog-id=484 op=LOAD
type=UNKNOWN[1334] msg=audit(1723127982.608:3804): prog-id=485 op=LOAD
type=UNKNOWN[1334] msg=audit(1723127982.608:3805): prog-id=486 op=LOAD
...
type=UNKNOWN[1334] msg=audit(1723127982.648:3812): prog-id=493 op=LOAD
type=UNKNOWN[1334] msg=audit(1723127991.012:3813): prog-id=486 op=UNLOAD
type=UNKNOWN[1334] msg=audit(1723127991.180:3814): prog-id=491 op=UNLOAD
...
type=UNKNOWN[1334] msg=audit(1723127991.532:3821): prog-id=484 op=UNLOAD
type=UNKNOWN[1334] msg=audit(1723127991.532:3822): prog-id=488 op=UNLOAD
The pod and the process gets killed instantly, so exec inside it is not an option.