Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after upgrading archlinux32 #524

Closed
Oscar65 opened this issue May 20, 2018 · 6 comments
Closed

Error after upgrading archlinux32 #524

Oscar65 opened this issue May 20, 2018 · 6 comments

Comments

@Oscar65
Copy link

Oscar65 commented May 20, 2018

Hi

I upgraded archlinux32 and I got this version:
$ LC_ALL=c pacman -Qi encfs
Name : encfs
Version : 1.9.4-1.0
Description : Encrypted filesystem in user-space
Architecture : i686
URL : https://vgough.github.io/encfs/
Licenses : LGPL
Groups : None
Provides : None
Depends On : openssl fuse2 tinyxml2
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 1892.00 KiB
Packager : Erich Eckner
Build Date : Mon Jan 29 22:24:33 2018
Install Date : Sun Apr 29 08:29:08 2018
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

and now I get this error when I try to execute encfs:
LC_ALL=c encfs -i 15 ~/.personal2mj ~/personal2mj
encfs: malloc.c:2401: sysmalloc: Assertion (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Abortado (core' generado)

This is very urgent because I have all my personal data under encfs.

Regards
Oscar

@taz-007
Copy link

taz-007 commented May 21, 2018

Also got the same error, stack trace is:

#0  0xb7fd6cd9 in __kernel_vsyscall ()
#1  0xb7b805e2 in raise () from /usr/lib/libc.so.6
#2  0xb7b81a61 in abort () from /usr/lib/libc.so.6
#3  0xb7bc956b in __malloc_assert () from /usr/lib/libc.so.6
#4  0xb7bcb6d8 in sysmalloc () from /usr/lib/libc.so.6
#5  0xb7bcc6d9 in _int_malloc () from /usr/lib/libc.so.6
#6  0xb7bcdbce in malloc () from /usr/lib/libc.so.6
#7  0xb7dbaa98 in operator new (sz=16)
    at /build/gcc/src/gcc/libstdc++-v3/libsupc++/new_op.cc:50
#8  0xb7f9512e in encfs::XmlReader::load(char const*) ()
   from /usr/lib/libencfs.so.1.9
#9  0xb7f75f87 in encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) () from /usr/lib/libencfs.so.1.9
#10 0xb7f713ce in encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) () from /usr/lib/libencfs.so.1.9
#11 0xb7f71939 in encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) ()
   from /usr/lib/libencfs.so.1.9
#12 0xb7f7b950 in encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) () from /usr/lib/libencfs.so.1.9
#13 0x00404e98 in main ()

@taz-007
Copy link

taz-007 commented May 21, 2018

valgrind gave those errors

==22014== Invalid write of size 4
==22014==    at 0x4F8DF90: tinyxml2::XMLDocument::XMLDocument(bool, tinyxml2::Whitespace) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x48B6120: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014==  Address 0x510765c is 0 bytes after a block of size 444 alloc'd
==22014==    at 0x4830C2B: operator new(unsigned int) (vg_replace_malloc.c:328)
==22014==    by 0x48B6110: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014== 
==22014== Invalid read of size 4
==22014==    at 0x4F8C3B3: tinyxml2::XMLDocument::Identify(char*, tinyxml2::XMLNode**) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90C87: tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F906E5: tinyxml2::XMLDocument::Parse() (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90996: tinyxml2::XMLDocument::Parse(char const*, unsigned int) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x48B6717: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014==  Address 0x510765c is 0 bytes after a block of size 444 alloc'd
==22014==    at 0x4830C2B: operator new(unsigned int) (vg_replace_malloc.c:328)
==22014==    by 0x48B6110: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014== 
==22014== Invalid read of size 4
==22014==    at 0x4F92C44: ??? (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F8E38C: tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode*) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90E30: tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F906E5: tinyxml2::XMLDocument::Parse() (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90996: tinyxml2::XMLDocument::Parse(char const*, unsigned int) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x48B6717: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014==  Address 0x510765c is 0 bytes after a block of size 444 alloc'd
==22014==    at 0x4830C2B: operator new(unsigned int) (vg_replace_malloc.c:328)
==22014==    by 0x48B6110: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014== 
==22014== Invalid read of size 4
==22014==    at 0x4F8C9AD: tinyxml2::XMLDocument::Identify(char*, tinyxml2::XMLNode**) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90C87: tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F906E5: tinyxml2::XMLDocument::Parse() (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F90996: tinyxml2::XMLDocument::Parse(char const*, unsigned int) (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x48B6717: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014==  Address 0x510765c is 0 bytes after a block of size 444 alloc'd
==22014==    at 0x4830C2B: operator new(unsigned int) (vg_replace_malloc.c:328)
==22014==    by 0x48B6110: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014== 
==22014== Invalid write of size 4
==22014==    at 0x4F8FDAB: tinyxml2::XMLDocument::~XMLDocument() (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x4F9001A: tinyxml2::XMLDocument::~XMLDocument() (in /usr/lib/libtinyxml2.so.6.2.0)
==22014==    by 0x48B6DCC: std::_Sp_counted_ptr<encfs::XmlReader::XmlReaderData*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48B4A70: encfs::XmlReader::~XmlReader() (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48970AE: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014==  Address 0x510765c is 0 bytes after a block of size 444 alloc'd
==22014==    at 0x4830C2B: operator new(unsigned int) (vg_replace_malloc.c:328)
==22014==    by 0x48B6110: encfs::XmlReader::load(char const*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4896F86: encfs::readV6Config(char const*, encfs::EncFSConfig*, encfs::ConfigInfo*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x48923CD: encfs::readConfig_load(encfs::ConfigInfo*, char const*, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x4892938: encfs::readConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, encfs::EncFSConfig*) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x489C94F: encfs::initFS(encfs::EncFS_Context*, std::shared_ptr<encfs::EncFS_Opts> const&) (in /usr/lib/libencfs.so.1.9.4)
==22014==    by 0x10CE97: main (in /usr/bin/encfs)
==22014== 

@rfjakob
Copy link
Collaborator

rfjakob commented May 22, 2018

Hmm. Looks the same as this from 2016: https://archlinuxarm.org/forum/viewtopic.php?f=9&t=12716

Thanks for the Valgrind run, most helpful. If I understand the output correctly, we are writing 4 bytes past allocated memory. And if it crashes or not depends on what is allocated there, and amd64 is usually lucky?

@taz-007
Copy link

taz-007 commented May 22, 2018

It's due to a new version of libtinyxml2 not being backward compatible. Arch recently upgraded to version 6.2 of tinyxml2. encfs was compiled against version 6.0 (probably). However the commit d946ddadc27cef72116237148f88593da57c894a introduced in that release 6.2 changes the size of the XMLDocument object. Thus the new() (in XmlReader::load()) done inside encfs no longer matches the actual size required for the new XMLDocument class. Hence the crash.
Recompiling encfs should fix the issue (not tested yet) however maybe tinyxml2 should not have broken backward compatibility ? (no idea if being backward compatible was supposed to be guaranteed by that lib)
Edit : seems it was supposed to be backward compatible, bug already opened : leethomason/tinyxml2#674

@Rondom
Copy link

Rondom commented May 23, 2018

If they do such changes, the SONAME should change.

@Oscar65
Copy link
Author

Oscar65 commented May 23, 2018

After upgrade system and get version 1.9.5-1.0 is working fine now.

@Oscar65 Oscar65 closed this as completed May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants