mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1083] Xephyr can't see abstract socket for outer X server when sandboxed #741
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#741
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 @zackw on GitHub (Jan 31, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1083
This is more of a cry for help than a coherent bug report at this point, please bear with me.
I'm experimenting with running the server processes for the various
--x11modes in their own sandboxes. These sandboxes obviously need to be able to connect to the "outer" X server. The trouble is, that server might only be listening on an abstract socket. In my testing, when Xephyr (I started with Xephyr because it's simplest) is run in a relatively straightforward sandbox with/tmp/.X11-unixwhitelisted, it doesn't even try to connect to the abstract socket, it only tries the normal-namespace socket, which doesn't exist, so the call fails. If run normally it tries the abstract socket first.stracelogs are unenlightening. Do you have any idea what might cause this?@zackw commented on GitHub (Jan 31, 2017):
On further investigation, this is caused by the
mask_x11_abstract_socketlogic, and the failure wasn't showing up instraceoutput becausemask_x11_abstract_socketis implemented with a LD_PRELOAD library.What I still don't understand is the intended semantics of
FIREJAIL_X11. SettingFIREJAIL_X11=yesenables access to the specific socket in
/tmp/.X11-unixcorresponding to the value ofDISPLAY. But setting it to any value locks out access to all X11-related abstract sockets. What was the design goal?@netblue30 commented on GitHub (Feb 1, 2017):
I had to put in FIREJAIL_X11 in order to handle x11 configuration inside profile files - the logic is very convoluted, so probably I'll have to rewrite it at some point.
I(f this would help, I can disable the LD_PRELOAD library based on a flag in /etc/firejail/firejail.config.
@zackw commented on GitHub (Feb 1, 2017):
I am, in fact, rewriting
x11.cfrom scratch right now. Please stay tuned for the PR. 😁I understand you to be saying that
FIREJAIL_X11's current behavior is somewhat of an accident and setting it to any value other than "yes" is not intended to be different from not setting it at all. Is that right?@netblue30 commented on GitHub (Feb 4, 2017):
Yes, that was the intention.