1. 07 1月, 2009 2 次提交
    • M
      eCryptfs: Filename Encryption: Header updates · a34f60f7
      Michael Halcrow 提交于
      Extensions to the header file to support filename encryption.
      Signed-off-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Cc: Dustin Kirkland <dustin.kirkland@gmail.com>
      Cc: Eric Sandeen <sandeen@redhat.com>
      Cc: Tyler Hicks <tchicks@us.ibm.com>
      Cc: David Kleikamp <shaggy@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a34f60f7
    • M
      eCryptfs: Filename Encryption: Tag 70 packets · 9c79f34f
      Michael Halcrow 提交于
      This patchset implements filename encryption via a passphrase-derived
      mount-wide Filename Encryption Key (FNEK) specified as a mount parameter.
      Each encrypted filename has a fixed prefix indicating that eCryptfs should
      try to decrypt the filename.  When eCryptfs encounters this prefix, it
      decodes the filename into a tag 70 packet and then decrypts the packet
      contents using the FNEK, setting the filename to the decrypted filename.
      Both unencrypted and encrypted filenames can reside in the same lower
      filesystem.
      
      Because filename encryption expands the length of the filename during the
      encoding stage, eCryptfs will not properly handle filenames that are
      already near the maximum filename length.
      
      In the present implementation, eCryptfs must be able to produce a match
      against the lower encrypted and encoded filename representation when given
      a plaintext filename.  Therefore, two files having the same plaintext name
      will encrypt and encode into the same lower filename if they are both
      encrypted using the same FNEK.  This can be changed by finding a way to
      replace the prepended bytes in the blocked-aligned filename with random
      characters; they are hashes of the FNEK right now, so that it is possible
      to deterministically map from a plaintext filename to an encrypted and
      encoded filename in the lower filesystem.  An implementation using random
      characters will have to decode and decrypt every single directory entry in
      any given directory any time an event occurs wherein the VFS needs to
      determine whether a particular file exists in the lower directory and the
      decrypted and decoded filenames have not yet been extracted for that
      directory.
      
      Thanks to Tyler Hicks and David Kleikamp for assistance in the development
      of this patchset.
      
      This patch:
      
      A tag 70 packet contains a filename encrypted with a Filename Encryption
      Key (FNEK).  This patch implements functions for writing and parsing tag
      70 packets.  This patch also adds definitions and extends structures to
      support filename encryption.
      Signed-off-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Cc: Dustin Kirkland <dustin.kirkland@gmail.com>
      Cc: Eric Sandeen <sandeen@redhat.com>
      Cc: Tyler Hicks <tchicks@us.ibm.com>
      Cc: David Kleikamp <shaggy@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c79f34f
  2. 31 10月, 2008 1 次提交
    • E
      ecryptfs: fix memory corruption when storing crypto info in xattrs · 87b811c3
      Eric Sandeen 提交于
      When ecryptfs allocates space to write crypto headers into, before copying
      it out to file headers or to xattrs, it looks at the value of
      crypt_stat->num_header_bytes_at_front to determine how much space it
      needs.  This is also used as the file offset to the actual encrypted data,
      so for xattr-stored crypto info, the value was zero.
      
      So, we kzalloc'd 0 bytes, and then ran off to write to that memory.
      (Which returned as ZERO_SIZE_PTR, so we explode quickly).
      
      The right answer is to always allocate a page to write into; the current
      code won't ever write more than that (this is enforced by the
      (PAGE_CACHE_SIZE - offset) length in the call to
      ecryptfs_generate_key_packet_set).  To be explicit about this, we now send
      in a "max" parameter, rather than magically using PAGE_CACHE_SIZE there.
      
      Also, since the pointer we pass down the callchain eventually gets the
      virt_to_page() treatment, we should be using a alloc_page variant, not
      kzalloc (see also 7fcba054)
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Acked-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      87b811c3
  3. 29 7月, 2008 1 次提交
  4. 25 7月, 2008 1 次提交
    • H
      ecryptfs: crypto.c use unaligned byteorder helpers · 29335c6a
      Harvey Harrison 提交于
      Fixes the following sparse warnings:
      fs/ecryptfs/crypto.c:1036:8: warning: cast to restricted __be32
      fs/ecryptfs/crypto.c:1038:8: warning: cast to restricted __be32
      fs/ecryptfs/crypto.c:1077:10: warning: cast to restricted __be32
      fs/ecryptfs/crypto.c:1103:6: warning: incorrect type in assignment (different base types)
      fs/ecryptfs/crypto.c:1105:6: warning: incorrect type in assignment (different base types)
      fs/ecryptfs/crypto.c:1124:8: warning: incorrect type in assignment (different base types)
      fs/ecryptfs/crypto.c:1241:21: warning: incorrect type in assignment (different base types)
      fs/ecryptfs/crypto.c:1244:30: warning: incorrect type in assignment (different base types)
      fs/ecryptfs/crypto.c:1414:23: warning: cast to restricted __be32
      fs/ecryptfs/crypto.c:1417:32: warning: cast to restricted __be16
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29335c6a
  5. 25 5月, 2008 1 次提交
  6. 29 4月, 2008 2 次提交
  7. 07 2月, 2008 6 次提交
  8. 24 12月, 2007 2 次提交
  9. 06 11月, 2007 2 次提交
  10. 27 10月, 2007 1 次提交
  11. 24 10月, 2007 1 次提交
  12. 23 10月, 2007 1 次提交
  13. 17 10月, 2007 16 次提交
  14. 13 2月, 2007 3 次提交