Commit Graph
100 Commits
Author SHA1 Message Date
Joachim Fasting 5a42b5d076 pacman: set localstatedir to standard FHS path
Fixes https://github.com/NixOS/nixpkgs/issues/52981
2019-01-08 19:25:04 +01:00
Joachim Fasting 865f7a14b4 Revert "Revert "linux-hardened: Disable GCC_PLUGIN_RANDSTRUCT""
This reverts commit c68e8b05f0.

RANDSTRUCT currently fails to work with out-of-tree modules, as
evinced by
https://github.com/NixOS/nixpkgs/commit/c68e8b05f005381ac1caf51bb28282b70242b77b#commitcomment-31850284
and https://github.com/NixOS/nixpkgs/issues/53522.

Specifically, loading out-of-tree modules results in modsym version
mismatches, as in
   spl: version magic '4.20.0 SMP mod_unload modversions RANDSTRUCT_PLUGIN
from the issue above.

A working hypothesis is that the randstruct seed is not carried over when
building out-of-tree modules but more investigation is needed here.

Closes https://github.com/NixOS/nixpkgs/issues/53522
2019-01-07 19:50:12 +01:00
Joachim Fasting a4f51746f8 Revert "openafs: fix build against linux_hardened"
This reverts commit 4bb0a719cf.

Can be reveted once randstruct actually works
2019-01-07 19:50:06 +01:00
Joachim Fasting 4bb0a719cf openafs: fix build against linux_hardened
See https://hydra.nixos.org/build/86750041
and https://hydra.nixos.org/build/86749971
2019-01-06 14:08:27 +01:00
Joachim Fasting e6538caa48 nixos/tests: re-enable hardened test
Has been okay since 62623b60d5
2019-01-06 14:08:20 +01:00
Joachim Fasting 39c30a33c1 nixos/tests/hardened: test loading out-of-tree-modules 2019-01-06 13:19:28 +01:00
Joachim Fasting 167578163a nixos/hardened profile: always enable pti 2019-01-05 14:07:39 +01:00
Joachim Fasting 3f1f443125 nixos/hardened profile: slab/slub hardening
slab_nomerge may reduce surface somewhat

slub_debug is used to enable additional sanity checks and "red zones" around
allocations to detect read/writes beyond the allocated area, as well as
poisoning to overwrite free'd data.

The cost is yet more memory fragmentation ...
2019-01-05 14:07:37 +01:00
Joachim Fasting d62086e6fc hardened-config: allow slub/slab free poisoning 2019-01-05 14:07:36 +01:00
Joachim Fasting 11840f5c70 hardened-config: explain HARDENED_USERCOPY_FALLBACK n 2019-01-05 14:07:36 +01:00
Joachim Fasting dfd77a046d hardened-config: ensure STRICT_KERNEL_RWX
This is y in the default config, but enable it explicitly here to catch
situations where it has been disabled (explicitly or implicitly).
2019-01-05 14:07:35 +01:00
Joachim Fasting 1801aad7b8 hardened-config: clarify MODIFY_LDT_SYSCALL
This likely never worked; MODIFY_LDT_SYSCALL depends on EXPERT; enabling
EXPERT however seems to introduce quite a few changes that would need to be
properly vetted.

The version guard is unnecessary, however, as this config has been supported
since 4.3.
2019-01-05 14:07:34 +01:00
Joachim Fasting abc8ed3fca hardened-config: clarify readonly LSM hooks config
SECURITY_WRITABLE_HOOKS is implicitly controlled by SECURITY_SELINUX_DISABLE;
explicitly unsetting results in an error because the configfile builder fails
to detect that it has in fact been unset (reporting it as an unused option).
For now, leave WRITABLE_HOOKS as an "optional" config for documentation
purposes.
2019-01-05 14:07:33 +01:00
Joachim Fasting c68e8b05f0 Revert "linux-hardened: Disable GCC_PLUGIN_RANDSTRUCT"
This reverts commit 5dda1324be.

Presumably this was done to work around build errors or something but it
works fine now.
2019-01-05 14:07:21 +01:00
Joachim Fasting ea4f371627 nixos/security/misc: expose SMT control option
For the hardened profile disable symmetric multi threading.  There seems to be
no *proven* method of exploiting cache sharing between threads on the same CPU
core, so this may be considered quite paranoid, considering the perf cost.
SMT can be controlled at runtime, however.  This is in keeping with OpenBSD
defaults.

TODO: since SMT is left to be controlled at runtime, changing the option
definition should take effect on system activation.  Write to
/sys/devices/system/cpu/smt/control
2018-12-27 15:00:49 +01:00
Joachim Fasting e9761fa327 nixos/security/misc: expose l1tf mitigation option
For the hardened profile enable flushing whenever the hypervisor enters the
guest, but otherwise leave at kernel default (conditional flushing as of
writing).
2018-12-27 15:00:48 +01:00
Joachim Fasting 84fb8820db nixos/security/misc: factor out protectKernelImage
Introduces the option security.protectKernelImage that is intended to control
various mitigations to protect the integrity of the running kernel
image (i.e., prevent replacing it without rebooting).

This makes sense as a dedicated module as it is otherwise somewhat difficult
to override for hardened profile users who want e.g., hibernation to work.
2018-12-27 15:00:47 +01:00
Joachim Fasting 9db84f6fcd nixos/security/misc: use mkMerge for easier extension 2018-12-27 15:00:46 +01:00
Joachim Fasting 1ba77eeb22 tor-browser-bundle-bin: 8.0.3 -> 8.0.4 2018-12-14 12:51:13 +01:00
Joachim Fasting e7548891e3 uwsgi: fix build when withSystemd = false
Passing -lsystemd unconditionally breaks the build when withSystemd = false.
2018-12-07 13:25:06 +01:00
Joachim Fasting 21d83e5b11 rstudioWrapper: use runCommand, local build only
This seems more appropriate for a wrapper generator.
2018-12-05 20:59:41 +01:00
Joachim Fasting d2b467a2de rWrapper: use runCommand, local build only
This seems more appropriate for a wrapper generator.
2018-12-05 20:59:35 +01:00
Joachim Fasting 6a7f02d89d nixos/hardened: restrict access to nix daemon 2018-11-24 16:06:21 +01:00
Joachim Fasting 62623b60d5 nixos/tests/hardened: fix build by disabling nix.useSandbox 2018-11-24 16:06:18 +01:00
Joachim Fasting 6bd6c97ae8 apparmor: 2.12.0 -> 2.13.1 2018-10-22 20:36:34 +02:00
Joachim Fasting f4ea22e5de nixos/security/misc: init
A module for security options that are too small to warrant their own module.

The impetus for adding this module is to make it more convenient to override
the behavior of the hardened profile wrt user namespaces.
Without a dedicated option for user namespaces, the user needs to
1) know which sysctl knob controls userns
2) know how large a value the sysctl knob needs to allow e.g.,
   Nix sandbox builds to work

In the future, other mitigations currently enabled by the hardened profile may
be promoted to options in this module.
2018-10-15 23:11:37 +02:00
Joachim Fasting dd1b66e5d4 lkl: 2018-03-10 -> 2018-08-22
Among other things, this brings lkl up to linux 4.16
2018-10-15 19:17:09 +02:00
Joachim Fasting ff473c9ec7 pythonPackages.jsonrpclib: move expression to python-modules 2018-10-15 10:32:56 +02:00
Joachim Fasting 1a3ae02e66 pythonPackages.emoji: 0.5.0 -> 0.5.1 2018-10-15 10:32:48 +02:00
Joachim Fasting cb845123d4 nixos/hardened: add myself to maintainers 2018-10-15 01:33:33 +02:00
Joachim Fasting e619998eb3 nixos/lock-kernel-modules: add myself to maintainers 2018-10-15 01:33:30 +02:00
Joachim Fasting f2ba1a4284 tor-browser-bundle-bin: 8.0 -> 8.0.1 2018-09-22 20:13:55 +02:00
Joachim Fasting aacf68a635 tor-browser-bundle-bin: stdenv.shell -> runtimeShell in wrapper 2018-09-13 17:45:50 +02:00
Joachim Fasting 546e511edc tor-browser-bundle-bin: parameterize icon theme 2018-09-13 17:45:49 +02:00
Joachim Fasting 5710ee3bef tor-browser-bundle-bin: add gsettings-schemas
See https://github.com/NixOS/nixpkgs/issues/46587
2018-09-13 17:45:43 +02:00
Joachim Fasting 1e379f29f7 electrum: 3.1.3 -> 3.2.3 2018-09-12 21:22:23 +02:00
Joachim Fasting 48abf865bc tor: 0.3.3.9 -> 0.3.4.8 2018-09-11 14:44:10 +02:00
Joachim Fasting ed5283fcf5 tor-browser-bundle-bin: 7.5.6 -> 8.0 2018-09-11 13:27:27 +02:00
Joachim Fasting 08144faaac tor: 0.3.3.8 -> 0.3.3.9 2018-07-14 22:50:36 +02:00
Joachim Fasting 044653e047 dnscrypt-proxy2: meta.description nit 2018-07-10 19:45:34 +02:00
Joachim Fasting b9c953eb19 nixos/tests/tor: a minimal test
For now check that the default client config boots.

