[packages/pure-ftpd] - rel 4; SECURITY fixes

arekm arekm at pld-linux.org
Wed Mar 25 20:15:04 CET 2020


commit d93fa11aa249795484e9d23266396fe6aa3e6e30
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Mar 25 20:14:34 2020 +0100

    - rel 4; SECURITY fixes

 ...d-1.0.49-diraliases_uninitialized_pointer.patch | 31 ++++++++++++++++++++++
 pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch        | 27 +++++++++++++++++++
 pure-ftpd.spec                                     |  6 ++++-
 3 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/pure-ftpd.spec b/pure-ftpd.spec
index 17f94a5..d59ae94 100644
--- a/pure-ftpd.spec
+++ b/pure-ftpd.spec
@@ -9,7 +9,7 @@
 %bcond_without	tls		# disable SSL/TLS support
 %bcond_without	cap		# disable capabilities
 
-%define	rel	3
+%define	rel	4
 Summary:	Small, fast and secure FTP server
 Summary(pl.UTF-8):	Mały, szybki i bezpieczny serwer FTP
 Name:		pure-ftpd
@@ -36,6 +36,8 @@ Patch5:		paths.patch
 Patch6:		%{name}-apparmor.patch
 Patch7:		%{name}-mysql-utf8.patch
 Patch8:		caps.patch
+Patch9:		pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
+Patch10:	pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch
 URL:		http://www.pureftpd.org/
 %{?with_extra:BuildRequires:	autoconf}
 %{?with_extra:BuildRequires:	automake}
@@ -118,6 +120,8 @@ Ten pakiet zawiera schemat Pure-FTPd pureftpd.schema dla openldapa.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
 
 %{?with_extra:%patch2 -p1}
 
diff --git a/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch b/pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
new file mode 100644
index 0000000..7e29934
--- /dev/null
+++ b/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 at 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/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch b/pure-ftpd-1.0.49-pure_strcmp_OOB_read.patch
new file mode 100644
index 0000000..4ed197e
--- /dev/null
+++ b/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 at 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);
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pure-ftpd.git/commitdiff/d93fa11aa249795484e9d23266396fe6aa3e6e30



More information about the pld-cvs-commit mailing list