feature request: alternative to user namespace sandbox on Linux
See original GitHub issue(follow up to #1986 since that issue got closed by my PR to change the Linux sandboxing error message)
Problem:
- On Linux, Brave generally does not run unless either the
--no-sandbox
flag is passed or user namespaces are enabled. - Previously, the default error message told users to try running with
--no-sandbox
. In https://github.com/brave/brave-core/pull/1204, I changed it to tell users they probably need user namespaces enabled. The rationale was that running with any sandbox, even a subpar one, is better than running without any sandbox. - Users often complain to us that we should not be encouraging enabling of userns because it’s an insecure/poorly-designed feature. Citations include https://lists.archlinux.org/pipermail/arch-general/2017-February/043066.html and https://wiki.archlinux.org/index.php/security#Sandboxing_applications.
The main argument from https://lists.archlinux.org/pipermail/arch-general/2017-February/043066.html is that userns has so many vulnerabilities to the point of being useless, and hence is security theater; in other words we should assume any code that runs with some privileges in a user namespace can run with those privileges on the host itself.
However, if that were true, running Brave in a userns sandbox would be equivalent to running Brave without a sandbox. Does userns actively make security worse? (Other than perhaps luring people into a false sense of security.)
Some potential options:
- In the error message (https://github.com/brave/brave-core/pull/1204), mention that userns is considered harmful by some and the other option is to just run without the sandbox. I’m not a big fan of this since it’s a complicated and not-necessarily-actionable message for non-technical users.
- Ship the Chromium setuid sandbox which is supposedly being deprecated soon or was already deprecated, also citing security reasons: https://bugs.chromium.org/p/chromium/issues/detail?id=312380
- Write our own sandbox 😦
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:22 (6 by maintainers)
Top Results From Across the Web
man firejail - WordPress.com
Alternative sandbox technologies like snap (https://snapcraft.io/) and ... IPC, network and user namespaces can be added using the command line options.
Read more >Ubuntu Manpage: Firejail - Linux namespaces sandbox program
It can sandbox any type of processes: servers, graphical applications, and even user login sessions. Firejail allows the user to manage application security ......
Read more >Isolate containers with a user namespace
Linux namespaces provide isolation for running processes, limiting their access to system resources without the running process being aware of the limitations.
Read more >Chromium Docs - Linux Sandboxing
Renderers will use an IPC mechanism to request access to resource from a more ... User namespaces sandbox, Modern alternative to the setuid...
Read more >FS#36969 : [linux] 3.13 add CONFIG_USER_NS - Arch Linux
Chrome's sandbox uses seccomp to prohibit exotic kernel features, so enabling unprivileged user namespaces has no immediate effect on Chrome's security.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Debian, one of the most popular linux distros disables unprivileged user namespaces by default.
The Arch Linux linux-hardened kernel disables unprivileged user namespaces.
The KSPP recommends to disable them along with tons of other security experts so you can bet many security focused Linux users will be following their advice.
And many more.
AT_SECURE is set on setuid/setgid binaries on Linux which prevents that from being exploited entirely.
There has not been a single known privilege escalation exploit in chromium’s suid sandbox.
This issue has caused a lot of damage to the reputation of Brave in the F/OSS community (look at the issues linking to this one listed up above or the dozens of other threads across various different Linux communities that have removed Brave from their repositories). That alone should be sufficient incentive to take this issue seriously. This issue has now been open for 9 months, without any security fix even being worked on. Please, please take this issue seriously.