mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #420] xpra-winswitch trouble #306
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#306
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 @suedi on GitHub (Apr 8, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/420
Trying out X11 separation with xpra, running firejail as of commit
42bb614Having trouble with starting
firejail –-x11 –-net=eth0 xtermWhen checking log I get
"Xvfb command has terminated! xpra cannot continue"
I am using Arch and saw at #375 you(netblue30) wrote
xpra runs fine without involving firejail!?
I don't know what extra data to include to help in research?
Maybe this form logfile
and after F***ing around
Did you get it to run on your Arch box?
edit
With further investigation I cannot run xpra as the unprivilegied user I use for firejail
even without firejail though it works for root?
hmm?
@suedi commented on GitHub (Apr 8, 2016):
seems like it is a some setuid issue?
If I remove suid from /usr/lib/xorg-server/Xorg
I can start xpra as unprivilegied user
Firejail show another error though
I have dbus-glib installed?
@suedi commented on GitHub (Apr 8, 2016):
So I installed python2-dbus and the previous error disappeared
new one
I have in my environment variables
Are you by any chance scrubbing environment variables?
Maybe not, when I do it manually without firejail I can start xpra as unpriv. user
and get terminal. Same error displayed about dbus but terminal is working?
So maybe it is not the dbus error that gives
but this one from terminal
and this one from .xpra/${DISPLAY}.log file
Seems like server terminated gracefully?
@suedi commented on GitHub (Apr 8, 2016):
When I tried it as root that is
firejail –-x11 –-net=eth0 xtermNo evidence of xpra starting at all
@suedi commented on GitHub (Apr 9, 2016):
If as unprivileged user I execute
firejail –-x11 xtermit works and I get a xterm.
But then network namespace is the only way to isolate abstract socket so that is availible in jail.
Also when checking netstat -a I have access to /tmp/.X11-unix/X0
however when I look into /tmp/.X11-unix inside jail there is only X883=
On my system /tmp is a symlink to another place so maybe this has something todo with it?
Anyway then I get no extra isolation with xpra :(
I vaguely remember we had a discussion about using wlan interface and I believe the
conclusion that this was not so easy? am I right?
I tested that thesis out by trying
firejail --net=wlan0 firefoxthat starts firefox but I get no connection.
Wasn't there some problems bridging wlan devices in linux?
If that is true then my conslusions are if you use wlan exclusively
the extra use of xpra for further isolation does not add any extra protection
Am I right?
This is really a B**** with wlan devices
@netblue30 commented on GitHub (Apr 9, 2016):
Never run xpra as root, it has more security problems than what you are fixing by sandboxing the x11 socket. In my opinion you are better of without x11 isolation.
Yes, wlan devices are not supported in this moment.
You are right, there isn't any extra protection. The abstract X11 socket is still visible. In fact by default this is what most programs attempt to connect first. You really need a network namespace.
@suedi commented on GitHub (Apr 9, 2016):
I mounted tmpfs on /tmp/.X11-unix and then
I tried the suggestion in #57
firejail --net=wlan0 xpra start :744 --start-child=xterm --no-daemon --exit-with-childrenand then xpra attach from another terminal I get the desired result
No X0 sockets
Does not work with firefox or midori.
At the moment? So you think it is possible to do?
@netblue30 commented on GitHub (Apr 10, 2016):
wlan: I am still looking into it, it is probably the biggest feature missing in this moment.
To check, run "netstat -a | grep X11". On a regular unsandboxed window you will get:
So, there are two listening sockets: /tmp/.X11-unix/X0 (regular Unix socket) and @/tmp/.X11-unix/X0 (abstract socket). Notice how clients are connecting to the abstract socket. If they don't find the abstract socket, they try the regular one. In your sandbox, you shouldn't see any X0 socket, unix or abstract.
@suedi commented on GitHub (Apr 11, 2016):
OK, you seem aware of the importance of supporting wlan so I feel no need
in keeping this ticket open as a reminder.
Thanks for information.
closing...