mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1981] Apparmor dbus confinement not working? #1332
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#1332
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 @chiraag-nataraj on GitHub (Jun 6, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1981
There's some weird stuff going on with apparmor and firejail. I've enabled
apparmorin the firejail profile and am using the defaultfirejail-defaultapparmor profile (which should block dbus). However, opening up a sandboxed terminal and usingdbus-monitorworks just fine.At this point, I wanted to confirm that
x-terminal-emulator(the program in question) was being restricted byapparmor, so I ransudo aa-status, which gave me this. I then looked at the output offirejail --tree(to figure out which process I was looking for), which gave me this. As you can see, PID 32525 is being confined by apparmor. When I rundbus-monitorin the terminal, I get this in my journal:However, it seems some stuff is still being blocked. For example, I also get lines like:
So it seems that dbus is still working even though apparmor is supposed to be blocking it. My profile also blocks all network connections (
net none) and mydbusis using regular Unix sockets.Even more mysteriously, usingNever mind. Those are an unrelated error. I'm not getting any firefox dbus warnings in my journal.apparmorwithfirefoxseems to work. That is,firefoxdbus connections are blocked.My
x-terminal-emulatorprofile is here.@smitsohu commented on GitHub (Jun 7, 2018):
This also puzzled me some time ago. It depends on your distribution, or more precisely on your kernel having the right patches.
Ubuntu patches their kernels, but Debian doesn't. Hope is that one day these patches will find their way into the mainline kernel. As far as I know the basic infrastructure is there since 4.17, so it shouldn't take too long now.
@chiraag-nataraj commented on GitHub (Jun 7, 2018):
Huh. Since I build my own kernel, could you point me to the patches? I use Debian and use their sources, so that's probably why this issue cropped up for me.
@smitsohu commented on GitHub (Jun 7, 2018):
I guess this is what you're looking for: https://gitlab.com/apparmor/apparmor/tree/master/kernel-patches
But I didn't try myself, don't take my word for it
@chiraag-nataraj commented on GitHub (Jun 7, 2018):
lol they don't even have a patch for 4.16. Oh well. I guess I just have to wait for 4.17 to become stable (at least the version in the experimental repo is currently at 4.17-rc7).
@Vincent43 commented on GitHub (Jun 7, 2018):
@chiraag-nataraj mainline dbus support in apparmor is currently planned for linux 4.19. Some day they may release unofficial patches for earlier versions in aforementioned gitlab repo.
@chiraag-nataraj commented on GitHub (Jun 7, 2018):
Hmmm, I see. Thanks :)