Also verified in 3.3.8

I compile the kernel (3.3.8) on Ubuntu 14.04 and Centos 7-1511.

After I mount ecryptfs with ecryptfs_xattr option, it will terminate if
I copy some file in it. First time I copy files, it will be killed. Next
time I copy files, it will hang and do nothing.

Test outputs:
$ sudo mount -t ecryptfs secure raw -o ecryptfs_xattr
[...]
$ cp file.out2 raw
Killed

I test 3.3.8 kernel on different machines including VM-ware, the outputs
are all the same!

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1612492

Title:
  remounting breaks size reporting and rsync

Status in eCryptfs:
  Triaged
Status in ecryptfs-utils:
  Invalid
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Sorry to resurrect an old bug, it looks like a fix applied a while
  back may end up breaking rsync.

  For reference, it looks like the decision in this bug fix was to pass on the 
encrypted file size on disk to stat calls looking at the unencrypted mount:
  https://bugs.launchpad.net/ecryptfs/+bug/390833

  For reference, to reproduce:
  mkdir /mnt/raw
  mkdir /mnt/decrypted
  dd if=/dev/urandom of=file.out2 bs=1MB count=100
  mount -t ecryptfs -o 
ecryptfs_passthrough=n,no_sig_cache,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_xattr,ecryptfs_enable_filename_crypto=y,passphrase_passwd=SECRET,ecryptfs_fnek_sig=SECRET
 /mnt/raw /mnt/decrypted
  rsync file.out2 /mnt/decrypted/

  stat /mnt/decrypted/file.out2
  # you get size 100000000

  umount /mnt/decrypted/
  mount -t ecryptfs -o 
ecryptfs_passthrough=n,no_sig_cache,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_xattr,ecryptfs_enable_filename_crypto=y,passphrase_passwd=SECRET,ecryptfs_fnek_sig=SECRET
 /mnt/raw /mnt/decrypted

  stat /mnt/decrypted/file.out2
  # you get size 100003840

  What this means in practice is any additional rsyncs to that target
  after remounting will see the file size as different than the
  original, and issue a full new copy. My use case is ecryptfs over a
  remote file system, so rsync is no better than cp.

  Would it be possible to make file size reporting consistent, and
  reflective of the size of the file as a reader would see it?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ecryptfs/+bug/1612492/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to