Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: user namespaces not available in the current kernel. #9

Closed
dmp1ce opened this issue Aug 10, 2015 · 4 comments
Closed

Warning: user namespaces not available in the current kernel. #9

dmp1ce opened this issue Aug 10, 2015 · 4 comments

Comments

@dmp1ce
Copy link

dmp1ce commented Aug 10, 2015

I am trying to sandbox firefox but I can still access files that should be blocked like my private ssh key. Is kernel 4 supported?

> firejail firefox
Reading profile /etc/firejail/firefox.profile
Reading profile /etc/firejail/disable-mgmt.inc
Reading profile /etc/firejail/disable-secret.inc
Reading profile /etc/firejail/disable-common.inc
Warning: user namespaces not available in the current kernel.
Parent pid 5042, child pid 5043
Child process initialized

(process:1): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

parent is shutting down, bye...
> uname -rv
4.1.4-1-ARCH #1 SMP PREEMPT Mon Aug 3 21:30:37 UTC 2015
@netblue30
Copy link
Owner

I think you already have a Firefox instance running. By default Firefox keeps only one browser process running. When you start a new Firefox process, it looks for an existing one. If one is found, the new process shuts down, and the existing one opens a new tab or a new window. Use -no-remote Firefox option to force a new sandboxed process.

$ firejail firefox -no-remote

My guess is your first Firefox instance is not running in the sandbox.

User namespace needs to be compiled into the kernel. Do a short check: in a terminal you should be able to see the following files:

/proc/self/uid_map (user id mapping)
/proc/self/gid_map (group id mapping)
/proc/self/ns/user (used for join operations)

@dmp1ce
Copy link
Author

dmp1ce commented Aug 10, 2015

You were right about having firefox already open. Now the .ssh directory is blocked. Thanks!

About the "User namespace", Arch has this turned of in the kernel because of security concerns. https://bugs.archlinux.org/task/36969

Here is the lxc configuration on my Arch machine.

> lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: missing
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

@dmp1ce dmp1ce closed this as completed Aug 10, 2015
@dmp1ce
Copy link
Author

dmp1ce commented Aug 10, 2015

I am curious though. How does having user namespace turned off effect firejail?

@netblue30
Copy link
Owner

Thanks, good to know about Arch. The usual reason to turn it off is the number of bugs and fixes still coming into the kernel for user namespaces feature. The bugs are related to creating a root user in the user namespace. This root user is not fully separated from the real root user.

Firejail does not create a root user in the user namespace. I don't think firejail is affected by the problem, but who knows... User namespace is just a supplementary sandboxing feature, firejail will work fine without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants