mirror of
https://github.com/NixOS/nix
synced 2025-07-18 02:58:27 +02:00
Check the CA hash when importing stuff in the local store
When adding a path to the local store (via `LocalStore::addToStore`), ensure that the `ca` field of the provided `ValidPathInfo` does indeed correspond to the content of the path. Otherwise any untrusted user (or any binary cache) can add arbitrary content-addressed paths to the store (as content-addressed paths don’t need a signature).
This commit is contained in:
parent
5713ff48c3
commit
3dbd83b9a1
4 changed files with 97 additions and 2 deletions
|
@ -12,6 +12,7 @@ nix_tests = \
|
|||
timeout.sh secure-drv-outputs.sh nix-channel.sh \
|
||||
multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \
|
||||
binary-cache.sh nix-profile.sh repair.sh dump-db.sh case-hack.sh \
|
||||
substitute-with-invalid-ca.sh \
|
||||
check-reqs.sh pass-as-file.sh tarball.sh restricted.sh \
|
||||
placeholders.sh nix-shell.sh \
|
||||
linux-sandbox.sh \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue