summaryrefslogtreecommitdiff
path: root/net-ftp/pure-ftpd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /net-ftp/pure-ftpd/files
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'net-ftp/pure-ftpd/files')
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-MAX_DATA_SIZE.patch22
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch46
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.1.patch22
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.3.patch21
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch31
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch27
6 files changed, 58 insertions, 111 deletions
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-MAX_DATA_SIZE.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-MAX_DATA_SIZE.patch
deleted file mode 100644
index a9ad0a30b9b6..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-MAX_DATA_SIZE.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 27a5c200f9643ce907118aad169279b3a66a9e8a Mon Sep 17 00:00:00 2001
-From: Frank Denis <github@pureftpd.org>
-Date: Sat, 4 Nov 2017 20:46:16 +0100
-Subject: [PATCH] Increase MAX_DATA_SIZE due to Argon2id requirements
-
----
- src/ftpd.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ftpd.h b/src/ftpd.h
-index 1beeab8..5bb1f6b 100644
---- a/src/ftpd.h
-+++ b/src/ftpd.h
-@@ -557,7 +557,7 @@ Your platform has a very large PATH_MAX, we should not trust it.
-
- #ifndef MAX_DATA_SIZE
- # ifdef HAVE_LIBSODIUM
--# define MAX_DATA_SIZE (40 * 1024 * 1024)
-+# define MAX_DATA_SIZE (70 * 1024 * 1024)
- # elif defined(WITH_LDAP) || defined(WITH_MYSQL) || defined(WITH_PGSQL)
- # define MAX_DATA_SIZE (16 * 1024 * 1024) /* Max memory usage - SQL/LDAP need more */
- # else
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch
deleted file mode 100644
index 65f19bf49da7..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4a495c61ce22c893aed5ee57f6ce0b43c3be59ad Mon Sep 17 00:00:00 2001
-From: Frank Denis <github@pureftpd.org>
-Date: Wed, 19 Sep 2018 23:53:45 +0200
-Subject: [PATCH] TLS1.3 compatibility
-
-Fixes #94
----
- src/tls.c | 17 +++++++++++++----
- 1 file changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/src/tls.c b/src/tls.c
-index c693d3b..f383ed9 100644
---- a/src/tls.c
-+++ b/src/tls.c
-@@ -228,7 +228,16 @@ static void ssl_info_cb(const SSL *cnx, int where, int ret)
- if ((where & SSL_CB_HANDSHAKE_START) != 0) {
- if ((cnx == tls_cnx && tls_cnx_handshook != 0) ||
- (cnx == tls_data_cnx && tls_data_cnx_handshook != 0)) {
-- die(400, LOG_ERR, "TLS renegociation");
-+ const SSL_CIPHER *cipher;
-+ const char *cipher_version;
-+ if ((cipher = SSL_get_current_cipher(cnx)) == NULL ||
-+ (cipher_version = SSL_CIPHER_get_version(cipher)) == NULL) {
-+ die(400, LOG_ERR, "No cipher");
-+ }
-+ if (strcmp(cipher_version, "TLSv1.3") != 0) {
-+ die(400, LOG_ERR, "TLS renegociation");
-+ return;
-+ }
- }
- return;
- }
-@@ -264,10 +273,10 @@ int tls_init_library(void)
- OpenSSL_add_all_algorithms();
- # else
- OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
-- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
-+ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
- OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
-- OPENSSL_INIT_ADD_ALL_DIGESTS |
-- OPENSSL_INIT_LOAD_CONFIG, NULL);
-+ OPENSSL_INIT_ADD_ALL_DIGESTS |
-+ OPENSSL_INIT_LOAD_CONFIG, NULL);
- # endif
- while (RAND_status() == 0) {
- rnd = zrand();
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.1.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.1.patch
deleted file mode 100644
index cd4532bb97ab..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.1.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From aa68b2d620ef0c83c7f52213c7e6093722b0b8bd Mon Sep 17 00:00:00 2001
-From: Frank Denis <github@pureftpd.org>
-Date: Wed, 24 Oct 2018 19:19:26 +0200
-Subject: [PATCH] Disable TLSv1_1
-
----
- src/tls.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/tls.c b/src/tls.c
-index f383ed9..c4e2a1b 100644
---- a/src/tls.c
-+++ b/src/tls.c
-@@ -297,7 +297,7 @@ int tls_init_library(void)
- SSL_CTX_set_options(tls_ctx, SSL_OP_NO_TLSv1);
- # endif
- # ifdef SSL_OP_NO_TLSv1_1
-- SSL_CTX_clear_options(tls_ctx, SSL_OP_NO_TLSv1_1);
-+ SSL_CTX_set_options(tls_ctx, SSL_OP_NO_TLSv1_1);
- # endif
- # ifdef SSL_OP_NO_TLSv1_2
- SSL_CTX_clear_options(tls_ctx, SSL_OP_NO_TLSv1_2);
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.3.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.3.patch
deleted file mode 100644
index cbe9c8bdcb8f..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-disable-TLSv1.3.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Temporarily disable TLSv1.3 support
-
-Disable TLSv1.3 until support for it is fixed in pure-ftpd. This is a
-workaround for the following issue:
-https://github.com/jedisct1/pure-ftpd/issues/102
-
---- a/src/tls.c
-+++ b/src/tls.c
-@@ -301,6 +301,10 @@ int tls_init_library(void)
- # endif
- # ifdef SSL_OP_NO_TLSv1_2
- SSL_CTX_clear_options(tls_ctx, SSL_OP_NO_TLSv1_2);
-+# endif
-+ /* Disable TLSv1.3 support until it works properly in pure-ftpd */
-+# ifdef SSL_OP_NO_TLSv1_3
-+ SSL_CTX_set_options(tls_ctx, SSL_OP_NO_TLSv1_3);
- # endif
- if (tlsciphersuite != NULL) {
- if (SSL_CTX_set_cipher_list(tls_ctx, tlsciphersuite) != 1) {
---
-2.20.1
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
new file mode 100644
index 000000000000..7e29934caf5d
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
@@ -0,0 +1,31 @@
+From 8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa Mon Sep 17 00:00:00 2001
+From: Frank Denis <github@pureftpd.org>
+Date: Tue, 18 Feb 2020 18:36:58 +0100
+Subject: [PATCH] diraliases: always set the tail of the list to NULL
+
+Spotted and reported by Antonio Norales from GitHub Security Labs.
+Thanks!
+---
+ src/diraliases.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/diraliases.c b/src/diraliases.c
+index 4002a36..fb70273 100644
+--- a/src/diraliases.c
++++ b/src/diraliases.c
+@@ -93,7 +93,6 @@ int init_aliases(void)
+ (tail->dir = strdup(dir)) == NULL) {
+ die_mem();
+ }
+- tail->next = NULL;
+ } else {
+ DirAlias *curr;
+
+@@ -105,6 +104,7 @@ int init_aliases(void)
+ tail->next = curr;
+ tail = curr;
+ }
++ tail->next = NULL;
+ }
+ fclose(fp);
+ aliases_up++;
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch
new file mode 100644
index 000000000000..4ed197e46d35
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch
@@ -0,0 +1,27 @@
+From 36c6d268cb190282a2c17106acfd31863121b58e Mon Sep 17 00:00:00 2001
+From: Frank Denis <github@pureftpd.org>
+Date: Mon, 24 Feb 2020 15:19:43 +0100
+Subject: [PATCH] pure_strcmp(): len(s2) can be > len(s1)
+
+Reported by Antonio Morales from GitHub Security Labs, thanks!
+---
+ src/utils.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/utils.c b/src/utils.c
+index f41492d..a7f0381 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -45,5 +45,11 @@ int pure_memcmp(const void * const b1_, const void * const b2_, size_t len)
+
+ int pure_strcmp(const char * const s1, const char * const s2)
+ {
+- return pure_memcmp(s1, s2, strlen(s1) + 1U);
++ const size_t s1_len = strlen(s1);
++ const size_t s2_len = strlen(s2);
++
++ if (s1_len != s2_len) {
++ return -1;
++ }
++ return pure_memcmp(s1, s2, s1_len);
+ }