[Bug 802197] Re: no sysfs entry in /etc/mtab breaks encrypted-home

Chad Miller chad.miller at canonical.com
Wed Jun 29 13:56:41 UTC 2011


If one trips over this bug, it may cause problems if that broken session
creates files that shadow the old, valuable filenames that are
encrypted.

If one is using the recommended scheme active during Karmic (at least),
then this will find cleartext filenames that should not exist:

  $ ls -A /home/.ecryptfs/$USER/.Private |grep -v ECRYPTFS_FNEK

You might have a dozen or so.  Move those to a new location, and after
log out and unmount of that ecryptfs layer, and remount, the old files
will reappear.

Something like this should help clean up:

  $ mkdir  ~/Desktop/ecryptfs-bad-for-review
  $ mv /home/.ecryptfs/$USER/.Private/
  $ ls -A1 /home/.ecryptfs/$USER/.Private |grep -v ^ECRYPTFS_FNEK |while read filename; mv -i "/home/.ecryptfs/$USER/.Private/$filename" ~/Desktop/ecryptfs-bad-for-review/; done
  $ cd /home; sudo umount $USER
  $ ecryptfs-mount-private

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/802197

Title:
  no sysfs entry in /etc/mtab breaks encrypted-home

Status in “ecryptfs-utils” package in Ubuntu:
  Triaged
Status in “util-linux” package in Ubuntu:
  Fix Released

Bug description:
  encrypted-home directories were broken with the latest upgrade of
  util-linux.

  The issue is that ecryptfs tries to find a sysfs mount point by
  reading /etc/mtab (ie, it wants to find 'sysfs' and '/sys').

  in ecryptfs/src/libecryptfs/sysfs.c , ecryptfs_get_version tries to
  get the version of ecryptfs in this kernel. and then see if it is
  capable.  That calls 'get_sysfs_mountpoint' which parses /etc/mtab for
  the sysfs entry.

  The util-linux upgrade to 2.19.1-2ubuntu1 does not write an entry in
  /etc/mtab for sysfs.

  The end resupt is that the user ends up with file *content* decrypted, but not filenames.  They'll see a bunch of filenames with "ECRYPTFS_FNEK_ENCRYPTED" in their name like:
   ECRYPTFS_FNEK_ENCRYPTED.FXbGolSeisjWM-Qojv3ajQsDcC-kITIu0KUxZdKsa5gkZBtZLX12p7AKgcrQTja6Hep3FSW8okccMX6-
  ECRYPTFS_FNEK_ENCRYPTED.FXbGolSeisjWM-Qojv3ajQsDcC-kITIu0KUxZdKsa5gkZBtZLX12p7AKggO-5p.pSThbVFaNI8aX4-6-
  ECRYPTFS_FNEK_ENCRYPTED.FXbGolSeisjWM-Qojv3ajQsDcC-kITIu0KUxZdKsa5gkZBtZLX12p7AKgirB.sNgfbm-8lk0XZWwB-A-

  1 possible fix for this is for ecryptfs to read /proc/mounts rather than /etc/mtab.
  A work around for this is to:
   a.) log in as another user, edit /etc/mtab and add 'sysfs' entry (see /proc/mounts for example), then log in as new user
   b.) backlevel util-linux and reboot (so /etc/mtab is updated with sysfs entry via old util-linux).

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: util-linux 2.19.1-2ubuntu1
  ProcVersionSignature: Ubuntu 3.0-1.2-generic 3.0.0-rc3
  Uname: Linux 3.0-1-generic x86_64
  Architecture: amd64
  Date: Sun Jun 26 10:50:31 2011
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to oneiric on 2010-11-15 (222 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/802197/+subscriptions




More information about the foundations-bugs mailing list