mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5703] Custom seccomp list and apparmor do not work well together #3072
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#3072
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 @NetSysFire on GitHub (Mar 1, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5703
Description
See https://github.com/netblue30/firejail/pull/5646#pullrequestreview-1287071576
CC @glitsj16 because its theirs.
Steps to Reproduce
In that specific case:
seccomp !tgkillapparmortgkill, regardless of seccomp settings.Expected behavior
AppArmor using firejails seccomp list or it not filtering syscalls when that profile is already using seccomp.
Actual behavior
AppArmor does syscall filtering no matter what seccomp shenanigans are done in the profile, resulting in issues because some syscalls are still blocked.
Behavior without a profile
n/a
Additional context
n/a
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
See PR.
@rusty-snake commented on GitHub (Mar 1, 2023):
AA has it's own configuration that hasn't any integration with other commands be it seccomp, caps, noexec or read-only. Labeling as enhancemnt.
@ghost commented on GitHub (Mar 2, 2023):
@NetSysFire Hello. I've installed this from AUR yesterday and ran parsecd via firejail for a while with an as-is parsecd.profile (so needing all the steps to reproduce). Sadly I cannot reproduce anything of what was reported in #5646.
Ctrl+c'ing acts without any complaints and nothing shows up in journalcl either. Did you make any changes to /etc/apparmor.d/firejail-default, or have a custom /etc/apparmor.d/local/firejail-default that might throw some light on this issue?
@NetSysFire commented on GitHub (Mar 2, 2023):
Output of running parsecd and ctrl+c'ing after:
local firejail-default:
firejail-default:
journalctl -r from just now:
Validation I did not touch anything (/etc/apparmor.d/firejail-default is not listed because it is not a backup file and thus apparently not tracked):
-Qkk firejail also only reports /etc/firejail stuff to have changed:
@ghost commented on GitHub (Mar 2, 2023):
Thanks for posting your firejail-default files. Both are unedited, exact copies of what we have in git allright. So that's not an avenue for trying to debug.
Yep, that makes sense from a packaging point of view. Users are supposed to make their changes to /etc/apparmor.d/firejail-default in /etc/apparmor.d/local/firejail-default. Again, no clues what might cause the differences we're both getting with parsecd.
At the moment I only have a long shot idea on how to proceed, and that's audit rules. I do have a few extra's in /etc/audit/rules.d. But those are copies of the examples under /usr/share/audit/sample-rules (meaning I didn't change their content and definately nothing is in there that relates to parsec AFAICT)... Perhaps you can double-check your /etc/audit/audit.rules and whether journalctl reports anything 'fishy' about those. A quick
journalctl | grep audit.rulesandjournalctl | grep augenrulesshould clear up whether that's involved here or not.@ghost commented on GitHub (Mar 2, 2023):
I'm out of ideas. Still unable to reproduce after testing without my audit/apparmor customizations. Running a quick seccomp check confirms the
tgkillsyscall is allowed in the sandbox:in anoter terminal:
$ firejail --seccomp.print=parsecd
@rusty-snake commented on GitHub (Mar 2, 2023):
Note that the usage of nanosleep can depend on libc version, architecture, kernel, ... rather low level details.
@NetSysFire commented on GitHub (Mar 18, 2023):
I have no custom audit rules. Both of your
journalctl | grepcommands do not return anything either. Alsopacman -Qkk auditsaysaudit: 206 total files, 0 altered files, too.