🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67651

[SECURITY] INN: Buffer overflow in control message handling

#67651
From: Russ Allbery
Date: Thu, 08 Jan 2004 02:16
67 lines
3875 bytes
A buffer overflow has been discovered in a portion of the control message
handling code introduced in INN 2.4.0.  It is fairly likely that this
overflow could be remotely exploited to gain access to the user innd runs
as.  INN 2.3.x and earlier are not affected.  The INN CURRENT tree is
affected.

So far as we know, there are no current exploits in the wild for this
vulnerability.

INN 2.4.1 has just been released with a fix for this issue and various
other accumulated patches.  We strongly urge anyone running INN 2.4.0 or
any STABLE snapshot to upgrade to this version, or apply the attached
patch to their source tree and reinstall with make update.  There should
be no incompatibilities between INN 2.4.1 and INN 2.4.0 or STABLE
snapshots.

INN 2.4.1 is available at:

    <ftp://ftp.isc.org/isc/inn/inn-2.4.1.tar.gz>

The MD5 checksum of this release is:

    bec635b6e70188071fdb539cd374f2ba

A PGP signature will be available in the same directory shortly.

We apologize for this problem, which was caused by misuse of static
buffers and a dangerous internal INN function that we intend to remove
completely in the next stable release.  The current development branch has
already been converted almost entirely to strlcpy, strlcat, and other safe
string handling routines and that conversion should be complete in the INN
2.5.0 release.

Following is a patch against INN 2.4.0.  It should also apply to a current
STABLE or CURRENT snapshot if you use patch -l to apply it.

--- inn-2.4.0/innd/art.c.orig	2003-05-04 15:10:14.000000000 -0700
+++ inn-2.4.0/innd/art.c	2004-01-07 15:25:08.000000000 -0800
@@ -1773,7 +1773,7 @@
 bool
 ARTpost(CHANNEL *cp)
 {
-  char		*p, **groups, ControlWord[SMBUF], tmpbuff[32], **hops;
+  char		*p, **groups, ControlWord[SMBUF], **hops, *controlgroup;
   int		i, j, *isp, hopcount, oerrno, canpost;
   NEWSGROUP	*ngp, **ngptr;
   SITE		*sp;
@@ -2185,9 +2185,10 @@
    * or control. */
   if (IsControl && Accepted && !ToGroup) {
     ControlStore = true;
-    FileGlue(tmpbuff, "control", '.', ControlWord);
-    if ((ngp = NGfind(tmpbuff)) == NULL)
+    controlgroup = concat("control.", ControlWord, (char *) 0);
+    if ((ngp = NGfind(controlgroup)) == NULL)
       ngp = NGfind(ARTctl);
+    free(controlgroup);
     ngp->PostCount = 0;
     ngptr = GroupPointers;
     *ngptr++ = ngp;

Thanks to Dan Riley for his prompt and detailed report and debugging
assistance.

                                        Russ Allbery
                                        Katsuhiro Kondou
                                        inn@isc.org
Technical Details
Message-ID: <87u137422h.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <87u137422h.fsf@windlord.stanford.edu>
Subject: [SECURITY] INN: Buffer overflow in control message handling
Date: Wed, 07 Jan 2004 18:16:38 -0800
From: Russ Allbery <rra@isc.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: Internet Software Consortium
Lines: 67
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1073528198 15273 171.64.19.147 (8 Jan 2004 02:16:38
 GMT)
X-Complaints-To: news@news.stanford.edu
To: inn-announce@isc.org, bugtraq@securityfocus.com
User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:NNebUhiaShG8LnhAw6ES+RluuvQ=