Open rkoe opened 3 years ago
Huh, that's strange. IIRC it should only be used as a fallback so I assume you're on a system with user namespaces disabled (on Debian based system there's sysctl kernel.unprivileged_userns_clone
).
Personally I'd like to drop the legacy/deprecated SUID sandbox helper binary entirely but AFAIK it would still break some NixOS setups (e.g. for users of a hardened kernel).
Anyway, there are probably three options but all come with security implications:
sysctl -w kernel.unprivileged_userns_clone=1
CHROME_DEVEL_SANDBOX
(needs changes in Nixpkgs, s. below)--no-sandbox
The sandboxing can be verified via chrome://sandbox/
.
As for the Nixpkgs packaging: We should likely remove the following two lines:
That always refers to a Nix store path so I think this fallback should never actually work.
I'm getting the same error. See #308128.
It also affects youtube-music
.
Also, it seems related, ping
, which fails with ping: Lacking privilege for icmp socket
, unless I change its permission bits.
My kernel.unprivileged_userns_clone
flag is already set to 1
.
I'm running Ubuntu with home-manager.
In all these cases, if I set the permission bits to 4555 (with chmod 4555 <file>
) they all work. They are initially set to 0555
.
Any suggestions on how I could work around these problems?
Another standalone home-manager user here. I just updated my Ubuntu box from 23.10 -> 24.04 and am now running into this issue for Chromium and Slack (probably anything chromium or electron based). kernel.unprivileged_userns_clone
is also already set to 1
. Setting the permission of the SUID sandbox binary to 4555
does workaround this for now.
I didn't have any issues when on Ubuntu 23.10, this only started happening after the upgrade to 24.04.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.8.0-31-generic, Ubuntu, 24.04 LTS (Noble Numbat), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.21.2`
- nixpkgs: `/nix/store/7sn1rdxkdszc3mmqk61fhf3vmvakqnhb-source`
@camperboy1000 I'm also on 24.04.
I'm getting the same error. See #308128. It also affects
youtube-music
. Also, it seems related,ping
, which fails withping: Lacking privilege for icmp socket
, unless I change its permission bits.My
kernel.unprivileged_userns_clone
flag is already set to1
.I'm running Ubuntu with home-manager.
In all these cases, if I set the permission bits to 4555 (with
chmod 4555 <file>
) they all work. They are initially set to0555
.Any suggestions on how I could work around these problems?
I'm experiencing the same issues. Affected programs are the Brave browser and Obsidian. I'm running a fresh system with Kubuntu 24.04 (haven't tried 23.10). kernel.unprivileged_userns_clone
is 1
, which was the default value.
- system: `"x86_64-linux"`
- host os: `Linux 6.8.0-31-generic, Ubuntu, 24.04 LTS (Noble Numbat), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.21.2`
- nixpkgs: `/nix/store/fjs1x9gz2n1dvjqcyyl6qsw110qxc2zn-source`
It looks like this is related to apparmor being enabled by default on Ubuntu 24.04.
Workaround: for one session, do:
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
This works until the next reboot, I have tried it and it fixes the problems we are having.
They mention a permanent way to disable it, which is how it was before 24.04:
Disable this restriction using a persistent setting by adding a new file (
/etc/sysctl.d/60-apparmor-namespace.conf
) with the following contents:kernel.apparmor_restrict_unprivileged_userns=0
I'm back. I just updated my Ubuntu 24.04 and I'm having the problems again. My settings did not change, as we have discussed in the issue, but the problem is happening again. If anyone has a way to fix it this time, please let us know.
Can confirm that I am seeing the same thing after updating to Ubuntu 24.04. For me the failing program is codium.
$ codium --verbose
[39172:0924/234538.836078:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /nix/store/abha8v0h5rj1gjx0pr9g3y85s50rrnj3-vscodium-1.93.1.24256/lib/vscode/chrome-sandbox is owned by root and has mode 4755.
Describe the bug When using Nix as "Single User Installation", the SUID sandbox helpers break packages, e.g. Chromium.
SUID sanbox helpers do not make any sense when using Nix as "Single User Installation", and should be fixed/ignored there.
Example:
To Reproduce Steps to reproduce the behavior:
Notify maintainers @primeos @thefloweringash @bendlas
Metadata
"x86_64-linux"
no
no
nix-env (Nix) 2.3.10
"nixpkgs-21.05pre286914.3cc34f9e559"
/home/user/.nix-defexpr/channels/nixpkgs