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

libwolfssl/libcurl: CVE-Fix (PR#19513) will crash https-dns-proxy #19547

Closed
realizelol opened this issue Oct 7, 2022 · 8 comments · Fixed by #19548
Closed

libwolfssl/libcurl: CVE-Fix (PR#19513) will crash https-dns-proxy #19547

realizelol opened this issue Oct 7, 2022 · 8 comments · Fixed by #19548

Comments

@realizelol
Copy link

Maintainer: @tapper82 , @stangri , @ynezz , @neheb
Environment: OpenWrt 21.02.3 r16554-1d4dea6d4f - x86_64 - Generic v0 (ImageBuilder)

Description:

I think since PR #19513 the actual packages @ repo downloads.openwrt.org will stop SSL support for curl.

Maybe in case of the missing commits in branch openwrt-21.02 ?:
https://github.com/openwrt/packages/commits/master/net/curl/Makefile
-> 312ab68
-> b814eec
-> 03a3271
-> c812153
https://github.com/openwrt/packages/commits/openwrt-21.02/net/curl/Makefile



curl -v https://openwrt.org
* Protocol "https" not supported or disabled in libcurl
curl: (1) Protocol "https" not supported or disabled in libcurl

Syslog:

root@OpenWrt:~# grep -i 'https-dns-proxy' /var/log/syslog
Fri Oct  7 12:37:22 2022 user.notice https-dns-proxy: Starting service ✓
Fri Oct  7 12:37:22 2022 daemon.info https-dns-proxy[4494]: [W] 1665139042.858021 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:23 2022 daemon.info https-dns-proxy[4494]: [F] 1665139043.083623 https-dns-proxy-2021-11-22/src/https_client.c:317 08C8: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:28 2022 daemon.info https-dns-proxy[6972]: [W] 1665139048.086884 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:28 2022 daemon.info https-dns-proxy[6972]: [F] 1665139048.244363 https-dns-proxy-2021-11-22/src/https_client.c:317 EA6E: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:33 2022 daemon.info https-dns-proxy[7388]: [W] 1665139053.246573 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:33 2022 daemon.info https-dns-proxy[7388]: [W] 1665139053.249886 main.c:119 EA6E: Query received before bootstrapping is completed, discarding.
Fri Oct  7 12:37:35 2022 daemon.info https-dns-proxy[7388]: [F] 1665139055.593302 https-dns-proxy-2021-11-22/src/https_client.c:317 A465: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:40 2022 daemon.info https-dns-proxy[7430]: [W] 1665139060.596336 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:41 2022 daemon.info https-dns-proxy[7430]: [F] 1665139061.270342 https-dns-proxy-2021-11-22/src/https_client.c:317 89C1: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:46 2022 daemon.info https-dns-proxy[7451]: [W] 1665139066.271223 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:46 2022 daemon.info https-dns-proxy[7451]: [W] 1665139066.273961 main.c:119 89C1: Query received before bootstrapping is completed, discarding.
Fri Oct  7 12:37:46 2022 daemon.info https-dns-proxy[7451]: [F] 1665139066.601962 https-dns-proxy-2021-11-22/src/https_client.c:317 B7CC: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:51 2022 daemon.info https-dns-proxy[7495]: [W] 1665139071.604249 main.c:236 HTTP/3 is not supported by current libcurl
Fri Oct  7 12:37:51 2022 daemon.info https-dns-proxy[7495]: [W] 1665139071.604720 main.c:119 A465: Query received before bootstrapping is completed, discarding.
Fri Oct  7 12:37:51 2022 daemon.info https-dns-proxy[7495]: [W] 1665139071.604844 main.c:119 7CC2: Query received before bootstrapping is completed, discarding.
Fri Oct  7 12:37:53 2022 daemon.info https-dns-proxy[7495]: [F] 1665139073.683444 https-dns-proxy-2021-11-22/src/https_client.c:317 A807: CURLOPT_SSLVERSION error 4: Error
Fri Oct  7 12:37:53 2022 daemon.info procd: Instance https-dns-proxy::instance1 s in a crash loop 6 crashes, 2 seconds since last crash

Installed packages (ERROR):

opkg list-installed | grep -i 'curl\|ssl\|https-dns-proxy'
curl - 7.83.1-2.1
https-dns-proxy - 2021-11-22-3
libcurl4 - 7.83.1-2.1
libopenssl-conf - 1.1.1q-1
libopenssl1.1 - 1.1.1q-1
libustream-wolfssl20201210 - 2022-01-16-868fd881-2
libwolfssl5.5.1.99a5b54a - 5.5.1-stable-2
luci-ssl - git-20.244.36115-e10f954
openssl-util - 1.1.1q-1
php8-mod-curl - 8.0.24-1
px5g-wolfssl - 4.1
wget-ssl - 1.21.1-1

Installed packages (WORKING):

opkg list-installed | grep -i 'curl\|ssl\|https-dns-proxy'
curl - 7.83.1-1
https-dns-proxy - 2021-11-22-3
libcurl4 - 7.83.1-1
libopenssl-conf - 1.1.1q-1
libopenssl1.1 - 1.1.1q-1
libustream-wolfssl20201210 - 2022-01-16-868fd881-1
libwolfssl5.2.0.99a5b54a - 5.2.0-stable-2
luci-ssl - git-20.244.36115-e10f954
openssl-util - 1.1.1q-1
php8-mod-curl - 8.0.20-1
px5g-wolfssl - 3
wget-ssl - 1.21.1-1

best regards
realizelol

ynezz pushed a commit to ynezz/openwrt-packages that referenced this issue Oct 7, 2022
options.h header is needed after bump of libwolfssl to version 5.5.1,
otherwise libcurl autodetection for libwolfssl availability fails and
libcurl is then compiled without https support.

Fixes: openwrt#19547
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 3175757)
(cherry picked from commit ef545e0)
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit verbosity]
@ynezz
Copy link
Member

ynezz commented Oct 7, 2022

Sorry for the breakage, should be fixed in #19548.

@wentuq
Copy link

wentuq commented Oct 7, 2022

Same issue, can I download somewhere fixed package, or have to wait until it appears in official repo?

@realizelol
Copy link
Author

Same issue, can I download somewhere fixed package, or have to wait until it appears in official repo?


Until it's fixed you could use the archive repo:
https://archive.openwrt.org/releases/
https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/ e.g.
and download these packages which aren't affected:

curl - 7.83.1-1 (packages)
libcurl4 - 7.83.1-1 (packages)
libwolfssl5.2.0.99a5b54a - 5.2.0-stable-2 (base)

e.g. for 21.02 x86_64 - step by step:

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/curl_7.83.1-2.1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/libcurl4_7.83.1-2.1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/base/libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install libcurl4_7.83.1-2.1_x86_64.ipk
opkg install curl_7.83.1-2.1_x86_64.ipk 

Maybe you have to swap the order of the install. But opkg will inform you about the dependency error if it occurs.
There is no reboot needed. But some services dependent on libcurl so it would be recommended to do so.


best regards
realizelol

@ynezz ynezz closed this as completed Oct 8, 2022
@ray-308
Copy link

ray-308 commented Oct 8, 2022

Sorry for my noob question, but what packages to use for an raspberry pi 4b? I asume the arm packages?

Think I found them 'aarch64_cortex-a72' but no libwolfssl5.2.0.99a5b54a - 5.2.0-stable-2 in https://archive.openwrt.org/releases/21.02.3/packages/aarch64_cortex-a72/packages/

ooh it's in /base/. I'm getting there..

It works thanks for the fix!

@ntninja
Copy link

ntninja commented Oct 9, 2022

When is this going to be fixed for mips_24kc? The current 7.83.1-2.1 version of libcurl4 appears to still be affected by this issue?

ynezz added a commit to ynezz/curl that referenced this issue Oct 10, 2022
When I explicitly declare, that I would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then I would
expect, that either I endup with curl having that support, for example
in form of https support or it wouldn't be available at all.

Downstream projects like for example OpenWrt build curl wolfSSL variant
with `--with-wolfssl` already, but in certain corner cases it does fail:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produces curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt/packages#19005
References: openwrt/packages#19547
Signed-off-by: Petr Štetiar <ynezz@true.cz>
ynezz added a commit to ynezz/openwrt-packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Submitted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@ynezz
Copy link
Member

ynezz commented Oct 10, 2022

When is this going to be fixed for mips_24kc? The current 7.83.1-2.1 version of libcurl4 appears to still be affected by this issue?

When the build workers finishes the package rebuilds for those affected archs https://buildbot.openwrt.org/openwrt-21.02/packages/#/waterfall

bagder pushed a commit to curl/curl that referenced this issue Oct 10, 2022
When I explicitly declare, that I would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then I would
expect, that either I endup with curl having that support, for example
in form of https support or it wouldn't be available at all.

Downstream projects like for example OpenWrt build curl wolfSSL variant
with `--with-wolfssl` already, but in certain corner cases it does fail:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produces curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt/packages#19005
References: openwrt/packages#19547
Signed-off-by: Petr Štetiar <ynezz@true.cz>

Closes #9682
ynezz added a commit to ynezz/openwrt-packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
stangri pushed a commit to stangri/packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
stangri pushed a commit to stangri/packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
stangri pushed a commit to stangri/packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
stangri pushed a commit to stangri/packages that referenced this issue Oct 10, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
obonaventure pushed a commit to mptcp-apps/curl that referenced this issue Oct 12, 2022
When I explicitly declare, that I would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then I would
expect, that either I endup with curl having that support, for example
in form of https support or it wouldn't be available at all.