Ideas for the future:
- Expand on control via netcat
- Configure a circuit of nodes exercise various configs (e.g., check
  that a client node can access a hidden www service).  Needs setting up
  authoritative directory servers &c.
2018-06-21 00:26:44 +02:00
Joachim Fasting c449f0b55c nixos/tor: grammer fix, advise -> advice
Seems to me that the noun form is more appropriate here.
2018-06-18 12:40:09 +02:00
Joachim Fasting e701948f5a tor: 0.3.3.6 -> 0.3.3.7 2018-06-12 22:33:33 +02:00
Joachim Fasting fc618a15e8 tor-browser-bundle-bin: 7.5.4 -> 7.5.5 2018-06-09 22:10:08 +02:00
Joachim Fasting 2be28b1df5 Revert "Merge pull request #38263 from lopsided98/grub-initrd-secrets"
This reverts commit c06d7950f1, reversing
changes made to 4c25fbe338.

See https://github.com/NixOS/nixpkgs/issues/41608
2018-06-07 14:24:59 +02:00
Joachim Fasting 1c14927d69 tor: 0.3.2.10 -> 0.3.3.6
First stable release in the 0.3.3.x series
2018-05-23 21:49:14 +02:00
Joachim Fasting b15da3e330 tor-browser-bundle-bin: 7.5.3 -> 7.5.4 2018-05-11 14:08:08 +02:00
Joachim Fasting 9df35787f1 tor-browser-bundle-bin: allow unset XAUTHORITY
Apparently this can happen on e.g., fedora.

Closes https://github.com/NixOS/nixpkgs/issues/38671
2018-04-29 12:17:30 +02:00
Joachim Fasting 33615ccfa5 linux_hardened: enforce usercopy whitelisting
The default is to warn only
2018-04-29 12:17:24 +02:00
Joachim Fasting 707a1ce0da tor-browser-bundle-bin: 7.5.2 -> 7.5.3 2018-03-27 18:10:58 +02:00
Joachim Fasting f5a48fe3c9 electrum: 3.1.0 -> 3.1.1 2018-03-27 18:10:49 +02:00
Joachim Fasting d09b4d7b2e tor-browser-bundle-bin: 7.5.1 -> 7.5.2 2018-03-26 12:27:44 +02:00
Joachim Fasting 4e1083256b Revert "Merge pull request #35636 from ryantm/auto-update/emscripten-1.37.16-to-1.37.34"
This reverts commit 5c02b9ab33, reversing
changes made to 2f2ad74369.

https://github.com/NixOS/nixpkgs/pull/35636#issuecomment-373171672
2018-03-14 22:08:01 +01:00
Joachim Fasting 6f9a9e8876 tor-browser-bundle-bin: 7.5 -> 7.5.1 2018-03-14 21:58:35 +01:00
Joachim Fasting fb8a85f631 ntbtls: 0.1.1 -> 0.1.2 2018-03-11 01:33:57 +01:00
Joachim Fasting 53f057f21b electrum: 3.0.6 -> 3.1.0 2018-03-06 23:30:05 +01:00
Joachim Fasting 9c0e9f6a30 tor: initial updateScript
Tested briefly, seems to work okay. The gpg stuff could be better,
however.
2018-03-04 23:47:01 +01:00
Joachim Fasting e4581f05e4 tor: 0.3.2.9 -> 0.3.2.10
Contains fixes for TROVE-2018-001, TROVE-2018-002, TROVE-2018-003, and
TROVE-2018-004.
2018-03-04 13:12:49 +01:00
Joachim Fasting 05f5cdcf66 Revert "Merge pull request #30031 from dtzWill/update/leo-5.6"
This reverts commit 67c5cb23e9, reversing
changes made to 431c004fbd.

I failed to notice that this depends on a package that had since
been removed. My bad :(
2018-02-17 12:21:26 +01:00
Joachim Fasting eff73c6698 tor-browser-bundle-bin: 7.0.11 -> 7.5 2018-01-27 01:05:38 +01:00
Joachim Fasting 87677d0390 tor: 0.3.1.9 -> 0.3.2.9
- Adds next-generation onion services[1]
- Lots of fixes, e.g., for CVE-2017-8821, CVE-2017-8820, CVE-2017-8823,
  CVE-2017-8819, CVE-2017-8822, CVE-2017-8822
- Adds new option `NoExec` to disallow exec syscalls
2018-01-13 18:22:45 +01:00
Joachim Fasting e5d9d61d65 electrum: 3.0.4 -> 3.0.5
Still more work to fix RPC vulns
2018-01-08 09:10:14 +01:00
Joachim Fasting 5dc2853981 nixos/dnscrypt-proxy: remove
The upstream project ceased.

See https://github.com/NixOS/nixpkgs/issues/33540
2018-01-07 17:00:32 +01:00
Joachim Fasting 3b367119ee tinycc: 0.9.27pre-20171016 -> 0.9.27 2017-12-18 16:06:42 +01:00
Joachim Fasting 97ab2f0d8b electrum: 3.0.2 -> 3.0.3
Note that due to runtime impurities, non-NixOS users must prepend and export
QT_PLUGIN_PATH=${qt5.qtbase.qtPluginPrefix}
and
LD_LIBRARY_PATH=/run/opengl-driver/lib
before running electrum, lest it fail to find runtime dependencies or pick
up mismatching libraries from the host system.
2017-12-12 14:32:42 +01:00
Joachim Fasting eae2aa7eae tor-browser-bundle-bin: 7.0.10 -> 7.0.11 2017-12-10 00:32:59 +01:00
Joachim Fasting df0300cf67 tor-browser-bundle-bin: 7.0.9 -> 7.0.10 2017-11-15 22:10:52 +01:00
Joachim Fasting 870c86d0ee linux_hardened: structleak covers structs passed by address 2017-11-15 22:10:50 +01:00
Joachim Fasting 8ecae36963 linux_hardened: enable slab freelist hardening 2017-11-15 22:10:44 +01:00
Joachim Fasting cd722e1678 surf: use https 2017-11-08 01:04:13 +01:00
Joachim Fasting 86bc99cc8a tor-browser-bundle-bin: 7.0.8 -> 7.0.9 2017-11-04 12:19:58 +01:00
Joachim Fasting 2b496a80ff tor-browser-bundle-bin: 7.0.7 -> 7.0.8 2017-10-26 22:39:35 +02:00
Joachim Fasting 5a64e446ff tor: 0.3.1.7 -> 0.3.1.8
Quoth the release notes:

> It includes several bugfixes, including a bugfix for a crash issue that
had affected relays under memory pressure. It also adds a new directory
authority, Bastet.
2017-10-26 22:39:24 +02:00
Joachim Fasting a09d626053 tor-browser-bundle-bin: support installing extensions
Closes https://github.com/NixOS/nixpkgs/issues/30443
2017-10-20 15:26:46 +02:00
Joachim Fasting eba08858cc tor-browser-bundle-bin: 7.0.6 -> 7.0.7 2017-10-20 15:26:31 +02:00
Joachim Fasting a8a38feeeb lkl: 2017-08-09 -> 2017-10-18
Based on linux 4.13
2017-10-18 22:11:37 +02:00
Joachim Fasting 5c732e3c46 tinycc: 0.9.27pre-20170924 -> 0.9.27pre-20171016 2017-10-18 22:11:32 +02:00
Joachim Fasting 6d31872885 tor-browser-bundle.noscript: 5.0.10 -> 5.1.2 2017-10-18 22:11:28 +02:00
Joachim Fasting 9cf5492a7b tor-browser-bundle.https-everywhere: 2017.9.12 -> 2017.10.4 2017-10-18 22:11:23 +02:00
Joachim Fasting 9c8a0c0bcc tor-browser-bundle.tor-launcher: 0.2.12.3 -> 0.2.13 2017-10-18 22:11:17 +02:00
Joachim Fasting 05b2f85590 tor-browser-bundle-bin: 7.0.5 -> 7.0.6 2017-10-03 02:42:51 +02:00
Joachim Fasting 378811fe2d libsodium: 1.0.13 -> 1.0.15 2017-10-03 02:42:49 +02:00
Joachim Fasting f4f594e359 tor-browser-bundle: geoip support 2017-10-03 02:42:48 +02:00
Joachim Fasting ba689a2740 tor-browser-bundle: support transports obfs2,obfs3 2017-10-03 02:42:47 +02:00
Joachim Fasting ae4c8e0889 tor-browser-bundle: bump https-everywhere to 2017.9.12 2017-10-03 02:42:41 +02:00
Joachim Fasting 387f1c75f5 tor-browser-bundle: minor refactorings 2017-09-28 15:40:18 +02:00
Joachim Fasting 3ec05d6237 tor-browser-bundle: feature parity with the binary bundle
This will be factored later (eventually both will be subsumed by a more
generic construct).

Don't bother with pulseaudio support, however.
2017-09-28 15:40:10 +02:00
Joachim Fasting 35c15d4a61 tinycc: 0.9.27pre-20170911 -> 0.9.27pre-20170924
Improves `long` handling
2017-09-28 03:06:11 +02:00
Joachim Fasting a06f839439 nixos/release-notes: notable changes to the dnscrypt-proxy service 2017-09-27 23:47:15 +02:00
Joachim Fasting 931da53e50 tor-browser-bundle: support passing additional extensions 2017-09-27 22:58:12 +02:00
Joachim Fasting 2651602c17 tor-browser-bundle: factor out extensions 2017-09-27 22:58:07 +02:00
Joachim Fasting 206e4a6d69 tor-browser-bundle: basic checks for the wrapper script 2017-09-26 23:17:12 +02:00
Joachim Fasting fc44e91ad5 tor-browser-bundle: use fonts from Nixpkgs 2017-09-26 23:17:11 +02:00
Joachim Fasting f05d50f36c tor-browser-bundle: approximate upstream bundle & purity control 2017-09-26 23:17:10 +02:00
Joachim Fasting 93b9109b46 tor-browser-bundle: clear pref bootstrappedAddons for purity 2017-09-26 23:17:09 +02:00
Joachim Fasting 0c26be5bd2 tor-browser-bundle: improve organization of distribution dir
Store TBB specific files under TorBrowser-Data
2017-09-26 23:17:08 +02:00
Joachim Fasting 346661d77b tor-browser-bundle: redo extensions 2017-09-26 23:17:08 +02:00
Joachim Fasting fe3b95e749 tor-browser-bundle: customization via extraPrefs 2017-09-26 23:17:02 +02:00
Joachim Fasting 19ecb7f287 tor-browser-bundle: init at 7.0.1 (from source)
The original browser bundle expects to run from a bundled directory,
typically under user's home.  This version creates a firefox distribution
with preloaded extensions and settings that functions more like an
ordinary firefox installation.

The approach used here could be generalized to allow specification of
custom firefox distributions.  Eventually, the code will be factored so
that the tbb is just an instance of that more general construct (firefox
base + extensions + prefs).

Currently, we use the latest upstream versions of extensions and so on.
Eventually we want to track the upstream bundle more closely and ideally
use the exact same inputs (firefox source, extension sources).

To avoid mixing up profile data, all runtime state is stored under
$XDG_DATA_HOME/tor-browser.

Major TODO items
- Pluggable transports
- Upstream TBB version parity
- Avoid fetchgit
- Build NoScript from source (no upstream source repo, however, must rely
  on third-parties)
- Improved notation for packaging extensions
- Feature parity with the binary bundle (apulse and runtime purity, in
  particular)
2017-09-26 14:55:49 +02:00
Joachim Fasting 799c1218cd tor-browser-bundle-bin: default to dmix
To support multiple playback streams
2017-09-25 16:11:57 +02:00