1. 08 Jun, 2016 1 commit
    • Ondrej Kozina's avatar
      code cleanup related to devfd checks · 16fab74a
      Ondrej Kozina authored
      alter all checks for devfd value after device_open to
      less than zero insted of equals to -1. device_open will
      return values different from -1 in case error happens.
      
      In LUKSv1 device_open should always return -1 in case of
      error but this check is safer.
      
      The rest is just formating improvement.
      16fab74a
  2. 13 May, 2016 1 commit
    • Ondrej Kozina's avatar
      keymanage: eliminate double close() call · e1dca468
      Ondrej Kozina authored
      fix  double close() cases in LUKS_hdr_backup() and LUKS_hdr_restore()
      functions. It should be harmless unless libcryptsetup is used
      in multi-thread setup which is not supported anyway.
      e1dca468
  3. 24 Apr, 2016 1 commit
    • Milan Broz's avatar
      Fix warnings reported by static analysis. · 683e4db4
      Milan Broz authored
      - ensure that strings are \0 terminated (most of this is already
      handled on higher level anyway)
      
      - fix resource leak in error path in tcrypt.c
      
      - fix time of check/time of use race in sysfs path processing
      
      - insruct Coverity scanner to ignore constant expression in random.c
      (it is intented to stop compile-time misconfiguration of RNG that would be fatal)
      683e4db4
  4. 23 Mar, 2016 1 commit
  5. 01 Dec, 2015 2 commits
  6. 29 Oct, 2015 1 commit
    • Milan Broz's avatar
      Fix PBKDF2 iteration benchmark for longer key sizes. · 4609fd87
      Milan Broz authored
      The previous PBKDF2 benchmark code did not take into account
      output key length.
      For SHA1 (with 160-bits output) and 256-bit keys (and longer)
      it means that the final value was higher than it should be.
      
      For other hash algorithms (like SHA256 or SHA512) it caused
      that iteration count was smaller (in comparison to SHA1) than
      expected for the requested time period.
      
      This patch fixes the code to use key size for the formatted device
      (or default LUKS key size if running in informational benchmark mode).
      
      Thanks to A.Visconti, S.Bossi, A.Calo and H.Ragab
      (http://www.club.di.unimi.it/) for point this out.
      (Based on "What users should know about Full Disk Encryption
      based on LUKS" paper to be presented on CANS2015).
      4609fd87
  7. 02 Jul, 2015 1 commit
    • Milan Broz's avatar
      If the null cipher is used, allow only empty password for LUKS. · dfa2755a
      Milan Broz authored
      The cipher_null is no-encryption, it can be used for testing
      or temporarily when encrypting device (cryptsetup-reencrypt).
      
      Accepting only empty password prevents situation when you replace
      a LUKS header on an unlocking device with the faked header using
      null cipher (and the same UUID).
      Here a system could think that the device was properly unlocked
      (with any entered password) and will try to use this unencrypted
      partition instead.
      (IOW it prevents situation when attacker intentionaly forces
      an user to boot into dirrerent system just by LUKS header manipulation.)
      
      Properly configured systems should have an additional integrity protection
      in place here (LUKS here provides only confidentiality) but it is better
      to not not allow this situation in the first place.
      (Despite the fact that once you allow physical tampering of your system
      it cannot be properly secured anymore.)
      dfa2755a
  8. 15 Jan, 2015 2 commits
  9. 11 Jan, 2015 1 commit
  10. 08 Aug, 2014 1 commit
  11. 29 Jun, 2014 1 commit
  12. 28 Jun, 2014 1 commit
  13. 22 Jun, 2014 1 commit
  14. 14 Jun, 2014 1 commit
  15. 01 Jun, 2014 1 commit
  16. 13 Apr, 2014 1 commit
  17. 12 Apr, 2014 1 commit
  18. 21 Nov, 2013 1 commit
  19. 10 Nov, 2013 1 commit
  20. 23 Jun, 2013 1 commit
    • Cristian Rodríguez's avatar
      Fix buildsytem to always include config.h. · 1349efa3
      Cristian Rodríguez authored
      - config.h must always be the first file to be included
      - Use AM_CFLAGS and AM_LDFLAGS consistently and properly.
      
      (Modified to disable build without largefile support etc
      by Milan Broz <gmazyland@gmail.com>)
      1349efa3
  21. 11 May, 2013 1 commit
    • Milan Broz's avatar
      Disallow explicit small payload offset for detached header. · ae9c9cf3
      Milan Broz authored
      LUKS detached header has some limitations, one of them
      is that you cannot run some explicit check for data offsets
      without providing also data device.
      
      Because luksDump and all key handle commands takes only
      metadata device (LUKS heaer device), it not easy to properly
      support data payload offset validation.
      
      So if detached header is present for luksFormat, code now
      allows data payload 0 (IOW whole data device is used)
      and explicit offset larger than header+keyslots
      (the same as the header is on data device - so some space is wasted).
      
      N.B. with detached header the option --align-payload is used
      directly without any round up caculations.
      
      Fixes Issue#155.
      ae9c9cf3
  22. 10 Jan, 2013 1 commit
  23. 30 Dec, 2012 2 commits
  24. 29 Dec, 2012 3 commits
  25. 19 Dec, 2012 1 commit
  26. 17 Dec, 2012 1 commit
  27. 11 Dec, 2012 1 commit
  28. 05 Dec, 2012 1 commit
  29. 19 Nov, 2012 1 commit
  30. 19 Sep, 2012 1 commit
  31. 11 Sep, 2012 1 commit
  32. 30 Aug, 2012 1 commit
  33. 28 Aug, 2012 3 commits