Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654582 - net-vpn/tor: LibreSSL broken in 9999
Summary: net-vpn/tor: LibreSSL broken in 9999
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://trac.torproject.org/projects/...
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2018-05-02 07:25 UTC by Toralf Förster
Modified: 2018-05-09 17:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-05-02 07:25:21 UTC
The latest git tree of tor can't be compiled at my hardened stable Gentoo Linux server with LibreSSL.

  AR       src/common/libor-ctime.a
  CC       src/common/aes.o
src/common/aes.c: In function ‘aes_cipher_free_’:
src/common/aes.c:120:3: warning: implicit declaration of function ‘EVP_CIPHER_CTX_reset’ [-Wimplicit-function-declaration]
   EVP_CIPHER_CTX_reset(cipher);
   ^~~~~~~~~~~~~~~~~~~~
src/common/aes.c:120:3: warning: nested extern declaration of ‘EVP_CIPHER_CTX_reset’ [-Wnested-externs]
  CC       src/common/buffers_tls.o
  CC       src/common/compress.o
  CC       src/common/compress_lzma.o
  CC       src/common/compress_none.o
  CC       src/common/compress_zlib.o
  CC       src/common/compress_zstd.o
  CC       src/common/crypto.o
src/common/crypto.c: In function ‘crypto_early_init’:
src/common/crypto.c:209:5: warning: implicit declaration of function ‘OPENSSL_init_ssl’ [-Wimplicit-function-declaration]
     OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
     ^~~~~~~~~~~~~~~~
src/common/crypto.c:209:5: warning: nested extern declaration of ‘OPENSSL_init_ssl’ [-Wnested-externs]
src/common/crypto.c:209:22: error: ‘OPENSSL_INIT_LOAD_SSL_STRINGS’ undeclared (first use in this function)
     OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:209:22: note: each undeclared identifier is reported only once for each function it appears in
src/common/crypto.c:210:22: error: ‘OPENSSL_INIT_LOAD_CRYPTO_STRINGS’ undeclared (first use in this function)
                      OPENSSL_INIT_LOAD_CRYPTO_STRINGS |
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:211:22: error: ‘OPENSSL_INIT_ADD_ALL_CIPHERS’ undeclared (first use in this function)
                      OPENSSL_INIT_ADD_ALL_CIPHERS |
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:212:22: error: ‘OPENSSL_INIT_ADD_ALL_DIGESTS’ undeclared (first use in this function)
                      OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:5767: src/common/crypto.o] Error 1
make[1]: Leaving directory '/home/torproject/tor'
make: *** [Makefile:3347: all] Error 2


The last successful build was git-2748dd0f1 at 20180425-211528.
Since then just changes happened:


Thu Apr 26 14:50:32 2018 <<< sys-devel/autoconf-wrapper-13
Thu Apr 26 14:50:34 2018 >>> sys-devel/autoconf-wrapper-13-r1
Fri Apr 27 03:37:47 2018 <<< dev-libs/libxml2-2.9.7
Fri Apr 27 03:37:49 2018 >>> dev-libs/libxml2-2.9.8
Sun Apr 29 13:47:40 2018 <<< app-crypt/rhash-1.3.5
Sun Apr 29 13:47:42 2018 >>> app-crypt/rhash-1.3.5
Sun Apr 29 18:13:08 2018 <<< sys-power/acpid-2.0.28
Sun Apr 29 18:13:10 2018 >>> sys-power/acpid-2.0.29
Mon Apr 30 17:23:56 2018 <<< net-libs/libnsl-0
Mon Apr 30 17:23:58 2018 >>> net-libs/libnsl-0-r1
Mon Apr 30 18:14:34 2018 <<< net-libs/stem-1.6.0
Mon Apr 30 18:14:36 2018 >>> net-libs/stem-1.6.0
Tue May  1 13:56:22 2018 <<< sys-apps/shadow-4.5
Tue May  1 13:56:24 2018 >>> sys-apps/shadow-4.6
Tue May  1 17:26:30 2018 <<< net-libs/stem-1.6.0
Tue May  1 17:26:33 2018 >>> net-libs/stem-1.6.0
Tue May  1 17:31:15 2018 <<< net-libs/stem-1.6.0
Tue May  1 17:31:17 2018 >>> net-libs/stem-1.6.0
Tue May  1 19:07:34 2018 <<< net-vpn/tor-0.3.3.5_rc
Tue May  1 19:07:36 2018 >>> net-vpn/tor-0.3.3.5_rc
Tue May  1 19:18:07 2018 <<< net-libs/stem-1.6.0
Tue May  1 19:18:09 2018 >>> net-libs/stem-1.6.0
Comment 1 Toralf Förster gentoo-dev 2018-05-02 08:29:29 UTC
and "git bisect run make" gives :

a15b2c57e1f901c531a5f063513a541adb418ae1 is the first bad commit
commit a15b2c57e1f901c531a5f063513a541adb418ae1
Author: Nick Mathewson <nickm@torproject.org>
Date:   Wed Apr 18 12:31:24 2018 -0400

    Add support for openssl built with "no-deprecated".
    
    Patch from Andrew John Hughes; partial fix for 19981.

:040000 040000 2a4d13c421765bb91ab3cfce5a1d708134bd69c6 8e8a66a40370b9bcb383c77981627d3920ea395c M      src
bisect run success
Comment 2 Toralf Förster gentoo-dev 2018-05-02 08:46:20 UTC
And for the record, here's the environment:

export AFL_HARDEN=1
export AFL_DONT_OPTIMIZE=1
# for afl-fuzz
#
export AFL_SKIP_CPUFREQ=1
export AFL_EXIT_WHEN_DONE=1
export AFL_NO_AFFINITY=1

export CFLAGS="-O2 -pipe -march=native"
export CC="afl-gcc"
Comment 3 Toralf Förster gentoo-dev 2018-05-09 17:09:29 UTC
upstream fixed