mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3498] audit.log did not print when --seccomp-error-action is EPERM #2201
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sfc-gh-hyu on GitHub (Jul 6, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3498
When a system call is violated, and error action is
kill, I can see audit.log has an entry indicating the errorand
However, when the
--seccomp-error-action=EPERM, the audit.log did not have an entry.I also checked
And it seems that
errnoshould be logged. Maybe there is a flag that should be added when configuringseccomp?@rusty-snake commented on GitHub (Jul 7, 2020):
This is expected AFAIK.
I wonder for what it is useful. For debugging you can still set it to kill. Are there any drawback when it is not logged?
PR for the kill-> EPERM change: https://github.com/netblue30/firejail/pull/3301
@sfc-gh-hyu commented on GitHub (Jul 7, 2020):
I want to use
EPERMin production but keep audit logging for audit purpose. Is that possible? Our production environment has some utility which allow me to easily query audit log on each host, so I think it would be nice to have seccomp logging.@rusty-snake commented on GitHub (Jul 7, 2020):
I'm no expert, but I would think it's possible. @topimiettinen can say more.
I see your point. However, keep in mind that the reason for the change (kill->EPERM) was to block syscalls while allowing the application to continue to work. i.e. audit-logs can be "false-positives", which don't need to be allowed. Which in turn can result in a lot of audit-spam.
@sfc-gh-hyu commented on GitHub (Jul 7, 2020):
I think this is fine. My usecase is running untrusted user code inside firejail. And need to return a nice user error back when seccomp rule is violated. So application continues runnning just to report error back and stop, which won't spam the audit.log. If you don't want audit logging to be default behavior, is it possible to add an option for that?
@topimiettinen commented on GitHub (Jul 7, 2020):
You may need to edit auditd configuration to enable logging for failed system calls. Something like this (taken from
/etc/audit/rules.d/30-nispom.rules) would log every timeopenetc. fail with EACCES or EPERM:But this also means that it also logs every time an unrelated program gets these errors, so logs may fill up quickly.
Maybe you could use instead a rare error code like ENAVAIL ("No XENIX semaphores available", lol) like
--seccomp-error-action=ENAVAILand match that with audit rules instead of EPERM. Though this may confuse applications which may not expect such weird error codes.