Fwd: Attention Jaunty Alpha eCryptfs Users...

Mackenzie Morgan macoafi at gmail.com
Mon Mar 30 03:58:21 UTC 2009

This was only sent to -devel, but I figure there are likely some alpha testers 
on -devel-discuss to whom this may apply...

----------  Forwarded Message  ----------

Subject: Attention Jaunty Alpha eCryptfs Users...
Date: Sunday 29 March 2009
From: Dustin Kirkland <kirkland at canonical.com>
To: Ubuntu Developers <ubuntu-devel at lists.ubuntu.com>, "ecryptfs-devel" 
<ecryptfs-devel at lists.sourceforge.net>, ecryptfs-users at lists.launchpad.net, 
ecryptfs at lists.launchpad.net

The 2.6.28 Linux kernel used by each of the Ubuntu Jaunty Alphas (1-6)
included a bug that may have written arbitrary kernel memory into your
eCryptfs file headers.

Note that Hardy and Intrepid are NOT affected!  And the actual
encrypted data content in your eCryptfs files is not affected.

However, if you run 'strings' on your encrypted data, you may see some
cleartext data used as padding in the first 2 pages of the file
headers.  You can check this with something like:
 $ umount.ecryptfs_private && cd ~/.Private && mount.ecryptfs_private
 $ find . -type f | xargs strings  | egrep ".{20}"

For more information about the technical details and the fix for this
bug, please reference:
 * The original bug report (thanks to Florian Streibelt for the report!)
  * https://bugs.launchpad.net/ecryptfs/+bug/345544
 * The upstream git commit

The Ubuntu Jaunty Beta kernel includes the fix, which will correctly
zero the 2 pages of kernel memory allocated for these file headers and
prevent such data leakage on any eCryptfs file writes thereafter.

However, any files encrypted with a previous Jaunty Alpha kernel will
need to be re-encrypted with the new kernel.  Also in Ubuntu Jaunty
Beta, I have included a new utility in ecryptfs-utils-73 to help you
clean your files: ecryptfs-rewrite-file.
 * http://manpages.ubuntu.com/manpages/jaunty/en/man1/ecryptfs-rewrite-

In that manpage, I give a hint for recursively re-encrypting all files
in your eCryptfs mount point.  Something along the lines of this:
 $ cd $HOME
 $ find . -xdev -print0 | xargs -r -0 /usr/bin/ecryptfs-rewrite-file
 $ ecryptfs-umount-private
 $ sync
 $ ecryptfs-mount-private

To run this, I *strongly* recommend logging out of all graphical
desktop sessions, and logging in via the tty console (ctrl-alt-f1), or
via ssh.  This will minimize the number of background processes you
have running, and prevent races reading/writing the files in your home

As a point of reference, when I ran this on my home directory, it took
my dual-core, 2.4GHz t61p about 15 minutes to re-encrypt 2GB of data
(25,000 files).  I strongly recommend that you do the same, at your
earliest possible convenience.

One final note...  If you are the type that prefers to run
25-rounds-of-shred to thwart complex data recovery from magnetic
disks, then you might consider backing up your cleartext data,
shredding your disk, and reinstalling from scratch.  In which case,
I'm sorry (on multiple levels).
 * http://manpages.ubuntu.com/manpages/jaunty/en/man1/shred.1.html


Dustin Kirkland
Ubuntu Server Developer
Canonical, LTD
kirkland at canonical.com

ubuntu-devel mailing list
ubuntu-devel at lists.ubuntu.com
Modify settings or unsubscribe at: 

Mackenzie Morgan
apt-get moo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20090329/609d640b/attachment.sig>

More information about the Ubuntu-devel-discuss mailing list