Bug 1390107 - encfs crashes when -S is used for the first time
Summary: encfs crashes when -S is used for the first time
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fuse-encfs
Version: 24
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-31 08:34 UTC by Peter Schiffer
Modified: 2017-08-29 21:52 UTC (History)
3 users (show)

Fixed In Version: fuse-encfs-1.9.2-1.fc26 fuse-encfs-1.9.2-1.fc25 fuse-encfs-1.9.2-3.el7
Clone Of:
Environment:
Last Closed: 2017-08-29 21:52:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
abrt data (238.52 KB, application/zip)
2016-10-31 08:34 UTC, Peter Schiffer
no flags Details

Description Peter Schiffer 2016-10-31 08:34:40 UTC
Created attachment 1215717 [details]
abrt data

Description of problem:
$ mkdir a b
$ echo 'qwerty' | encfs -S $(pwd)/a $(pwd)/b
Creating new encrypted volume.
Please choose from one of the following options:
 enter "x" for expert configuration mode,
 enter "p" for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
?> 
Standard configuration selected.

Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 3:0:2
Filename encoding: "nameio/block", version 4:0:2
Key Size: 192 bits
Block Size: 1024 bytes
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File holes passed through to ciphertext.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.

Zero length password not allowed
[1]    31157 done                              echo 'qwerty' | 
       31160 segmentation fault (core dumped)  encfs -S $(pwd)/a $(pwd)/b

Version-Release number of selected component (if applicable):
fuse-encfs-1.9.1-2.fc24.x86_64

Additional info:
$ cat core_backtrace 
{   "signal": 11
,   "executable": "/usr/bin/encfs"
,   "only_crash_thread": true
,   "stacktrace":
      [ {   "crash_thread": true
        ,   "frames":
              [ {   "address": 139637995941738
                ,   "build_id": "47d13bfcd9462a0287f7eeadf39e9e01fe834906"
                ,   "build_id_offset": 450410
                ,   "function_name": "encfs::SSL_Cipher::writeKey(std::shared_ptr<encfs::AbstractCipherKey> const&, unsigned char*, std::shared_ptr<encfs::AbstractCipherKey> const&)"
                ,   "file_name": "/usr/lib64/libencfs.so.1.9.1"
                }
              , {   "address": 139637995881668
                ,   "build_id": "47d13bfcd9462a0287f7eeadf39e9e01fe834906"
                ,   "build_id_offset": 390340
                ,   "function_name": "encfs::createV6Config(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&)"
                ,   "file_name": "/usr/lib64/libencfs.so.1.9.1"
                }
              , {   "address": 139637995891587
                ,   "build_id": "47d13bfcd9462a0287f7eeadf39e9e01fe834906"
                ,   "build_id_offset": 400259
                ,   "function_name": "encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&)"
                ,   "file_name": "/usr/lib64/libencfs.so.1.9.1"
                }
              , {   "address": 94227056546256
                ,   "build_id": "f84549f09447e76446a9d96d51c243261ecb08b3"
                ,   "build_id_offset": 78288
                ,   "function_name": "main"
                ,   "file_name": "/usr/bin/encfs"
                } ]
        } ]
}


I've created issue on upstream github repo, but this crash might be Fedora specific: https://github.com/vgough/encfs/issues/241

Comment 1 Vasiliy Glazov 2016-10-31 08:45:09 UTC
I am think -S option is not intended to create new encfs filesystem. It is written in man:

-S, --stdinpass
           Read password from standard input, without prompting.  This may be useful for scripting encfs mounts.

           Note that you should make sure the filesystem and mount points exist first.  Otherwise encfs will prompt for the filesystem creation options, which may interfere with your script.


Note that you should make sure the filesystem and mount points exist first.

Comment 2 Vasiliy Glazov 2016-10-31 08:53:34 UTC
It work good if use this command:

echo -e "\nqwerty" | encfs -S $(pwd)/a $(pwd)/b

