Do something about allowNewPrivileges
setting #265
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#265
Loading…
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?
I noticed that we have a setting
allow-new-privileges
which seems to be using some highly questionable seccomp APIs to disable setting NO_NEW_PRIVS. However, I am extremely dubious that this is a good idea to have as a setting, and we broke it anyway recently by redundantly explicitly setting NO_NEW_PRIVS with prctl. Also:filterSyscalls
will make this setting have no effect.I am inclined to just remove the
filterSyscalls
andallowNewPrivileges
settings altogether, since they seem like liabilities and we would like to improve the clarity in what the sandbox does. We would like to know what people are actually using these for, if anything; the use cases I can imagine are where Nix is being thoroughly broken, and it is probably a bad idea to be able to set these globally at all, rather than on individual derivations. I think my most relaxed view on these is that they should be removed from the release build and require a build option to enable; but I would rather not have the complexity of a build option for functionality I'm not convinced anyone needs.We should probably also check that we drop ambient/inherited capabilities with
cap_set_mode(CAP_MODE_NOPRIV);
in the builder.cc @k900
#217 note that we would kind of rather not add more unprincipled derivation settings dumped into the environment namespace of a derivation, especially if they might be unnecessary.
My take is that we should just not allow disabling the sandbox, except maybe disabling ALL OF IT for debugging sandbox-related issues.
agreed, yeet it. looks like this was added seven years ago to fix some broken tests in nixpkgs.
if anyfew want to gain privileges they should just do it via a privsep proxy daemon passed in through extra sandbox paths. real allow-new-privileges isn't just dubious but can completely break the store at the very least, which is something we absolutely have to avoid as a builtin feature <,<
Resolution: delete these two settings. Force them to always on and delete the conditionals driven by them.
https://gerrit.lix.systems/c/lix/+/1063
nuked