<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
Received: with ECARTIS (v1.0.0; list gopher);
 Fri, 29 Aug 2003 15:22:35 -0500 (CDT)
Return-Path: &lt;jgoerzen@complete.org&gt;
X-Original-To: gopher@complete.org
Delivered-To: gopher@complete.org
Received: from localhost (localhost [127.0.0.1])
	by gesundheit.complete.org (Postfix) with ESMTP
	id 3469218320CA; Fri, 29 Aug 2003 15:22:35 -0500 (CDT)
Received: from heinrich.complete.org (gatekeeper.excelhustler.com
 [68.99.114.105])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN &quot;christoph.complete.org&quot;,
 Issuer &quot;John Goerzen -- Root CA&quot; (verified OK))
	by gesundheit.complete.org (Postfix) with ESMTP
	id BF65F183209C; Fri, 29 Aug 2003 15:22:34 -0500 (CDT)
Received: by heinrich.complete.org (Postfix, from userid 1000)
	id C12323B8; Fri, 29 Aug 2003 15:22:41 -0500 (CDT)
To: gopher@complete.org, 204487@bugs.debian.org
Subject: [gopher] [comp.infosystems.gopher] Re: UMN gopherd exploits
From: John Goerzen &lt;jgoerzen@complete.org&gt;
Date: Fri, 29 Aug 2003 15:22:41 -0500
Message-ID: &lt;87bru8kycu.fsf@complete.org&gt;
User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux)
MIME-Version: 1.0
Content-type: text/plain
X-Scanned-By: clamscan at complete.org
Content-Transfer-Encoding: 8bit
X-archive-position: 822
X-ecartis-version: Ecartis v1.0.0
Sender: gopher-bounce@complete.org
Errors-to: gopher-bounce@complete.org
X-original-sender: jgoerzen@complete.org
Precedence: bulk
Reply-to: gopher@complete.org
List-help: &lt;mailto:ecartis@complete.org?Subject=help&gt;
List-unsubscribe: &lt;mailto:gopher-request@complete.org?Subject=unsubscribe&gt;
List-software: Ecartis version 1.0.0
List-Id: Gopher &lt;gopher.complete.org&gt;
X-List-ID: Gopher &lt;gopher.complete.org&gt;
List-subscribe: &lt;mailto:gopher-request@complete.org?Subject=subscribe&gt;
List-owner: &lt;mailto:jgoerzen@complete.org&gt;
List-post: &lt;mailto:gopher@complete.org&gt;
List-archive: &lt;http://www.complete.org/mailinglists/archives/&gt;
X-list: gopher
</p>
<p>FYI, if you are running UMN gopherd and have not upgraded, you may
find this useful:
</p>
<p></p>
<p>-- Attached file included as plaintext by Ecartis --
</p>
<p>Path: heinrich.complete.org!newsx!uni-berlin.de!fu-berlin.de!feed.news.nacamar.de!news100.image.dk!news010.worldonline.dk.POSTED!not-for-mail
From: &quot;Jacob Dahl Pind&quot; &lt;rachael_@gmx.net&gt;
Subject: Re: UMN gopherd exploits
References: &lt;561.365T1050T2052494rachael_@gmx.net&gt; &lt;87oey9ok10.fsf@complete.org&gt;
Message-ID: &lt;2001.371T1100T953184rachael_@gmx.net&gt;
Newsgroups: comp.infosystems.gopher
Lines: 70
X-Newsreader: THOR 2.6a (Amiga;TCP/IP)
Date: 29 Aug 2003 1:35:22 +0100
NNTP-Posting-Host: 213.237.16.246
X-Complaints-To: news-abuse@wol.dk
X-Trace: news010.worldonline.dk 1062113871 213.237.16.246 (Fri, 29 Aug 2003
 01:37:51 MET DST)
NNTP-Posting-Date: Fri, 29 Aug 2003 01:37:51 MET DST
Organization: Customer of Tiscali A/S
Xref: heinrich.complete.org comp.infosystems.gopher:32
MIME-Version: 1.0
</p>
<p>on 28-Aug-03 16:54:03, John Goerzen wrote:
&gt;&quot;Jacob Dahl Pind&quot; &lt;rachael_@gmx.net&gt; writes:
</p>
<p>&gt;&gt; Hello
&gt;&gt;
&gt;&gt; As it seems support for UMN gopherd has been stopped, and the two
&gt;&gt; lates security holes wont be fixed, I have tried to patch them.
&gt;&gt;
&gt;&gt; The small patch can be found at gopher://rachael.dyndns.org/11/gopher/
</p>
<p>&gt;I could not resolve that hostname.  Can you post a new URL?
</p>
<p>have included it instead.
</p>
<p>if fixed the GSisText()/view buffer overflow , remote &quot;ftp gateway&quot; buffer overflow,
and do_command bufferoverflow.
It also changes some tempnam to mkstemp, but those are gnu glibc specefic.
</p>
<p>-- UMN_gopherd_patch.txt
</p>
<p>diff -adr misc/gopher-3.0.5/gopher-3.0.5/gopherd/ftp.c software/gopher-3.0.5/gopher-3.0.5/gopherd/ftp.c
1810,1811c1810,1811
&lt;
&lt;      strcpy(tmpName, buf);
---
&gt;      if (strlen(buf) &gt; 256) last=256;
&gt;      strncpy(tmpName, buf,last);
diff -adr misc/gopher-3.0.5/gopher-3.0.5/gopherd/gopherd.c software/gopher-3.0.5/gopher-3.0.5/gopherd/gopherd.c
1279,1280c1279,1280
&lt;           ASKfile = tempnam(NULL, &quot;gdata&quot;);
&lt;           Debug(&quot;HTTP POST data is in %s\n&quot;, ASKfile);
---
&gt;           ASKfile = mkstemp(&quot;gdata&quot;);
&gt; 	  Debug(&quot;HTTP POST data is in %s\n&quot;, ASKfile);
1482c1482
&lt;
---
&gt; 		    int  authlen;
1488c1488,1491
&lt; 		    strcpy(cleartext, authuser);
---
&gt; 		    authlen = strlen(authuser);
&gt; /* its 64 because cleartext has just been declared 64 above */
&gt; 		    if (authlen &gt; 64 ) authlen = 64;
&gt; 		    strncpy(cleartext, authuser,authlen);
1590c1593
&lt;           ASKfile = tempnam(NULL, &quot;gdata&quot;);
---
&gt; 	  ASKfile = mkstemp(&quot;gdata&quot;);
diff -adr misc/gopher-3.0.5/gopher-3.0.5/object/GSgopherobj.c software/gopher-3.0.5/gopher-3.0.5/object/GSgopherobj.c
2090c2090,2091
&lt; {
---
&gt; {	int pos;
&gt;
2107c2108,2112
&lt;
---
&gt; 	  if (strlen(view) &gt; 64) {
&gt; 	    pos = 64;
&gt; 	  } else {
&gt; 	    pos = strlen(view);
&gt; 	  }
</p>
<p>regards Jacob Dahl Pind
</p>
<p>--
		CBM, Amiga,Vintage hardware collector
		  Email: rachael@rachael.dyndns.org
		   url: http://rachael.dyndns.org
</p>
<p></p>
<p></p>
<p></p>
</card>
</wml>
