Public bug reported: Program that use library openssl will crash when they are run in "faketime" (in the tool that sets system date to certain faked time/date).
Impact: this bug makes it impossible to do deterministic build of application using for example cmake and faketime. Also according to https://github.com/wolfcw/libfaketime/issues/93 This is not a bug of libfaketime or cmake. This bug comes from openssl library. Reproduce example: $ REFERENCE_DATETIME="2016-08-05 00:00:00" $ export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 $ export FAKETIME=$REFERENCE_DATETIME $ cmake . --> Segmentation fault (core dumped) ## Even with empty CMakeLists.txt file ($gdb cmake .) output: (gdb) run Starting program: /usr/bin/cmake [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007ffff7bd16d2 in time () from /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 #2 0x00007ffff49c1f79 in RAND_poll () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #3 0x00007ffff49c0bd5 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #4 0x00007ffff49c1603 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #5 0x00007ffff4a37288 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #6 0x00007ffff4a37914 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #7 0x00007ffff49c1993 in RAND_init_fips () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #8 0x00007ffff4904f7a in OPENSSL_init_library () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 #9 0x00007ffff7de74ea in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffec08, env=env@entry=0x7fffffffec18) at dl-init.c:72 #10 0x00007ffff7de75fb in call_init (env=0x7fffffffec18, argv=0x7fffffffec08, argc=1, l=<optimized out>) at dl-init.c:30 #11 _dl_init (main_map=0x7ffff7ffe168, argc=1, argv=0x7fffffffec08, env=0x7fffffffec18) at dl-init.c:120 #12 0x00007ffff7dd7cfa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #13 0x0000000000000001 in ?? () #14 0x00007fffffffee15 in ?? () #15 0x0000000000000000 in ?? () ubuntu release: $ lsb_release -a ; uname -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial Linux gitian 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux openssl version: $ apt-cache policy openssl openssl: Installed: 1.0.2g-1ubuntu4.1 Candidate: 1.0.2g-1ubuntu4.1 Version table: *** 1.0.2g-1ubuntu4.1 500 500 http://10.0.3.2:3142/security.ubuntu.com/ubuntu xenial-security/main amd64 Packages 500 http://10.0.3.2:3142/archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 1.0.2g-1ubuntu4 500 500 http://10.0.3.2:3142/archive.ubuntu.com/ubuntu xenial/main amd64 Packages ** Affects: openssl (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1613658 Title: OPENSSL_init_library () crash in conjunction with faketime To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1613658/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs