summary refs log tree commit diff
path: root/nixos
Commit message (Collapse)AuthorAge
* services.mesa -> hardware.openglShea Levy2014-02-08
| | | | Signed-off-by: Shea Levy <shea@shealevy.com>
* ModemManager: 0.5.4.0 -> 0.7.991Domen Kožar2014-02-08
|
* Merge branch 'yubikey' of git://github.com/Calrama/nixpkgsPetr Rockai2014-02-08
|\
| * Update to the Yubikey PBAMoritz Maxeiner2014-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Security-relevant changes: * No (salted) passphrase hash send to the yubikey, only hash of the salt (as it was in the original implementation). * Derive $k_luks with PBKDF2 from the yubikey $response (as the PBKDF2 salt) and the passphrase $k_user (as the PBKDF2 password), so that if two-factor authentication is enabled (a) a USB-MITM attack on the yubikey itself is not enough to break the system (b) the potentially low-entropy $k_user is better protected against brute-force attacks * Instead of using uuidgen, gather the salt (previously random uuid / uuid_r) directly from /dev/random. * Length of the new salt in byte added as the parameter "saltLength", defaults to 16 byte. Note: Length of the challenge is 64 byte, so saltLength > 64 may have no benefit over saltLengh = 64. * Length of $k_luks derived with PBKDF2 in byte added as the parameter "keyLength", defaults to 64 byte. Example: For a luks device with a 512-bit key, keyLength should be 64. * Increase of the PBKDF2 iteration count per successful authentication added as the parameter "iterationStep", defaults to 0. Other changes: * Add optional grace period before trying to find the yubikey, defaults to 2 seconds. Full overview of the yubikey authentication process: (1) Read $salt and $iterations from unencrypted device (UD). (2) Calculate the $challenge from the $salt with a hash function. Chosen instantiation: SHA-512($salt). (3) Challenge the yubikey with the $challenge and receive the $response. (4) Repeat three times: (a) Prompt for the passphrase $k_user. (b) Derive the key $k_luks for the luks device with a key derivation function from $k_user and $response. Chosen instantiation: PBKDF2(HMAC-SHA-512, $k_user, $response, $iterations, keyLength). (c) Try to open the luks device with $k_luks and escape loop (4) only on success. (5) Proceed only if luks device was opened successfully, fail otherwise. (6) Gather $new_salt from a cryptographically secure pseudorandom number generator Chosen instantiation: /dev/random (7) Calculate the $new_challenge from the $new_salt with the same hash function as (2). (8) Challenge the yubikey with the $new_challenge and receive the $new_response. (9) Derive the new key $new_k_luks for the luks device in the same manner as in (4) (b), but with more iterations as given by iterationStep. (10) Try to change the luks device's key $k_luks to $new_k_luks. (11) If (10) was successful, write the $new_salt and the $new_iterations to the UD. Note: $new_iterations = $iterations + iterationStep Known (software) attack vectors: * A MITM attack on the keyboard can recover $k_user. This, combined with a USB-MITM attack on the yubikey for the $response (1) or the $new_response (2) will result in (1) $k_luks being recovered, (2) $new_k_luks being recovered. * Any attacker with access to the RAM state of stage-1 at mid- or post-authentication can recover $k_user, $k_luks, and $new_k_luks * If an attacker has recovered $response or $new_response, he can perform a brute-force attack on $k_user with it without the Yubikey needing to be present (using cryptsetup's "luksOpen --verify-passphrase" oracle. He could even make a copy of the luks device's luks header and run the brute-force attack without further access to the system. * A USB-MITM attack on the yubikey will allow an attacker to attempt to brute-force the yubikey's internal key ("shared secret") without it needing to be present anymore. Credits: * Florian Klien, for the original concept and the reference implementation over at https://github.com/flowolf/initramfs_ykfde * Anthony Thysse, for the reference implementation of accessing OpenSSL's PBKDF2 over at http://www.ict.griffith.edu.au/anthony/software/pbkdf2.c
| * Replace the current Yubikey PBA implementation with the previous one.Moritz Maxeiner2014-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale: * The main reason for choosing to implement the PBA in accordance with the Yubico documentation was to prevent a MITM-USB-attack successfully recovering the new LUKS key. * However, a MITM-USB-attacker can read user id and password when they were entered for PBA, which allows him to recover the new challenge after the PBA is complete, with which he can challenge the Yubikey, decrypt the new AES blob and recover the LUKS key. * Additionally, since the Yubikey shared secret is stored in the same AES blob, after such an attack not only is the LUKS device compromised, the Yubikey is as well, since the shared secret has also been recovered by the attacker. * Furthermore, with this method an attacker could also bruteforce the AES blob, if he has access to the unencrypted device, which would again compromise the Yubikey, should he be successful. * Finally, with this method, once the LUKS key has been recovered once, the encryption is permanently broken, while with the previous system, the LUKS key itself it changed at every successful boot, so recovering it once will not necessarily result in a permanent breakage and will also not compromise the Yubikey itself (since its secret is never stored anywhere but on the Yubikey itself). Summary: The current implementation opens up up vulnerability to brute-forcing the AES blob, while retaining the current MITM-USB attack, additionally making the consequences of this attack permanent and extending it to the Yubikey itself.
* | gnome3.gnome_control_center: build and fix runtime depsDomen Kožar2014-02-08
| |
* | nixos: add uid/gid for muninBjørn Forsman2014-02-07
| | | | | | | | | | | | | | | | | | To be compatible with eb2f44c18cb6d300e965308547d8a4dea110f519 (Generate /etc/passwd and /etc/group at build time). Without this you'll get this: $ nixos-rebuild build [...] user-thrown exception: The option `users.extraGroups.unnamed-9.1.gid' is used but not defined.
* | Add option to enforce uniqueness of uids/gids (on by default)Shea Levy2014-02-07
| | | | | | | | Signed-off-by: Shea Levy <shea@shealevy.com>
* | gnome3: add missing filesDomen Kožar2014-02-07
| |
* | Add gnome3 desktop manager. Very experimental.Domen Kožar2014-02-07
| | | | | | | | | | | | | | | | Currently very basic gnome-shell launches on my laptop. Quite some services won't start yet, most notable is gnome-control-center. GTK3 apps still don't have theming applied and for example launching chromium results in horrible red windows.
* | xfce: partially add gtk3 supportDomen Kožar2014-02-07
| |
* | services.xserver.videoDrivers -> services.mesa.videoDriversMathijs Kwik2014-02-06
| |
* | nixos/mesa: don't create /run/opengl-driver-32 ...Vladimír Čunát2014-02-05
| | | | | | | | | | ... if on 64-bit and without 32-bit drivers. Also assert against requesting 32-bit drivers on 32-bit machine.
* | Add description to group.members optionRickard Nilsson2014-02-05
| |
* | Re-introduce security.initialRootPassword, and add a new option ↵Rickard Nilsson2014-02-05
| | | | | | | | users.extraUsers.<user>.hashedPassword
* | Only add shadow to system packages if users.mutableUsers is trueRickard Nilsson2014-02-05
| |
* | Generate /etc/passwd and /etc/group at build timeRickard Nilsson2014-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather large commit that switches user/group creation from using useradd/groupadd on activation to just generating the contents of /etc/passwd and /etc/group, and then on activation merging the generated files with the files that exist in the system. This makes the user activation process much cleaner, in my opinion. The users.extraUsers.<user>.uid and users.extraGroups.<group>.gid must all be properly defined (if <user>.createUser is true, which it is by default). My pull request adds a lot of uids/gids to config.ids to solve this problem for existing nixos services, but there might be configurations that break because this change. However, this will be discovered during the build. Option changes introduced by this commit: * Remove the options <user>.isSystemUser and <user>.isAlias since they don't make sense when generating /etc/passwd statically. * Add <group>.members as a complement to <user>.extraGroups. * Add <user>.passwordFile for setting a user's password from an encrypted (shadow-style) file. * Add users.mutableUsers which is true by default. This means you can keep managing your users as previously, by using useradd/groupadd manually. This is accomplished by merging the generated passwd/group file with the existing files in /etc on system activation. The merging of the files is simplistic. It just looks at the user/group names. If a user/group exists both on the system and in the generated files, the system entry will be kept un-changed and the generated entries will be ignored. The merging itself is performed with the help of vipw/vigr to properly lock the account files during edit. If mutableUsers is set to false, the generated passwd and group files will not be merged with the system files on activation. Instead they will simply replace the system files, and overwrite any changes done on the running system. The same logic holds for user password, if the <user>.password or <user>.passwordFile options are used. If mutableUsers is false, password will simply be replaced on activation. If true, the initial user passwords will be set according to the configuration, but existing passwords will not be touched. I have tested this on a couple of different systems and it seems to work fine so far. If you think this is a good idea, please test it. This way of adding local users has been discussed in issue #103 (and this commit solves that issue).
* | Mount a ramfs on /run/keys for safe key storage for nixopsShea Levy2014-02-05
| | | | | | | | Signed-off-by: Shea Levy <shea@shealevy.com>
* | Fix gummiboot builderShea Levy2014-02-05
| | | | | | | | Signed-off-by: Shea Levy <shea@shealevy.com>
* | clarify rename error messagesDomen Kožar2014-02-04
| |
* | Force a rebuild.Shea Levy2014-02-04
| | | | | | | | | | | | Sigh. Signed-off-by: Shea Levy <shea@shealevy.com>
* | ntpd: Don't answer status queriesEelco Dolstra2014-02-03
| | | | | | | | | | | | Workaround for CVE-2013-5211: http://support.ntp.org/bin/view/Main/SecurityNotice#DRDoS_Amplification_Attack_using
* | gummiboot-builder.py: Remove old entries before adding new onesShea Levy2014-02-03
| | | | | | | | | | | | Fixes #1483 Signed-off-by: Shea Levy <shea@shealevy.com>
* | Document EFI installationShea Levy2014-02-03
| | | | | | | | Signed-off-by: Shea Levy <shea@shealevy.com>
* | Limit livecd label to 11 charactersShea Levy2014-02-03
|/ | | | | | vfat partition labels can only be 11 characters long Signed-off-by: Shea Levy <shea@shealevy.com>
* switch-to-configuration.pl: Handle successful auto-restartsOliver Charles2014-02-02
| | | | | | | | | | | | | switch-to-configuration.pl is currently hard-coded to assume that if a unit is in the "auto-restart" state that something has gone wrong, but this is not strictly true. For example, I run offlineimap as a oneshot service restarting itself every minute (on success). NixOS currently thinks that offlineimap has failed to start as it enters the auto-restart state, because it doesn't consider why the unit failed. This commit changes switch-to-configuration.pl to inspect the full status of a unit in auto-restart state, and now only considers it failed if the ExecMainStatus is non-zero.
*-. Merge #1645 and #1646: lightdm and -gtk-greeter updateVladimír Čunát2014-02-02
|\ \
| * | lightdm: Update to 1.8.6Oliver Charles2014-01-31
| |/
* | Merge #1618: use ubuntu module blacklists by defaultVladimír Čunát2014-02-02
|\ \
| * | pull module blacklist from Ubuntu and use it by defaultVladimír Čunát2014-01-28
| | | | | | | | | | | | People often have serious problems due to bogus modules like *fb.
* | | nixos/nscd: add option to change nscd configJaka Hudoklin2014-02-02
| | | | | | | | | | | | | | | | | | | | | [Bjørn Forsman <bjorn.forsman@gmail.com>: - use types.lines instead of types.string. The former joins strings with "\n" and the latter with "" (and is deprecated). ]
* | | dhcpcd: Update to 6.2.1Eelco Dolstra2014-02-02
| | | | | | | | | | | | | | | Dhcpcd now has integration with udev, so it should no longer be a problem if udev renames an interface while dhcpcd is running.
* | | git-daemon service: fix typo in option (close #1659)Arvin Moezzi2014-02-01
| | |
* | | httpd: Respect original order of environment eval.Rob Vermaas2014-01-31
| | |
* | | httpd: Only add PHPRC to environment of httpd when enablePHP is true.Rob Vermaas2014-01-31
| |/ |/|
* | Merge branch 'yubikey' of git://github.com/Calrama/nixpkgsPetr Rockai2014-01-29
|\ \
| * | Add library dependencies explicitlyMoritz Maxeiner2014-01-29
| | |
| * | Implement muli-user authentication for yubikey pba, i.e. multiple users can ↵Moritz Maxeiner2014-01-29
| | | | | | | | | | | | | | | | | | | | | | | | now share a single luks keyslot. This is achieved by having multiple lines per storage file, one for each user (if the feature is enabled); each of these lines has the same format as would be the case for the userless authentication, except that they are prepended with a SHA-512 of the user's id.
| * | Change the crypt-storage file to be hex encoded instead of raw binary. To ↵Moritz Maxeiner2014-01-29
| | | | | | | | | | | | update from the previous configuration, convert your crypt-storage file from raw binary to hex.
| * | Enable two-factor authentication by default. Add proper descriptions to ↵Moritz Maxeiner2014-01-29
| | | | | | | | | | | | attributes.
| * | Cosmetic change to yubikey detectionMoritz Maxeiner2014-01-28
| | |
| * | Rewrite as a pre-boot authentication module (mostly) comforming to the ↵Moritz Maxeiner2014-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | design specification of 'YubiKey Integration for Full Disk Encryption Pre-Boot Authentication (Copyright) Yubico, 2011 Version: 1.1'. Used binaries: * uuidgen - for generation of random sequence numbers * ykchalresp - for challenging a Yubikey * ykinfo - to check if a Yubikey is plugged in at boot (fallback to passphrase authentication otherwise) * openssl - for calculation of SHA-1, HMAC-SHA-1, as well as AES-256-CTR (de/en)cryption Main differences to the specification mentioned above: * No user management (yet), only one password+yubikey per LUKS device * SHA-512 instead of CRC-16 for checksum Main differences to the previous implementation: * Instead of changing the key slot of the LUKS device each boot, the actual key for the LUKS device will be encrypted itself * Since the response for the new challenge is now calculated locally with openssl, the MITM-USB-attack with which previously an attacker could obtain the new response (that was used as the new encryption key for the LUKS device) by listening to the Yubikey has ideally become useless (as long as uuidgen can successfuly generate new random sequence numbers). Remarks: * This is not downwards compatible to the previous implementation
| * | Implement authentication for a LUKS device with a yubikey (HMAC-SHA1); ↵Moritz Maxeiner2014-01-25
| | | | | | | | | | | | supports simple challenge-response and two-factor authentication
* | | nixos-generate-config: Fix reference to <nixos>.aszlig2014-01-29
| |/ |/| | | | | | | | | | | | | | | IIUC, <nixos> is going to be deprecated someday in the future, and as most of those references are already replaced I guess it's safe to replace it here as well, as it is only relevant on new/updated installations. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* | Merge pull request #1178 from chexxor/fix-httpd-sshRob Vermaas2014-01-27
|\ \ | | | | | | HTTPD: Check for SSL Cert value before building with SSL support.
| * | Check empty stringfor globalRedirect. It breaks RedirectPermanent.Alex Berg2013-11-11
| | |
| * | Add HTTPD SSH assertion to check null cert/key.Alex Berg2013-11-11
| | |
| * | Check for SSL Cert value before building with SSL support.Alex Berg2013-11-06
| | |
* | | nixos: Add a dictd service.Petr Rockai2014-01-25
| | |
* | | support -Q in nixos-rebuildAristid Breitkreuz2014-01-25
| |/ |/|