-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
Google Chrome complains that its SUID sandbox isn't configured correctly #89599
Comments
Interesting, I guess this is due to Could you test if Google Chrome runs fine without Upstream documentation: |
A similar issue occurred here: #89482 (comment) - when unpacking from the deb the mode for the |
If I remove that setting from my NixOS configuration and rebuild, then both Google Chrome and now Chromium crash on startup with an error message such as—
(The numbers at the beginning vary — I guess they're an address in memory or something?) Let S abbreviate
In cases (3) and (4), <chrome://sandbox> says "You are adequately sandboxed." (Edit: It also lists the "Layer 1 Sandbox" as "SUID".) Edit: I note that I do have |
Huh, that's strange... I suspected this would be the problem due to the hardened kernel patches but with user namespaces the sandboxing should work. Does e.g.
On my system I don't get any messages about the SUID sandbox with Chromium, I assume this is because the user namespaces sandbox work and the SUID sandbox is only used as a fallback (but this behaviour could also be different with Google Chrome). I guess you basically have two options:
|
I see that it does not:
I had forgotten that I also have a limit on the number of user namespaces, but raising this limit even to a million doesn't change the result of |
Googling around, I find NixOS/nix#2404, and indeed, even if I un-raise the user namespace limit, setting the sysctl variable
—and Chromium's using its user namespace sandbox, according to <chrome://sandbox>. Google Chrome also now runs and reports using its user namespace sandbox; however, even though <chrome://sandbox> says that it's "adequately sandboxed", Chrome complains to stderr that it isn't quite entirely sandboxed:
Notably, this error message seems to be emitted when and only when Chrome is shut down. However, reading up on it, I'm more inclined to stick with |
https://chromium.googlesource.com/chromium/src.git/+/master/docs/linux/suid_sandbox.md mentions an environment variable
|
I note that, when Chromium is using the SUID sandbox, <chrome://sandbox> reports all the sandbox features as working—
—but, when I had it using the unprivileged-user-namespace sandbox, it reported the last feature as nonfunctional:
The page still concluded "You are adequately sandboxed", though. |
It could be that I did also just test setting
That's ok (technically not ideal of course, but still adequate as the page concludes), this basically depends on |
After upgrading to NixOS 20.09 Alpha,
|
I marked this as stale due to inactivity. → More info |
@Stale: Just when it's becoming more relevant! |
Using I previously tried using an activation script to copy Chrome into Before that, I tried this |
I marked this as stale due to inactivity. → More info |
I run into this when I tried a hardened kernel (5.6)
Also all Electron apps seem to be affected. |
@8573, did you consider making a PR with the implementation of your approach? |
Describe the bug
I installed Google Chrome from nixpkgs, but, when I tried to run it, it exits with the following messages:
The above is the entirety of its output (other than the core-dump). For the file
/nix/store/pd6zf53b5150pk2qlvf15a7ddwxv2mgy-google-chrome-83.0.4103.61/share/google/chrome/chrome-sandbox
about which it complains,ls -l
gives the following output:I normally use Chromium, but I was trying Google Chrome per #89512 (comment).
For Chromium, I have a NixOS option
security.chromiumSuidSandbox.enable = true
. Does Chrome need some equivalent of this?To Reproduce
$ nix-env -iA nixos.google-chrome $ ~/.nix-profile/bin/google-chrome-stable
Notify maintainers
@msteen
Metadata
"x86_64-linux"
Linux 5.4.43-hardened, NixOS, 20.09pre228204.467ce5a9f45 (Nightingale)
yes
yes
nix-env (Nix) 2.3.5
"nixos-20.09pre228204.467ce5a9f45"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
The text was updated successfully, but these errors were encountered: