Article View: news.software.nntp
Article #14520Re: INND 1.5.1 dies occasionally
From: Robert Sexton
Date: Tue, 28 Jan 1997 00:00
Date: Tue, 28 Jan 1997 00:00
92 lines
4499 bytes
4499 bytes
Ron Jarrell (jarrell@solaris.cc.vt.edu) wrote:
: : You might want to apply the null pointer patch.
: Umm, I must have missed that one... Do you have a reference?
I can't remember where I got it.. (It was the unoffical inn site).
I truly hope that I don't get flamed here, bit its pretty small, and I
had a heck of a time finding it.
Date: Tue, 17 Dec 1996 22:59:56 -0500
Message-Id: <199612180359.WAA12075@daedalus.crosslink.net>
From: shields@crosslink.net (Michael Shields)
To: inn-workers@vix.com
Subject: Null pointer dereference in 1.5 (and 1.5.1)
Sender: owner-inn-workers@vix.com
Precedence: bulk
Today the news servers on both my read machines started to die
repeatedly and simultaneously, logging nothing. This happened once
two or three weeks ago when I wasn't around; at the time it cleared up
mysteriously after a while.
Today I finally tracked this down. It was caused by an article with a
1060-character Path: header. Because INN always writes out Path:
before Message-ID:, the receiving machines receive that header first
(and simultaneously since they're fed by nntplink), and ARTclean()
sees the too-long header it stops parsing before it learns the
Message-ID:. Then, iff you have DO_REMEMBER_TRASH set, HISwrite gets
called to log the article, with a null pointer for the message-ID.
Boom. Of course the reason that it died repeatedly is that the master
feed machine kept trying to resend it, and the reason that it clears
up eventually is that the backlog gets trimmed or the article expires
(it's a short-expire feed-only server).
I'm cc'ing this to inn-workers because it would actually be optimal if
trash were not remembered when an article is rejected for its path --
since that header is modified in transit, the article might arrive
again by another route that caused it to be acceptable. This could
apply to the exclusions list also.
This could also be used as a denial-of-service attack.
Here's the patch. This is against 1.5 but 1.5.1 looks like it has the
same bug.
Index: art.c
===================================================================
RCS file: /usr/src/master/inn/innd/art.c,v
retrieving revision 1.9
diff -u -r1.9 art.c
--- art.c 1996/12/12 00:39:01 1.9
+++ art.c 1996/12/18 03:41:30
@@ -1784,7 +1784,7 @@
(void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, error);
ARTlog(&Data, ART_REJECT, buff);
#if defined(DO_REMEMBER_TRASH)
- if (Mode == OMrunning && !HISwrite(&Data, ""))
+ if (Data.MessageID && Mode == OMrunning && !HISwrite(&Data, ""))
syslog(L_ERROR, "%s cant write history %s %m",
LogName, Data.MessageID);
#endif /* defined(DO_REMEMBER_TRASH) */
@@ -1798,7 +1798,7 @@
syslog(L_NOTICE, "rejecting[perl] %s %s", HDR(_message_id), buff);
ARTlog(&Data, ART_REJECT, buff);
#if defined(DO_REMEMBER_TRASH)
- if (Mode == OMrunning && !HISwrite(&Data, ""))
+ if (Data.MessageID && Mode == OMrunning && !HISwrite(&Data, ""))
syslog(L_ERROR, "%s cant write history %s %m",
LogName, Data.MessageID);
#endif /* defined(DO_REMEMBER_TRASH) */
@@ -1842,7 +1842,7 @@
buff);
ARTlog(&Data, ART_REJECT, buff);
#if defined(DO_REMEMBER_TRASH)
- if (Mode == OMrunning && !HISwrite(&Data, ""))
+ if (Data.MessageID && Mode == OMrunning && !HISwrite(&Data, ""))
syslog(L_ERROR, "%s cant write history %s %m",
LogName, Data.MessageID);
#endif /* defined(DO_REMEMBER_TRASH) */
--
Shields, CrossLink.
--
Robert Sexton, robert@kudra.com
If quality were genuinely the issue, members of the New York Philharmonic
would be millionaires and Billy Ray Cyrus wouldn't. - Ben Rothke
Technical Details
Message-ID:
<5clo5k$e3r$1@tabby.kudra.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<x66814599r.fsf@ez.bts.com> <5c5scp$1gb@madrid.visi.net> <5ceom6$gsp$1@tabby.kudra.com> <5cgog4$aff$1@solaris.cc.vt.edu>Show Full Headers
Complete Article Headers
Message-ID: <5clo5k$e3r$1@tabby.kudra.com> Subject: Re: INND 1.5.1 dies occasionally Date: Tue, 28 Jan 1997 00:00:00 +0000 From: robert@tabby.kudra.com (Robert Sexton) References: <x66814599r.fsf@ez.bts.com> <5c5scp$1gb@madrid.visi.net> <5ceom6$gsp$1@tabby.kudra.com> <5cgog4$aff$1@solaris.cc.vt.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.mbox.zip!not-for-mail X-Deja-AN: 212915709 Distribution: inet Organization: Kudra.Com Web Services Newsgroups: news.software.nntp