1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 20:46:01 +01:00
nix/doc/manual/src
Théophane Hufschmitt e5a211d77e Add an owner check when searching for the flake root
When searching up the filesystem for the root of the flake (the
directory that contains the `flake.nix`), don’t go anywhere up if we
encounter a directory owned by a different user, as otherwise this other
user could craft an arbitrary flake, potentially causing bad stuff to
happen (shouldn’t in most cases since all it could do is run sanboxed
builds, but there’s probably a lot of edge-cases that would make this
very undesirable).

This is to fix Nix’s equivalent of CVE-2022-24765

This check is intentionnally not applied to the exact directory
specified since:
1. It’s up to the user to not point to an untrusted input
2. In multi-user Nix installations, that would prevent from using a
   flake in the Nix store (since it’s owned by root and not the current
   user)

Fix #6408
2023-06-19 15:01:12 +02:00
..
advanced-topics rewrap lines to use one line per sentence 2023-05-31 01:32:03 +02:00
architecture Add description for file system objects (#8500) 2023-06-18 23:45:08 -04:00
command-ref Improve nix-collect-garbage docs 2023-06-14 19:01:08 -04:00
contributing Fix wikipedia links (#8533) 2023-06-17 09:06:17 +00:00
figures Move figures 2020-07-24 12:58:31 +02:00
installation nix actually needs c++20 now 2023-06-10 13:56:05 +02:00
language make domain-specificity more specific 2023-06-15 03:08:07 +02:00
package-management Convert short nix options to long ones 2023-05-17 08:10:30 +01:00
protocols Apply suggestions from code review 2023-06-16 16:48:37 +02:00
release-notes Add an owner check when searching for the flake root 2023-06-19 15:01:12 +02:00
glossary.md Add description for file system objects (#8500) 2023-06-18 23:45:08 -04:00
introduction.md Convert short nix options to long ones 2023-05-17 08:10:30 +01:00
quick-start.md Update doc/manual/src/quick-start.md 2023-02-19 20:00:02 -05:00
SUMMARY.md.in Add description for file system objects (#8500) 2023-06-18 23:45:08 -04:00