Nix, the purely functional package manager
Go to file
Andrew Marshall 8f439a2c3c libstore: fix port binding in __darwinAllowLocalNetworking sandbox
In d60c3f7f7c, this was changed to close a
hole in the sandbox. Unfortunately, this was too restrictive such that it
made local port binding fail, thus making derivations that needed
`__darwinAllowLocalNetworking` gain nearly nothing, and thus largely
fail (as the primary use for it is to enable port binding).

This unfortunately does mean that a sandboxed build process can, in
coordination with an actor outside the sandbox, escape the sandbox by
binding a port and connecting to it externally to send data. I do not
see a way around this with my experimentation and understanding of the
(quite undocumented) macOS sandbox profile API. Notably it seems not
possible to use the sandbox to do any of:

- Restrict the remote IP of inbound network requests
- Restrict the address being bound to

As such, the `(local ip "*:*")` here appears to be functionally no
different than `(local ip "localhost:*")` (however it *should* be
different than removing the filter entirely, as that would make it also
apply to non-IP networking). Doing `(allow network-inbound (require-all
(local ip "localhost:*") (remote ip "localhost:*")))` causes listening
to fail.

Note that `network-inbound` implies `network-bind`.

(cherry picked from commit 00f6db36fd)
2024-08-17 03:17:43 +00:00
.github Bump zeebe-io/backport-action from 2.5.0 to 3.0.2 2024-05-28 13:10:48 +00:00
build installerScriptForGHA: aarch64-darwin 2024-07-03 18:22:47 +00:00
config Remove and gitignore the autoreconf generated files 2024-03-02 10:18:47 +01:00
contrib function-trace: always show the trace 2019-09-18 23:23:21 +02:00
dep-patches Move dependency patches from top level into subdir 2024-01-17 13:13:54 -05:00
doc Fix rl-next/harden-user-sandboxing.md syntax 2024-07-01 12:57:28 +02:00
m4 Build a minimized Nix with MinGW 2024-04-17 12:26:10 -04:00
maintainers Merge pull request #10806 from jdek/riscv64_install 2024-06-03 15:42:13 +02:00
misc Remove custom lowdown 2023-12-13 16:25:18 -05:00
mk Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
perl Add setting to warn about copying/hashing large paths 2024-05-13 11:52:27 +02:00
scripts Merge pull request #10806 from jdek/riscv64_install 2024-06-03 15:42:13 +02:00
src libstore: fix port binding in __darwinAllowLocalNetworking sandbox 2024-08-17 03:17:43 +00:00
tests src/nix/prefetch: fix prefetch containing current directory instead of tarball 2024-07-05 18:33:21 +00:00
.clang-format Add StoreReference::render 2024-05-22 09:20:15 -04:00
.clang-tidy Add .clang-tidy 2024-02-01 01:01:39 +01:00
.dir-locals.el .dir-locals.el: Set c-block-comment-prefix 2020-07-10 11:21:06 +02:00
.editorconfig .editorconfig: Also affect Perl FFI xs file 2023-11-09 23:11:52 -05:00
.gitignore Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
.shellcheckrc Start getting all shell scripts passing shellcheck 2024-05-27 22:39:56 -04:00
.version Bump version 2024-07-08 12:36:05 +02:00
CITATION.cff chore: PhD thesis as reference in CITATION.cff 2024-05-18 20:05:22 +02:00
configure.ac Use CFLAGS for libseccomp from pkg-config also for the CFLAGS 2024-05-21 00:52:11 +02:00
CONTRIBUTING.md add a recommendation for first-time contributors (#10605) 2024-04-25 13:34:15 +02:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
default.nix add flake-compat to flake.nix and use sha256 in default.nix 2023-03-06 21:11:24 +01:00
docker.nix fix "add an option to include flake-registry..." 2023-05-16 14:35:31 +02:00
flake.lock Add pre-commit hook and make format target 2024-04-21 13:54:34 +02:00
flake.nix Mark official release 2024-06-04 16:23:19 +02:00
local.mk local.mk: Solve warnings 2024-04-17 15:37:14 +02:00
Makefile add and fix -Wignored-qualifiers 2024-05-17 19:29:50 +02:00
Makefile.config.in C API: fix docs build after rebase 2024-03-28 10:51:59 +01:00
package.nix Move libseccomp source override outside package.nix 2024-04-25 16:38:35 -04:00
precompiled-headers.h Build a minimized Nix with MinGW 2024-04-17 12:26:10 -04:00
README.md fix: Remove extra to from README.md (#9213) 2023-10-23 19:20:23 +02:00
shell.nix Remove url literals 2022-01-24 13:28:21 +01:00

Nix

Open Collective supporters Test

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.

Installation and first steps

Visit nix.dev for installation instructions and beginner tutorials.

Full reference documentation can be found in the Nix manual.

Building And Developing

See our Hacking guide in our manual for instruction on how to set up a development environment and build Nix from source.

Contributing

Check the contributing guide if you want to get involved with developing Nix.

Additional Resources

License

Nix is released under the LGPL v2.1.