Bug 503261 - cannot mount ecryptfs file systems
cannot mount ecryptfs file systems
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ecryptfs-utils (Show other bugs)
12
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Michal Hlavinka
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-29 23:34 EDT by Michael Borland
Modified: 2010-12-05 01:52 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-05 01:52:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 381920 None None None Never

  None (edit)
Description Michael Borland 2009-05-29 23:34:04 EDT
Description of problem:
I performed a system updated today.Starting today (6/29), I am unable to mount ecryptfs file systems.  

Version-Release number of selected component (if applicable):
ecryptfs-utils-75-1.fc10.i386
kernel 2.6.27.24-170.2.68.fc10.i686

How reproducible:
Always

Steps to Reproduce:
1. Attempt to mount ecryptfs file system
  
Actual results:
The following error message appears after I under the pass phrase:

Error attempting to evaluate mount options: [-22] Invalid argument
Check your system logs for details on why this happened.
Try updating your ecryptfs-utils package, and/or
submit a bug report on https://launchpad.net/ecryptfs

Expected results:

File system should be mounted.

Additional info:

I removed ecryptfs-utils (which was just updated today), and installed version 73-1 from source.  This did not resolve the problem.

I also tried several older kernels, 2.6.27.21-170.2.56.fc10.i686 and 2.6.27.19-170.2.35.fc10.i686, but this didn't resolve the problem.
Comment 1 Eric Sandeen 2009-05-29 23:40:14 EDT
(In reply to comment #0)
...
> Error attempting to evaluate mount options: [-22] Invalid argument
> Check your system logs for details on why this happened.
> Try updating your ecryptfs-utils package, and/or
> submit a bug report on https://launchpad.net/ecryptfs

Is there anything in the system logs?  (dmesg)

-Eric
Comment 2 Michael Borland 2009-05-29 23:42:16 EDT
Here are the relevant lines from the /var/log/messages:

May 29 22:39:18 localhost mount.ecryptfs: Could not open library handle
May 29 22:39:18 localhost mount.ecryptfs: Could not open library handle
May 29 22:39:23 localhost mount.ecryptfs: do_hash: PK11_HashBuf() error; SECFailure = [-1]; PORT_GetError() = [-8128]
May 29 22:39:23 localhost mount.ecryptfs: Error generating passphrase signature; rc = [-22]
May 29 22:39:23 localhost mount.ecryptfs: ecryptfs_add_passphrase_key_to_keyring: Error attempting to generate the passphrase auth tok payload; rc = [-22]
Comment 3 Michal Hlavinka 2009-05-31 02:56:59 EDT
please add output of:
rpm -V ecryptfs-utils

and the command you are using for mount

thanks
Comment 4 Michael Borland 2009-05-31 10:39:28 EDT
# rpm -V ecryptfs-utils
(produces no output)
# rpm -qa | fgrep ecrypt
ecryptfs-utils-75-1.fc10.i386

Relevant line from my fstab:
/home/borland/.secure /home/borland/secure ecryptfs users,key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_passthrough=n,noauto 0 0

I then mount from by user account with
% mount .secure

Thanks--Michael
Comment 5 Michal Hlavinka 2009-05-31 14:42:59 EDT
could you please check your version of nss package and if you've updated this package recently?
Comment 6 Michal Hlavinka 2009-05-31 15:27:53 EDT
I was able to reproduce this. Complete messages from your syslog would be:
May 29 22:39:18 localhost mount.ecryptfs: Could not open library handle: /usr/lib64/ecryptfs/libecryptfs_key_mod_passphrase.so: failed to map segment from shared object: Resource temporarily unavailable
...
May 29 22:39:23 localhost mount.ecryptfs: do_hash: PK11_HashBuf() error;
SECFailure = [-1]; PORT_GetError() = [-8128]  : libsoftokn3.so: failed to map segment from shared object: Resource temporarily unavailable

both problems are because dlopen fails

well... originally, /sbin/mount.ecryptfs had setuid root permission, I've changed it recently, because I've been told it's required only for /sbin/mount.ecryptfs_private. If you change it back to setuid, it will work. So you can use:
chmod 4755 /sbin/mount.ecryptfs
as workaround before I investigate this problem more deeply.
Comment 7 Michal Hlavinka 2009-05-31 15:42:56 EDT
OK, I've found the problem:

mount helper locks it's memory using mlockall(MCL_FUTURE) to prevent memory containing secret data being swapped out. But non-privileged user is limited to how much memory he/she can lock at most. man mlockall:

"If  MCL_FUTURE  has been specified, then a later system call (e.g., mmap(2), sbrk(2), malloc(3)), may fail if it would cause the number of locked bytes to exceed the permitted maximum."

Without locking memory, it works
Comment 8 Michael Borland 2009-05-31 19:25:56 EDT
My nss packages are as follows:
nss-tools-3.12.2.0-5.fc10.i386
nss_compat_ossl-0.9.5-3.fc10.i386
nss-devel-3.12.2.0-5.fc10.i386
nss_db-2.2-43.fc10.i386
nss-3.12.2.0-5.fc10.i386
nss_ldap-264-1.fc10.i386


Last update was May 5.

The chmod 4755 /sbin/mount.ecryptfs workaround solves the problem for me.

Thanks!

--Michael
Comment 9 Michal Hlavinka 2009-07-17 02:03:29 EDT
unfortunately, this is not a bug completely, your mount options in fstab are not complete

real now it designed to work this way:
1) as root, mount your private directory
2) run mount, which will return mount options used including key signature(s) 
3) put this options to /etc/fstab

when mounting, do:
ecryptfs-add-passphrase --fnek (if you are not using file name encryption, don't use "--fnek")
mount -i

but this is bug, because:
mlockall code is somehow broken
and this design seems little bit odd
Comment 10 Bug Zapper 2009-11-18 07:02:48 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Michal Hlavinka 2009-11-18 07:31:44 EST
updating version, problem still exists in F-12. (When this problem is fixed, I'll fix it in all not EOLed fedora versions)
Comment 12 Bug Zapper 2010-11-04 07:11:25 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Bug Zapper 2010-12-05 01:52:57 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.