Downstream projects like for example OpenWrt build curl wolfSSL variant
with `--with-wolfssl` already, but in certain corner cases it does fail:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produces curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt/packages#19005
References: openwrt/packages#19547
Signed-off-by: Petr Štetiar <ynezz@true.cz>

Closes curl#9682
@mietzen
Copy link

mietzen commented Oct 15, 2022

Same issue, can I download somewhere fixed package, or have to wait until it appears in official repo?

Until it's fixed you could use the archive repo: https://archive.openwrt.org/releases/ https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/ e.g. and download these packages which aren't affected:

curl - 7.83.1-1 (packages)
libcurl4 - 7.83.1-1 (packages)
libwolfssl5.2.0.99a5b54a - 5.2.0-stable-2 (base)

e.g. for 21.02 x86_64 - step by step:

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/curl_7.83.1-2.1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/libcurl4_7.83.1-2.1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/base/libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install libcurl4_7.83.1-2.1_x86_64.ipk
opkg install curl_7.83.1-2.1_x86_64.ipk 

Maybe you have to swap the order of the install. But opkg will inform you about the dependency error if it occurs. There is no reboot needed. But some services dependent on libcurl so it would be recommended to do so.

best regards realizelol

The versions are incorrect!
https://forum.openwrt.org/t/curl-stopped-working-for-https-after-latest-woflssl-patch-21-02/139000/46?u=mietz

It must be:

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/curl_7.83.1-1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/libcurl4_7.83.1-1_x86_64.ipk
wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/base/libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install --force-reinstall libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk
opkg install --force-reinstall libcurl4_7.83.1-1_x86_64.ipk
opkg install --force-reinstall curl_7.83.1-1_x86_64.ipk

@realizelol
Copy link
Author

Same issue, can I download somewhere fixed package, or have to wait until it appears in official repo?

Until it's fixed you could use the archive repo: https://archive.openwrt.org/releases/ https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/ e.g. and download these packages which aren't affected:

curl - 7.83.1-1 (packages)

libcurl4 - 7.83.1-1 (packages)

libwolfssl5.2.0.99a5b54a - 5.2.0-stable-2 (base)

e.g. for 21.02 x86_64 - step by step:

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/curl_7.83.1-2.1_x86_64.ipk

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/libcurl4_7.83.1-2.1_x86_64.ipk

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/base/libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk

opkg install libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk

opkg install libcurl4_7.83.1-2.1_x86_64.ipk

opkg install curl_7.83.1-2.1_x86_64.ipk

Maybe you have to swap the order of the install. But opkg will inform you about the dependency error if it occurs. There is no reboot needed. But some services dependent on libcurl so it would be recommended to do so.

best regards realizelol

The versions are incorrect!

https://forum.openwrt.org/t/curl-stopped-working-for-https-after-latest-woflssl-patch-21-02/139000/46?u=mietz

It must be:


wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/curl_7.83.1-1_x86_64.ipk

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/packages/libcurl4_7.83.1-1_x86_64.ipk

wget -q https://archive.openwrt.org/releases/21.02.3/packages/x86_64/base/libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk

opkg install --force-reinstall libwolfssl5.2.0.99a5b54a_5.2.0-stable-2_x86_64.ipk

opkg install --force-reinstall libcurl4_7.83.1-1_x86_64.ipk

opkg install --force-reinstall curl_7.83.1-1_x86_64.ipk

Sorry, yes you're right. My mentioned packages versions are correct but my links are not.

Yesterday there was an update to the actual repo (downloads.openwrt.org), so hopefully this bug has been fixed now.


best regards

realizelol

jquepi pushed a commit to jquepi/curl.1.555 that referenced this issue Oct 24, 2022
When I explicitly declare, that I would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then I would
expect, that either I endup with curl having that support, for example
in form of https support or it wouldn't be available at all.

Downstream projects like for example OpenWrt build curl wolfSSL variant
with `--with-wolfssl` already, but in certain corner cases it does fail:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produces curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt/packages#19005
References: openwrt/packages#19547
Signed-off-by: Petr Štetiar <ynezz@true.cz>

Closes #9682
roaldclark pushed a commit to qculug/openwrt-packages that referenced this issue Nov 21, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
stokito pushed a commit to stokito/packages that referenced this issue Dec 6, 2022
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
SibrenVasse pushed a commit to SibrenVasse/packages that referenced this issue Feb 26, 2023
When we explicitly declare, that we would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then we should
make sure, that we either endup with curl having that support, or it
shouldn't be available at all, otherwise we risk, that we end up with
regressions like following:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produce curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: openwrt#19005, openwrt#19547
Upstream-Status: Accepted [curl/curl#9682]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9140f36)
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

Successfully merging a pull request may close this issue.

6 participants