That is to add a blank line in the begin.

Comment 3 Peter Schiffer 2016-10-31 09:04:58 UTC
Nice, thanks for the workaround.

Comment 4 Vasiliy Glazov 2016-10-31 09:08:07 UTC
So close bug or you still want that upstream solve segfault in this conditions?

Comment 5 Peter Schiffer 2016-10-31 09:11:29 UTC
Well, I think that segfault is still a bug and should be fixed.

Comment 6 Peter Schiffer 2016-11-17 12:13:23 UTC
This problem should be fixed in upstream:
https://github.com/vgough/encfs/commit/c3a7da5eff4055e77dc9404b0c15945485232bf2

Comment 7 Vasiliy Glazov 2016-11-17 12:23:20 UTC
OK, waiting for the next encfs release to push it in the repo.

Comment 8 Daniel Moerner 2017-01-31 01:58:49 UTC
Hi,

The situation is a bit complicated with this update and Fedora 24. The upstream commit that fixes this bug will break cryptkeeper and cause us to run into this pretty serious bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852751

cryptkeeper was never added to Fedora 25 because it is unmaintained (https://pagure.io/fesco/issue/1593), but it is still lying orphaned Fedora 24. Unfortunately, it's not so easy to fix cryptkeeper, since upstream is also dead.

I talked a bit with nirik on IRC about this situation, he proposed that if a new encfs update is released before Fedora 24 EOL, it might make sense to not push that update back to Fedora 24. From reading through this bug report, it does seem like this can be worked around in Fedora 24, so not updating Fedora 24 could be an option.

I wanted to let you know about this issue. As maintainer, I would think it's definitely your prerogative to think a new release, if it happens, is important enough to push to Fedora 24 updates. In that case, something else will have to happen with cryptkeeper, which is definitely an option.

You're welcome to contact me with further questions.

Daniel

Comment 9 Vasiliy Glazov 2017-01-31 09:10:57 UTC
Daniel, do I understand correctly that cryptkeeper work good with current version of fuse-encfs in F24 and will not work properly with fuse-encfs from upstream master?

Comment 10 Daniel Moerner 2017-01-31 14:25:29 UTC
Yes, that is correct.

However, upstream fuse-encfs has now said that they will revert the upstream commit that causes the problem with cryptkeeper, because they do regard it as an unintended ABI break on their part (https://github.com/tomm/cryptkeeper/issues/23#issuecomment-276141947). 

So you don't actually have to worry about this. Sorry for the bother.

Comment 11 Fedora End Of Life 2017-07-25 23:41:03 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 EOL if it remains open with a Fedora  'version'
of '24'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 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, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

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.

Comment 12 Fedora Update System 2017-07-31 11:34:57 UTC
fuse-encfs-1.9.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-daeddd414f

Comment 13 Fedora Update System 2017-07-31 11:35:15 UTC
fuse-encfs-1.9.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-36f02cbd23

Comment 14 Fedora Update System 2017-07-31 20:48:42 UTC
fuse-encfs-1.9.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-daeddd414f

Comment 15 Fedora Update System 2017-07-31 22:23:07 UTC
fuse-encfs-1.9.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9939f33e00

Comment 16 Fedora Update System 2017-08-01 00:25:30 UTC
fuse-encfs-1.9.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-36f02cbd23

Comment 17 Fedora End Of Life 2017-08-08 19:04:20 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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

Comment 18 Fedora Update System 2017-08-09 15:58:10 UTC
fuse-encfs-1.9.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2017-08-09 19:58:30 UTC
fuse-encfs-1.9.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2017-08-14 06:40:45 UTC
fuse-encfs-1.9.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b8b981e9d8

Comment 21 Fedora Update System 2017-08-15 07:49:44 UTC
fuse-encfs-1.9.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b8b981e9d8

Comment 22 Fedora Update System 2017-08-29 21:52:03 UTC
fuse-encfs-1.9.2-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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