Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 770379 - net-misc/curl-7.75.0 (since 7.74.0-r4) has suboptimal dependency for the sslv3 USE flag
Summary: net-misc/curl-7.75.0 (since 7.74.0-r4) has suboptimal dependency for the sslv...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matt Jolly
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-13 13:24 UTC by Christian Schmidt
Modified: 2023-05-25 11:12 UTC (History)
5 users (show)

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 Christian Schmidt 2021-02-13 13:24:02 UTC
The ebuild currently is using

                openssl? (
                        dev-libs/openssl:0=[sslv3=,static-libs?,${MULTILIB_USEDEP}]
                )
 
which forces an exact match. However, curl can be built without sslv3 support (which is the better option) against an openssl with sslv3 support (should this be needed for other use cases).

A better choice would be

                 openssl? (
                        dev-libs/openssl:0=[sslv3?,static-libs?,${MULTILIB_USEDEP}]
                )

which forces on sslv3 on openssl if it's enabled for curl, but ignores it otherwise.
Comment 1 Christian Schmidt 2021-02-13 13:24:58 UTC
This is likely related to 744934, but I felt a new bug is better than reopening the old one.
Comment 2 Ionen Wolkens gentoo-dev 2021-02-13 13:44:36 UTC
Unfortunately can't do that, it re-introduce the original automagic issue that this is meant to fix.

# USE=sslv3 emerge -1 openssl
# USE=-sslv3 emerge -1 curl (allowed due to sslv3?)
# USE=-sslv3 emerge -1 openssl

x86_64-pc-linux-gnu-gcc -o test test.c -lcurl
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libcurl.so: undefined reference to `SSLv3_client_method@OPENSSL_1_1_0'
collect2: error: ld returned 1 exit status
Comment 3 Christian Schmidt 2021-02-13 14:06:52 UTC
Thanks for the explanation.

For future reference:
-sslv3 on curl does not do what one would expect. It does not *disable* sslv3 support in curl, as that is still autodetected from an OpenSSL with enables SSLv3 support.

What Ionen describes is the situation where a user installs an OpenSSL with sslv3 useflag, builds curl against it, then disables sslv3 on OpenSSL. Portage has no way to understand that libcurl requires OpenSSL with SSLv3 support (as curl is build with -sslv3), and thus a rebuild failes to consider it.

The proper solution would be to create a patch for curl that actually force-disables sslv3 support on top of the requested change.
Comment 4 Ionen Wolkens gentoo-dev 2021-02-13 15:13:51 UTC
Re-opening given getting user requests to find an alternate (working) solution for this, I'll leave decision up to the maintainer on what to do with this.
Comment 5 Anthony Basile gentoo-dev 2021-02-13 16:13:27 UTC
(In reply to Ionen Wolkens from comment #4)
> Re-opening given getting user requests to find an alternate (working)
> solution for this, I'll leave decision up to the maintainer on what to do
> with this.

The logic in the build system is convoluted, which is one of the reasons I went with a match with openssl.
Comment 6 Ionen Wolkens gentoo-dev 2021-02-13 17:29:26 UTC
These sslv3 issues may be more far reaching than just curl

wget and curl built with -Wl,-z,now:
$ wget
wget: symbol lookup error: wget: undefined symbol: SSLv3_client_method, version OPENSSL_1_1_0
$ curl
curl: symbol lookup error: /usr/lib64/libcurl.so.4: undefined symbol: SSLv3_client_method, version OPENSSL_1_1_0

Now I just lost both fetching tools.
Comment 7 Matt Jolly gentoo-dev 2023-05-24 14:20:34 UTC
WONTFIX:

+ This is irrelevant with openssl 3
+ All versions of cURL for the last two years (almost to the day) refuse to do sslv3 connections
+ Blanket disabling sslv3 to prevent an unlikely issue from occurring is unpalatable; someone, somewhere, may want to enable it
+ I don't want to maintain a curl build system patch that won't be upstreamed
+ Just use a modern / decent TLS implementation
Comment 8 Christian Schmidt 2023-05-25 11:12:07 UTC
If curl does not accidentally use sslv3 just because the use flag is set, all is well and the base for the bug does not exist (any more).