tvl-depot/src/libstore
Eelco Dolstra b2027f70d9 * Fix a huuuuge security hole in the Nix daemon. It didn't check that
derivations added to the store by clients have "correct" output
  paths (meaning that the output paths are computed by hashing the
  derivation according to a certain algorithm).  This means that a
  malicious user could craft a special .drv file to build *any*
  desired path in the store with any desired contents (so long as the
  path doesn't already exist).  Then the attacker just needs to wait
  for a victim to come along and install the compromised path.

  For instance, if Alice (the attacker) knows that the latest Firefox
  derivation in Nixpkgs produces the path

    /nix/store/1a5nyfd4ajxbyy97r1fslhgrv70gj8a7-firefox-5.0.1

  then (provided this path doesn't already exist) she can craft a .drv
  file that creates that path (i.e., has it as one of its outputs),
  add it to the store using "nix-store --add", and build it with
  "nix-store -r".  So the fake .drv could write a Trojan to the
  Firefox path.  Then, if user Bob (the victim) comes along and does

    $ nix-env -i firefox
    $ firefox

  he executes the Trojan injected by Alice.

  The fix is to have the Nix daemon verify that derivation outputs are
  correct (in addValidPath()).  This required some refactoring to move
  the hash computation code to libstore.
2011-07-20 18:10:47 +00:00
..
build.cc * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
derivations.cc * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
derivations.hh * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
gc.cc * Wrap deleteFromStore() in a transaction. Otherwise there might be a 2010-10-14 15:55:51 +00:00
globals.cc Add support for the build-timeout' and --timeout' options. 2011-06-30 15:19:13 +00:00
globals.hh Add support for the build-timeout' and --timeout' options. 2011-06-30 15:19:13 +00:00
local-store.cc * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
local-store.hh * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
Makefile.am * Sync with the trunk. 2010-05-12 22:13:09 +00:00
misc.cc * Before a build, show the disk space that the downloaded store paths 2010-11-17 14:31:42 +00:00
misc.hh * Before a build, show the disk space that the downloaded store paths 2010-11-17 14:31:42 +00:00
optimise-store.cc * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
pathlocks.cc * Revert r19797, and use a simpler solution: just don't monitor build 2010-02-03 21:38:41 +00:00
pathlocks.hh * Revert r19797, and use a simpler solution: just don't monitor build 2010-02-03 21:38:41 +00:00
references.cc * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
references.hh * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
remote-store.cc * Handle error messages from the Nix worker containing the `%' 2011-04-19 10:44:44 +00:00
remote-store.hh * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
schema.sql * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
store-api.cc * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
store-api.hh * Fix a huuuuge security hole in the Nix daemon. It didn't check that 2011-07-20 18:10:47 +00:00
worker-protocol.hh * Propagate the "100" exit status for failed builds through the Nix 2010-12-17 11:28:26 +00:00