mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3441] surf browser from suckless doesn't start #2163
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#2163
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 @hyiltiz on GitHub (Jun 1, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3441
Bug and expected behavior
surfbrowser from suckless doesn't startsurfbrowser from suckless startsNo profile or disabling firejail
firejail --noprofile PROGRAMin a shell?works as expected
whereis PROGRAM,firejail --list,stat $programpath)?firejailcallssurffrom/usr/local/bininstead of/usr/bin/Reproduce
Steps to reproduce the behavior:
firejail surfEnvironment
lsb_release -a)firejail --version) exclusive or used git commit (git rev-parse HEAD)None.
No.
Additional context
Other context about the problem like related errors to understand the problem.
None required.
Checklist
find / -name 'firejail' 2>/dev/null/fd firejailto locate profiles ie in/usr/local/etc/firejail/PROGRAM.profile)@rusty-snake commented on GitHub (Jun 1, 2020):
Why is firejail started when you run
/usr/bin/surf?Can you try
firejail --private-etc=machine-id surf.@hyiltiz commented on GitHub (Jun 1, 2020):
/usr/bin/surf 'google.com'workssurf 'google.com'doesn't because/usr/local/bin/surfviafirejailis calledfirejail --private-etc=machine-id surf 'google.com'works@rusty-snake commented on GitHub (Jun 1, 2020):
@hyiltiz you can simply add
d1dd363to your surf.profile.@hyiltiz commented on GitHub (Jun 2, 2020):
Why did that fix the issue and how could've known better to fix it myself? I see that it reported
Failed to open "/var/lib/dbus/machine-id"but I wasn't sure if that was a side-effect of some other issue, or can just be fixed directly. Why would a browser need my machine-id in the first place?@ghost commented on GitHub (Jun 2, 2020):
That's not easy to answer in a few sentences, but I'll try. Generally speaking, the more you familiarize yourself with all the firejail options, the Linux filesystem layout etc., the better your chances become to detect potential issues in sandbox profiles. Logging output is key, which implies starting applications from terminal, which not all users do or are willing to do. As you know, security is always a matter of degrees, certainties are urban myths at best.
In this particular case, seeing the failure to open /var/lib/dbus/machine-id is one clue that D-Bus was involved in breaking surf. Another clue is present in the filesystem, as that path is symlinked to /etc/machine-id. Finally, seeing that the surf.profile limits access to /etc via the private-etc option, a trained and experienced collaborator as @rusty-snake can put these pieces of information together quickly and suggest a fix.
Like with so many things in life, the more you put yourself into this 'behind-the-scenes' position, the easier it gets. Practice helps in other words. Give it a try, most if not all information is out there. Fine-tuning firejail profiles to your own particular workflow is almost always possible (via the .local override files).
Now that's a very good question indeed. It seems to be related to having access to the audio layer. If you don't need audio in the surf web browser, it's possible to add firejail's
machine-idoption to a surf.local file to harden things a bit. That generates a new, random id inside the sandbox, which does break audio support, but keeps the browser functioning otherwise.Let's hope this brief attempt to answer your questions enables you to improve your firejail sandboxing skills, regards!
@rusty-snake commented on GitHub (Jun 2, 2020):
Access to /etc/machine-id (see
man 5 machine-idfor more info) is needed for PulseAudio and sometimes DBus (depending on compiler-flags?).