1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 22:12:43 +01:00
nix/src
Emily b74f140866 libstore: fix sandboxed builds on macOS
The recent fix for CVE-2024-38531 broke the sandbox on macOS
completely. As it’s not practical to use `chroot(2)` on
macOS, the build takes place in the main filesystem tree, and the
world‐unreadable wrapper directory prevents the build from accessing
its `$TMPDIR` at all.

The macOS sandbox probably shouldn’t be treated as any kind of a
security boundary in its current state, but this specific vulnerability
wasn’t possible to exploit on macOS anyway, as creating `set{u,g}id`
binaries is blocked by sandbox policy.

Locking down the build sandbox further may be a good idea in future,
but it already has significant compatibility issues. For now, restore
the previous status quo on macOS.

Thanks to @alois31 for helping me come to a better understanding of
the vulnerability.

Fixes: 1d3696f0fb
Closes: #11002
(cherry picked from commit af2e1142b1)
2024-07-05 15:09:04 +00:00
..
build-remote Use the new StoreReference in Machine 2024-05-22 09:20:15 -04:00
libcmd Fix empty outputsToInstall for InstallableAttrPath 2024-06-02 14:26:18 +03:00
libexpr Tarball fetcher: Include revCount/lastModified in the fingerprint 2024-07-05 14:30:29 +00:00
libexpr-c clarify not on nix_value_force (#10842) 2024-06-04 07:41:04 +00:00
libfetchers Tarball fetcher: Include revCount/lastModified in the fingerprint 2024-07-05 14:30:29 +00:00
libmain Remove 100s of CPU time (10%) from build times (1465s -> 1302s) 2024-05-31 13:00:09 +02:00
libstore libstore: fix sandboxed builds on macOS 2024-07-05 15:09:04 +00:00
libstore-c add empty line to documentation comments after @brief field (#10800) 2024-05-28 23:05:40 +00:00
libutil Formatting 2024-06-21 17:07:55 +02:00
libutil-c C API: Use nix_get_string_callback typedef 2024-04-15 12:05:57 +02:00
nix nix flake metadata: Show flake fingerprint 2024-07-05 14:30:29 +00:00
nix-build fix: remove usage of XDG_RUNTIME_DIR for TMP 2024-06-10 13:40:45 +00:00
nix-channel downloadFile(): Remove the "locked" (aka "immutable") flag 2024-04-08 15:56:16 +02:00
nix-collect-garbage inline the usage of nix::readDirectory 2024-05-12 17:42:18 +05:30
nix-copy-closure Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
nix-env Remove 100s of CPU time (10%) from build times (1465s -> 1302s) 2024-05-31 13:00:09 +02:00
nix-instantiate Build a minimized Nix with MinGW 2024-04-17 12:26:10 -04:00
nix-store Factor our connection code for worker proto like serve proto 2024-05-27 00:43:46 -04:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00