nixpkgs/pkgs/build-support
rnhmjoj c945723356
buildFHSEnv: disable security features by default
The implicit contract of buildFHSUserEnv was that it allows to run
software built for a typical GNU/Linux distribution (not NixOS) without
patching it (patchelf, autoPatchelfHook, etc.). Note that this does not
inherently imply running untrusted programs.

buildFHSUserEnv was implemented by using chroot and assembling a
standard-compliant FHS environment in the new root. As expected, this
did not provide any kind of isolation between the system and the
programs.

However, when it was later reimplemented using bubblewrap
(PR #225748), which *is* a security tool, several isolation features
involving detaches Linux namespaces were turned on by default.
This decision has introduced a number of breakages that are very
difficult to debug and trace back to this change.
For example: `unshareIPC` breaks software audio mixing in programs using
ALSA (dmix) and `unsharePID` breaks gdb,

Since:

  1. the security features were enable without any clear threat model;
  2. `buildFHSEnvBubblewrap` is supposed to be a drop-in replacement of
     `buildFHSEnvChrootenv` (see the release notes for NixOS 23.05);
  3. the change is breaking in several common cases (security does not
     come for free);
  4. the contract was not changed, or at least communicated in a clear
     way to the users;

all security features should be turned off by default.

P.S. It would be useful to create a variant of buildFHSEnv that does
provide some isolation. This could unshare some namespaces and mount
only limited parts of the filesystem.
Note that buildFHSEnv mounts every directory in / under the new root, so
again, very little is gained by unsharing alone.
2023-09-08 09:15:50 +02:00
..
add-opengl-runpath
agda
alternatives lapack: force a rebuild on x86_64-darwin 2023-03-24 08:57:05 +01:00
appimage tree-wide: buildFHSUserEnv -> buildFHSEnv 2023-04-16 10:15:13 +02:00
binary-cache binary-cache: use lib.makeBinPath 2023-06-30 00:42:14 +02:00
bintools-wrapper Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
build-bazel-package buildBazelPackage: add support for bazel run targets 2023-08-02 16:05:55 +08:00
build-fhsenv-bubblewrap buildFHSEnv: disable security features by default 2023-09-08 09:15:50 +02:00
build-fhsenv-chroot buildFHSEnv: fix NIX_LDFLAGS propagation to ld wrapper 2023-08-21 07:50:37 +01:00
build-graalvm-native-image
build-setupcfg
buildenv buildenv: Limit exclusion of info/dir 2023-07-09 22:06:26 -04:00
cc-wrapper win-dll-links: also copy dll from dependencies 2023-08-31 21:47:48 +03:00
coq
dart buildDartApplication: Supply CA bundle to Dart in FOD 2023-08-29 13:12:15 +02:00
deterministic-uname
dhall
docker dockerTools: replace fakechroot with proot 2023-08-19 23:34:21 +09:00
dotnet Merge pull request #249091 from TomaSajt/dotnet-fix 2023-08-23 14:04:47 +09:00
emacs build-support/emacs: fix name when overrideAttrs is used 2023-09-06 02:24:07 +00:00
expand-response-params
fake-nss
fetch9front lib: add fetchFrom9Front 2023-07-23 13:16:28 -05:00
fetchbitbucket treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchbower
fetchbzr
fetchcvs treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchdarcs fetchdarcs: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchdebianpatch fetchDebianPatch: Handle the case of lib* packages 2023-08-30 08:28:45 +00:00
fetchdocker treewide: don't hardcode /nix/store (no rebuilds changes) 2023-03-24 20:11:33 +02:00
fetchfirefoxaddon fetchfirefoxaddon: fix passing md5 to fetchurl 2023-07-28 16:18:15 -04:00
fetchfossil
fetchgit Merge pull request #252865 from emily-is-my-username/fix/fetchgit-deepclone 2023-09-06 14:08:06 +02:00
fetchgitea treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgithub treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
fetchgitiles treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgitlab treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgitlocal treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchgx
fetchhg fetchhg: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchipfs
fetchmavenartifact fetchMavenArtifact: deprecate phases & use pname+version 2023-03-26 18:44:55 +02:00
fetchmtn
fetchnextcloudapp fetchNextcloudApp: remove backwards compat for old interface 2023-08-20 13:41:43 +02:00
fetchpatch
fetchpijul build-support: Add fetchpijul function. 2023-07-17 18:44:06 +02:00
fetchpypi
fetchrepoorcz
fetchrepoproject fetchrepoproject: fix a bug that was there since bef6bef0d2 2023-08-06 12:17:09 +00:00
fetchs3
fetchsavannah treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
fetchsourcehut fetchFromSourcehut: expose gitRepoUrl to consumers 2023-06-11 09:02:34 +01:00
fetchsvn fetchsvn: clean up md5 references 2023-07-20 21:24:07 -07:00
fetchsvnrevision
fetchsvnssh fetchsvnssh: clean up md5 references 2023-07-20 21:24:13 -07:00
fetchurl fetchurl: cleanup a bit by moving the warning into assert 2023-08-08 13:38:11 +00:00
fetchzip fetchzip: cleanup and improve metrics a bit 2023-08-08 13:25:28 +00:00
flutter Merge pull request #251409 from gilice/flutter-313 2023-08-30 22:00:14 +02:00
go Revert "buildGoModule: set GOPROXY to go default" 2023-08-22 09:20:22 +10:00
icon-conv-tools
install-shell-files
java
kernel Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
libredirect libredirect: Fix segfault handling null paths 2023-08-19 00:58:43 +02:00
make-darwin-bundle
make-desktopitem
make-hardcode-gsettings-patch
make-pkgconfigitem
make-startupitem make-startupitem: fix typo in comment 2023-08-16 18:03:02 +02:00
mkshell
mono-dll-fixer
nix-gitignore Merge pull request #239624 from Stunkymonkey/use-optionalString-then 2023-07-22 13:02:47 +02:00
node buildNpmPackage: use installManPage 2023-08-19 10:04:00 -07:00
nuke-references
ocaml ocamlPackages: default to version 3 of Dune 2023-05-12 05:50:40 +02:00
oci-tools
pkg-config-wrapper treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
portable-service
prefer-remote-fetch
references-by-popularity
release treewide: use lib.optionalAttrs 2023-07-24 21:59:17 +02:00
remove-references-to Merge pull request #162447 from thefloweringash/remove-references-to-region 2023-05-17 12:34:28 +03:00
replace-secret
rust default-crate-overrides: add libseat-sys 2023-08-26 01:08:29 -07:00
setup-hooks win-dll-links: also copy dll from dependencies 2023-08-31 21:47:48 +03:00
singularity-tools
snap
src-only nixos/tests: Test that Remote SSH can patch Node 2023-06-09 18:21:41 +10:00
substitute
substitute-files
templaterpm
testers testers.hasPkgConfigModules: allow checking multiple pkg-config mods 2023-08-08 19:16:48 +02:00
trivial-builders Merge pull request #251369 from srid/writeShellApplication-meta 2023-09-01 16:53:49 -04:00
vm build-support/vm: fix makeImageTestScript 2023-08-24 09:09:43 +01:00
wrapper-common wrapBintoolsWith: support LINK.EXE-style args in purity checks 2023-04-29 01:37:00 +00:00
writers Merge branch 'staging-next' into staging 2023-08-05 07:45:29 +02:00
build-maven.nix
build-pecl.nix
closure-info.nix
make-impure-test.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix