public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/files/
@ 2021-04-25 12:59 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2021-04-25 12:59 UTC (permalink / raw
  To: gentoo-commits

commit:     766263e96ecd33a6f21c2befea19712305fb34fd
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Apr 24 15:47:15 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 12:59:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=766263e9

net-ftp/atftp: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/20525
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../atftp/files/atftp-0.7.2-cve-2020-6097.patch    | 92 ----------------------
 net-ftp/atftp/files/atftp-0.7.2-fewer_seeks.patch  | 38 ---------
 2 files changed, 130 deletions(-)

diff --git a/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch b/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch
deleted file mode 100644
index 5130d008643..00000000000
--- a/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-commit 96409ef3b9ca061f9527cfaafa778105cf15d994
-Author: Peter Kaestle <peter.kaestle@nokia.com>
-Date:   Wed Oct 14 14:02:41 2020 +0200
-
-    Fix for DoS issue CVE-2020-6097
-    
-    "sockaddr_print_addr" of tftpd can be triggered remotely to call
-    assert(), which will crash the tftpd daemon.  See:
-    https://talosintelligence.com/vulnerability_reports/TALOS-2020-1029
-    
-    "sockaddr_print_addr" originaly had two features:
-    1) returning pointer to string of the incoming ip address
-    2) checking whether ss_family of the connection is supported
-    
-    To fix the issue, a separate function "sockaddr_family_supported" is
-    used to take care of 2) and "sockaddr_print_addr" returns an error
-    message string for unsupported cases when using 1) insert of calling
-    assert().
-
-diff --git a/tftp_def.c b/tftp_def.c
-index d457c2a..428a930 100644
---- a/tftp_def.c
-+++ b/tftp_def.c
-@@ -180,6 +180,15 @@ int Gethostbyname(char *addr, struct hostent *host)
-      return OK;
- }
- 
-+int
-+sockaddr_family_supported(const struct sockaddr_storage *ss)
-+{
-+     if (ss->ss_family == AF_INET || ss->ss_family == AF_INET6)
-+          return 1;
-+     else
-+          return 0;
-+}
-+
- char *
- sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
- {
-@@ -189,7 +198,7 @@ sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
-      else if (ss->ss_family == AF_INET6)
-           addr = &((const struct sockaddr_in6 *)ss)->sin6_addr;
-      else
--          assert(!"sockaddr_print: unsupported address family");
-+          return "sockaddr_print: unsupported address family";
-      return (char *)inet_ntop(ss->ss_family, addr, buf, len);
- }
- 
-diff --git a/tftp_def.h b/tftp_def.h
-index 0841746..458e310 100644
---- a/tftp_def.h
-+++ b/tftp_def.h
-@@ -54,6 +54,7 @@ int print_eng(double value, char *string, int size, char *format);
- inline char *Strncpy(char *to, const char *from, size_t size);
- int Gethostbyname(char *addr, struct hostent *host);
- 
-+int sockaddr_family_supported(const struct sockaddr_storage *ss);
- char *sockaddr_print_addr(const struct sockaddr_storage *, char *, size_t);
- #define SOCKADDR_PRINT_ADDR_LEN INET6_ADDRSTRLEN
- uint16_t sockaddr_get_port(const struct sockaddr_storage *);
-diff --git a/tftpd.c b/tftpd.c
-index 0b6f6a5..a7561a5 100644
---- a/tftpd.c
-+++ b/tftpd.c
-@@ -644,6 +644,11 @@ void *tftpd_receive_request(void *arg)
-      }
- 
- #ifdef HAVE_WRAP
-+     if (!abort && !sockaddr_family_supported(&data->client_info->client))
-+     {
-+          logger(LOG_ERR, "Connection from unsupported network address family refused");
-+          abort = 1;
-+     }
-      if (!abort)
-      {
-           /* Verify the client has access. We don't look for the name but
-diff --git a/tftpd_mtftp.c b/tftpd_mtftp.c
-index d420d10..0032905 100644
---- a/tftpd_mtftp.c
-+++ b/tftpd_mtftp.c
-@@ -393,6 +393,11 @@ void *tftpd_mtftp_server(void *arg)
-                                         &data_size, data->data_buffer);
- 
- #ifdef HAVE_WRAP
-+               if (!sockaddr_family_supported(&sa))
-+               {
-+                    logger(LOG_ERR, "mtftp: Connection from unsupported network address family refused");
-+                    continue;
-+               }
-                /* Verify the client has access. We don't look for the name but
-                   rely only on the IP address for that. */
-                sockaddr_print_addr(&sa, addr_str, sizeof(addr_str));

diff --git a/net-ftp/atftp/files/atftp-0.7.2-fewer_seeks.patch b/net-ftp/atftp/files/atftp-0.7.2-fewer_seeks.patch
deleted file mode 100644
index 78926b94b9f..00000000000
--- a/net-ftp/atftp/files/atftp-0.7.2-fewer_seeks.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-<F28>diff -U8 atftp-0.7.2/tftp_io.c /var/tmp/portage/net-ftp/atftp-0.7.2-r1/work/atftp-0.7.2/tftp_io.c
---- atftp-0.7.2/tftp_io.c	2019-04-14 17:38:55.000000000 -0500
-+++ /var/tmp/portage/net-ftp/atftp-0.7.2-r1/work/atftp-0.7.2/tftp_io.c	2020-03-16 12:55:22.371820662 -0500
-@@ -439,26 +439,32 @@
- }
- 
- /*
-  * Write to file and do netascii conversion if needed
-  */
- int tftp_file_write(FILE *fp, char *data_buffer, int data_buffer_size, long block_number, int data_size,
-                     int convert, long *prev_block_number, int *temp)
- {
-+     static long filepos;
-      int bytes_written;
-      int c;
-      char prevchar = *temp;
- 
-      if (!convert)
-      {
- 	  /* Simple case, just seek and write */
--          if (fseek(fp, (block_number - 1) * data_buffer_size, SEEK_SET) != 0)
--	      return 0;
-+          long position = (block_number - 1)*data_buffer_size;
-+          if (position != filepos)
-+               if (fseek(fp, position, SEEK_SET) != 0)
-+                    return 0;
-+               else
-+                    filepos = position;
- 	  bytes_written = fwrite(data_buffer, 1, data_size, fp);
-+          filepos += bytes_written;
-      }
-      else if (block_number != *prev_block_number)
-      {
- 	  /* 
- 	   * Same principle than for reading, but simpler since when client
-            * send same block twice there is no need to rewrite it to the
-            * file
- 	   */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/files/
@ 2021-10-06 16:19 Jakov Smolić
  0 siblings, 0 replies; 2+ messages in thread
From: Jakov Smolić @ 2021-10-06 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     87fcfdbc71ffdbb21804563c6490a4e3f4d7b5f2
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Wed Oct  6 16:05:30 2021 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Wed Oct  6 16:18:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87fcfdbc

net-ftp/atftp: remove unused patch

Package-Manager: Portage-3.0.26, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/22501
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch | 32 ----------------------------
 1 file changed, 32 deletions(-)

diff --git a/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch b/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch
deleted file mode 100644
index 749f8e8e6d3..00000000000
--- a/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,29 +69,6 @@
- dnl Check for AIX
- AC_AIX
- 
--CFLAGS="$CFLAGS -g -Wall -D_REENTRANT"
--
--if test x$debug = xtrue; then
--   CFLAGS="$CFLAGS -O0 -DDEBUG"
--else
--  if test -n "$auto_cflags"; then
--    if test -n "$GCC"; then
--      CFLAGS="$CFLAGS -g -O2 -Wall -Wno-implicit"
--    else
--      case "$host_os" in
--        *hpux*)  CFLAGS="$CFLAGS +O3"
--	  ;;
--        *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000"
--	  ;;
--        *)       CFLAGS="$CFLAGS -O2"
--	  ;;
--      esac
--    fi
--  else
--    CFLAGS="$CFLAGS -O2"
--  fi
--fi
--
- AC_PROG_MAKE_SET
- AC_PROG_INSTALL
- 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-06 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-25 12:59 [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/files/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2021-10-06 16:19 Jakov Smolić

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox