summaryrefslogtreecommitdiff
path: root/net-misc/curl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /net-misc/curl
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'net-misc/curl')
-rw-r--r--net-misc/curl/Manifest3
-rw-r--r--net-misc/curl/curl-7.70.0-r1.ebuild (renamed from net-misc/curl/curl-7.70.0.ebuild)1
-rw-r--r--net-misc/curl/files/curl-fix-cpu-load.patch94
3 files changed, 97 insertions, 1 deletions
diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest
index ea6c22b593ea..8e11a8351a2e 100644
--- a/net-misc/curl/Manifest
+++ b/net-misc/curl/Manifest
@@ -1,4 +1,5 @@
AUX curl-7.30.0-prefix.patch 880 BLAKE2B 5b7552a8339014221864a585d174b02a96ec7dd7fe8762d331d1981834044f8ec4db64d527a4ded3f5f4cccc86f281576668de092439eb19f5477d5fcf8369cf SHA512 c7cd13b9ccbd12ed01ea121ffece9c23b898a5b34698bae59ae1dd23b1cf2445180b84d80c4a640981f16dba5018df944f405dd5c660addab54ca21e0e673b7f
+AUX curl-fix-cpu-load.patch 3369 BLAKE2B 049a0d5b0dc6262d2d722e037d75cd966f7b87fd7e4bea23130118e91f1b54e1d374e2879b235cc90aeae8357588167b6bec7a375f9b23a4f96944ff12841519 SHA512 223a8b68157d58b050f89b46d2f3f5a486aa111fe5f5df46db3b49745e2a17e6be4a19fbf9b398f62311ee34fb0051f5302025632152188e840a0c60256b4da0
AUX curl-fix-gnutls-nettle.patch 1186 BLAKE2B 5a7ea1ab68e8e314cda5b957335caf84e5b0e9b2b65c1eacfe94349139ff27903d55ae608a71a0389bf9f8bfbda92184c4cc30ca0b96b13b11f0d77cbf4c7b53 SHA512 b88d4d71a1d55626aedea620e94a5b6064141c6ff0d8a64c784705d44d4a00dc789dd0a55a56320ca4c9f2b9914e72285447c9310bb4563b45d7f3430b18a0fa
AUX curl-respect-cflags-3.patch 406 BLAKE2B 1b533144858aff5566150c4a2648ad2e48e8ff29849ae285592edfee4b3332d06e750395dea7190ee6a01d2b5ee2c2c42c10400c2e5defa09963a90a1a10417d SHA512 3219e4e67d534e35012909243fc8d69d58989462db44dd507c502e7aaa299f1d9a01392e2c83797cc2bdb53d503470c5d6e7bf94572a6ccc6e5eafcc0466bc54
DIST curl-7.68.0.tar.xz 2442788 BLAKE2B d72dbf3c4d6ef7259f0dc9b5347f9289067807246ce6aaab03f3a9c04c17328a8315261dbc08390096571bcad3bbb185a70d15ce83687d7e792bee37318bf269 SHA512 bf365609c9a66a05b3a263d02bcd3f81f905570c5739c8ec522a296b4b8e2a479d64d5524e8345e14eafad28995ee22d923522f1a45fa40eb46db38759c2eb2c
@@ -6,5 +7,5 @@ DIST curl-7.69.1.tar.xz 2467272 BLAKE2B 71eee2a8f511ea698f4ebf879bcdccabe11439b2
DIST curl-7.70.0.tar.xz 2348780 BLAKE2B 6b505d87242bcaa554c4ee6994eb97ca70453521c1e77b5e757677475328c70f41e23e22b3a0eb9be7a299a94d4f1f85a46f7f999f3db8439072626320352ecf SHA512 ab8796af1bd6f35ae704fd5e3639a8153482615a05c24e2e6d0b9cef8ed9a1e0d497ead2dbf5972cc53f632c2d87f0bf79e9e7cac625452dd24e6c7d8045cfc6
EBUILD curl-7.68.0.ebuild 7600 BLAKE2B cc01e76a04b7023aa8aca65e65338279137fcf943ce474518fb807e9b4eaeecfb18022c39e8157a964168f73f07ab32c1e2553ad829ed5335f4f347506c45e45 SHA512 77bac8d7fd71c7f760ded2c96085e48c0f78b782cbde0b0449164e64c10ef527b2540ee7b8dc2dd3666560dd074fcf6b05d8d289798db3e12be2cf5b3a15f3a7
EBUILD curl-7.69.1.ebuild 7689 BLAKE2B 6ebb15523c0c917566909676365e777b084deca51fc7b70c994c1b220ee14636db15b94f13b59c5a87e2d0db3e63c5cba70b86062fe67cf3969e8df8eaf857bb SHA512 634fbd2b51bec9d18b71233cbd13c1483713063442d73442749b7bc9ebee914b9abb0810d2291e9e14c969da3bcc575f9d00699ddc27b073b9a6ad37aba7813e
-EBUILD curl-7.70.0.ebuild 7714 BLAKE2B 360a1cc39ce2b4d49c209194d315150fe89c44393c381388e2a2dc97b02e7e59e61a85b7e39e86e316c0f5be0b25e1d5553601c81b5cb5dc64a91738da332372 SHA512 06460ecff9c0b62136d2e3dd1cade6cd2132f4f0ae23942f01e48a5c345057247bb1879bc505678c9d242f5f7a36e7dea9bbdfc9f457d55243d352417f4eb508
+EBUILD curl-7.70.0-r1.ebuild 7761 BLAKE2B 00d1cb77817f4410c555d5892e3f32da58735ec42efa33ef1c2bf60fddb6a2c9f4e716f89bcc53f53f29ea6f549854f890cb5a7f7cc8bd6c95efd3230ec4f7e0 SHA512 42933f751419d2bad72e06aadea7948824cf2d2139647316d63077199d96ee98192182cda097a4f855319fc2f93523548745870c18faf4b59a925b7678fb0c7a
MISC metadata.xml 1643 BLAKE2B 269e3f95823a962466081b171d376e1f13cf4e8ac7d440577f704d585d40d0a4e7f496be1860f283f2e118338183210c1a93d3cff24fe517c9fed57dcd8b615c SHA512 ed329ba19ca89372141274e7fcb161e9f825e219d9bf71dc719b1a2bf5deefdecaaab02bb6e5e4c0bd1c87ce16731f7f5137dffb86e65c67381d98eaf72cc2d9
diff --git a/net-misc/curl/curl-7.70.0.ebuild b/net-misc/curl/curl-7.70.0-r1.ebuild
index 6d8ee271731d..7b751a4ef1c8 100644
--- a/net-misc/curl/curl-7.70.0.ebuild
+++ b/net-misc/curl/curl-7.70.0-r1.ebuild
@@ -105,6 +105,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-7.30.0-prefix.patch
eapply "${FILESDIR}"/${PN}-respect-cflags-3.patch
eapply "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
+ eapply "${FILESDIR}"/${PN}-fix-cpu-load.patch
sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
sed -i '/CURL_MAC_CFLAGS/d' configure.ac || die #637252
diff --git a/net-misc/curl/files/curl-fix-cpu-load.patch b/net-misc/curl/files/curl-fix-cpu-load.patch
new file mode 100644
index 000000000000..fb20641b5b22
--- /dev/null
+++ b/net-misc/curl/files/curl-fix-cpu-load.patch
@@ -0,0 +1,94 @@
+Fixes https://bugs.gentoo.org/727352
+
+From 2a41e236716da4c41ebc1132bd36d9273bd0321f Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Mon, 8 Jun 2020 14:05:22 +0200
+Subject: [PATCH] socks: detect connection close during handshake
+
+The SOCKS4/5 state machines weren't properly terminated when the proxy
+connection got closed, leading to a busy-loop.
+
+Reported-By: zloi-user on github
+Fixes #5532
+Closes #5542
+---
+ lib/socks.c | 32 ++++++++++++++++++++++++++++----
+ 1 file changed, 28 insertions(+), 4 deletions(-)
+
+diff --git a/lib/socks.c b/lib/socks.c
+index 4c1af7b9de7..b2215fef30c 100644
+--- a/lib/socks.c
++++ b/lib/socks.c
+@@ -382,6 +382,11 @@ CURLcode Curl_SOCKS4(const char *proxy_user,
+ curl_easy_strerror(result));
+ return CURLE_COULDNT_CONNECT;
+ }
++ else if(!result && !actualread) {
++ /* connection closed */
++ failf(data, "connection to proxy closed");
++ return CURLE_COULDNT_CONNECT;
++ }
+ else if(actualread != sx->outstanding) {
+ /* remain in reading state */
+ sx->outstanding -= actualread;
+@@ -592,6 +597,11 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
+ failf(data, "Unable to receive initial SOCKS5 response.");
+ return CURLE_COULDNT_CONNECT;
+ }
++ else if(!result && !actualread) {
++ /* connection closed */
++ failf(data, "Connection to proxy closed");
++ return CURLE_COULDNT_CONNECT;
++ }
+ else if(actualread != sx->outstanding) {
+ /* remain in reading state */
+ sx->outstanding -= actualread;
+@@ -717,15 +727,19 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
+ failf(data, "Unable to receive SOCKS5 sub-negotiation response.");
+ return CURLE_COULDNT_CONNECT;
+ }
+- if(actualread != sx->outstanding) {
++ else if(!result && !actualread) {
++ /* connection closed */
++ failf(data, "connection to proxy closed");
++ return CURLE_COULDNT_CONNECT;
++ }
++ else if(actualread != sx->outstanding) {
+ /* remain in state */
+ sx->outstanding -= actualread;
+ sx->outp += actualread;
+ return CURLE_OK;
+ }
+-
+ /* ignore the first (VER) byte */
+- if(socksreq[1] != 0) { /* status */
++ else if(socksreq[1] != 0) { /* status */
+ failf(data, "User was rejected by the SOCKS5 server (%d %d).",
+ socksreq[0], socksreq[1]);
+ return CURLE_COULDNT_CONNECT;
+@@ -890,6 +904,11 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
+ failf(data, "Failed to receive SOCKS5 connect request ack.");
+ return CURLE_COULDNT_CONNECT;
+ }
++ else if(!result && !actualread) {
++ /* connection closed */
++ failf(data, "connection to proxy closed");
++ return CURLE_COULDNT_CONNECT;
++ }
+ else if(actualread != sx->outstanding) {
+ /* remain in state */
+ sx->outstanding -= actualread;
+@@ -967,7 +986,12 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
+ failf(data, "Failed to receive SOCKS5 connect request ack.");
+ return CURLE_COULDNT_CONNECT;
+ }
+- if(actualread != sx->outstanding) {
++ else if(!result && !actualread) {
++ /* connection closed */
++ failf(data, "connection to proxy closed");
++ return CURLE_COULDNT_CONNECT;
++ }
++ else if(actualread != sx->outstanding) {
+ /* remain in state */
+ sx->outstanding -= actualread;
+ sx->outp += actualread;