1
1
Files
zyxel-vmg8825_b50b-cfw/package/network/utils/curl/patches/208-CVE-2020-8284.patch
T
2026-04-17 18:33:03 +02:00

65 lines
2.9 KiB
Diff

Index: curl-7.72.0/docs/cmdline-opts/ftp-skip-pasv-ip.d
===================================================================
--- curl-7.72.0.orig/docs/cmdline-opts/ftp-skip-pasv-ip.d 2020-08-13 17:55:10.000000000 +0800
+++ curl-7.72.0/docs/cmdline-opts/ftp-skip-pasv-ip.d 2021-01-18 16:40:42.650518691 +0800
@@ -9,4 +9,6 @@
will re-use the same IP address it already uses for the control
connection.
+Since curl 7.74.0 this option is enabled by default.
+
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
Index: curl-7.72.0/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
===================================================================
--- curl-7.72.0.orig/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 2020-08-19 15:38:29.000000000 +0800
+++ curl-7.72.0/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 2021-01-18 16:40:42.654520692 +0800
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -36,11 +36,13 @@
number from the 227-response.
This option thus allows libcurl to work around broken server installations
-that due to NATs, firewalls or incompetence report the wrong IP address back.
+that due to NATs, firewalls or incompetence report the wrong IP address
+back. Setting the option also reduces the risk for various sorts of client
+abuse by malicious servers.
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
.SH DEFAULT
-0
+1 since 7.74.0, was 0 before then.
.SH PROTOCOLS
FTP
.SH EXAMPLE
Index: curl-7.72.0/lib/url.c
===================================================================
--- curl-7.72.0.orig/lib/url.c 2020-08-17 20:34:42.000000000 +0800
+++ curl-7.72.0/lib/url.c 2021-01-18 16:40:42.654520692 +0800
@@ -480,6 +480,7 @@
set->ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */
set->ftp_use_pret = FALSE; /* mainly useful for drftpd servers */
set->ftp_filemethod = FTPFILE_MULTICWD;
+ set->ftp_skip_ip = TRUE; /* skip PASV IP by default */
#endif
set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
Index: curl-7.72.0/src/tool_cfgable.c
===================================================================
--- curl-7.72.0.orig/src/tool_cfgable.c 2020-08-11 19:40:41.000000000 +0800
+++ curl-7.72.0/src/tool_cfgable.c 2021-01-18 16:46:12.691296288 +0800
@@ -44,6 +44,7 @@
config->tcp_nodelay = TRUE; /* enabled by default */
config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT;
config->http09_allowed = FALSE;
+ config->ftp_skip_ip = TRUE;
}
static void free_config_fields(struct OperationConfig *config)