mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #546] Using both --net=none and --overlay-tmpfs => no access to X11 #382
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#382
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 @laniakea64 on GitHub (May 30, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/546
firejail 0.9.38, Lubuntu 14.04
This command doesn't work:
Removing either
--net=noneor--overlay-tmpfsand it works:Is this a bug? If not, how to use firejail to disable unnecessary Internet access and use
--overlay-tmpfs, while keeping access to X11?@chiraag-nataraj commented on GitHub (May 31, 2016):
I think it has something to do with X11 having two sockets - one that listens on the network interface and one that listens through a unix socket in /tmp.
--net=nonecreates a new network namespace and so disables access to the network socket.--overlay-tmpfs(or equivalently--private-tmp) disables access to the unix socket in /tmp. Thus the client cannot connect to the X11 server.As for how to fix this, you could use
--x11to spawn a new X server.[EDIT] It seems
--x11only works if I don't use--private-tmp. Trying to figure out a workaround now.@chiraag-nataraj commented on GitHub (May 31, 2016):
It seems that the problem is that the tmpfs is mounted after creating the new X server, which means the child can't find the server. @netblue30, could you instantiate the tmpfs before running xpra? That way, I think this would be solved (if you use
--x11along with--private-tmpand--net=none).@netblue30 commented on GitHub (May 31, 2016):
Bug! It happens also on Ubuntu 16.04
@laniakea64 commented on GitHub (May 31, 2016):
Thanks for the insights. Is there a way to work around this without using X11 sandboxing? For example, does using
--protocol=unix(which does work in place of--net=none) completely disable network access?@chiraag-nataraj commented on GitHub (May 31, 2016):
I think so? It seems to work through a cursory test:
firejail --noprofile --protocol=unixping google.com=> Operation not supportedwget google.com=> Temporary failure in name resolution@netblue30 commented on GitHub (May 31, 2016):
I put a fix in master branch here on github, now it should work fine.
--protocol=unix is similar to --net=none, unless you run into some DNS problems.
@laniakea64 commented on GitHub (Jun 1, 2016):
Confirmed fixed by
a81568d4f0, thanks! 😃