mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2220] Firejail passing MIT COOKIE on cmd line - visible in ps -auxw? #1489
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#1489
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 @Veek on GitHub (Oct 28, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2220
I've been trying to understand how Firejail authenticates with the main Xorg server. I found this: bugs.debian.org/cgi-bin/bugreport.cgi?bug=526678
I ran this:
firejail xpra start :20 --start-child=xterm --no-daemon --exit-with-children and did a quick ps -auxww|grep xauth and I get this
I'm on Debian so maybe it's different currently? Isn't this a problem? Maybe a named pipe can be used to pass credentials - initiated by the user of firejail with a timeout?
I get this error on Debian Stretch
I su from root to test and run that cmd and firejail's trying to add a cookie to my .Xauthority vs reading the cookie from a named pipe and allowing me to delete it from .Xauthority
@crass commented on GitHub (Oct 29, 2018):
Firejail only uses
xauthwith itsgeneratecommand (in recent versions). The command you're showing is for thexauthaddcommand. You might try runningpstreeorstraceto figure out the parent of thatxauthcommand and report to the appropriate project. But it doesn't appear as though the culprit is firejail.@chiraag-nataraj commented on GitHub (Dec 8, 2018):
@Veek Also, if you want X11 sandboxing, why not just do
firejail --x11 xterm?@Veek commented on GitHub (Dec 8, 2018):
Because firejail's just a rather crappy 'C' wrapper around Xpra, or-whatever your using.
-x11 Sandbox the application using Xpra, Xephyr, Xvfb or Xorg secu‐
rity extension
Xorg has no security barring the hidden /tmp abstract socket, so Xpra proxies each application using Xvfb - 1xXvfb/application - Xpra itself relies on python, so you essentially are running C/Firejail-->Python--->Xpra--->application1.
I'd rather just pass my credentials to the app/running-in-an-su-account and change my credentials, every time. It won't protect me from prying apps since Xorg has no way to restrict such things but it'll be fast and reasonably secure.
@chiraag-nataraj commented on GitHub (Dec 8, 2018):
Not really true? For example, one thing I noticed is that if I use
firejail --x11, it automatically blocks all of the other sockets in/tmp/.X11-unix. If you set up the X11 sandbox yourself, you have to manually take care of that.Also, if you use
private-bin(which makes more sense for single-use programs like an email client or web browser or whatever), then you don't need to whitelist whichever X11 sandboxing tool you're using (sincefirejailwill take care of spawning it).Additionally, you can have a tighter sandbox since you can limit whatever needs to be whitelisted to the specific files the program itself needs rather than whatever the program needs + whatever xpra (or whatever) needs.
Fundamentally, there are actually quite a few reasons to prefer setting up the X11 jail with firejail rather than doing what you're doing here. And in any case, all of this is just a band-aid solution until we get real graphical isolation in Linux (i.e. native Wayland for all programs). You may also be interested in Qubes OS.
@smitsohu commented on GitHub (Dec 9, 2018):
@Veek there exists a tutorial how to do it the right way https://firejail.wordpress.com/documentation-2/x11-guide/
EDIT: Missing in the tutorial, but with a mention in the man page, the abstract socket can be also turned off by passing
-nolisten localon the Xorg command line@chiraag-nataraj commented on GitHub (May 20, 2019):
Going to go ahead and close the issue, since the original question seems to have been answered. @Veek, please feel free to re-open if you have more questions.