🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44846

Re: 146 MB articles?

#44846
From: Curt Welch
Date: Mon, 06 Mar 2000 00:00
65 lines
3722 bytes
jgreco@ns.sol.net (Joe Greco) wrote:
> In news.software.nntp article <20000306145245.750$Ev@newsreader.com>,
> curt@kcwc.com (Curt Welch) wrote:

> :Yeah.  Since I posted my message, I've been capturing the data coming
> :over the pipe and it's just tons of articles run together.  It's just
> :Diablo spool file format with a single NULL between articles.  So,
> :for some reason, UUNET's diablo server got confused and decided to
> :send entire spool files as if they were a single article.
> :
> :Anybody ever see a diablo server do that?  Any clue as to why?  Maybe
> :a > 2GB spool file size issue???
>
> Unlikely but possible.
>
> More likely:  somebody wrote an automated rebatcher script or something
> that does something lame.  Diablo is 8-bit-clean, and will merrily not
> care about nulls in articles.  I believe it will happily send the article
> as long as the framing of the article appears to be correct (SOF or NUL
> prior to the article, NUL after).  It may not even bother with that level
> of sanity checking...  dunno.
>
> Having run Diablo since early '97 (?), I can say that I've not seen any
> behaviour like what you describe.  Hence, I'd write it up to something
> odd going on at UUNet.

I've sent the letter off to them.  It's taken days to get an answer to
a simple problem in the past so I'm not expecting quick results...

I checked out the code in the version of Diablo I have (a very old
version).

It reads the offset and size out of the queue files, and then mmap()s that
chunk of the article batch file (plus 1 byte) into the program.  It makes
sure the last byte is a null (which is why the +1 byte), and aborts with a
corrupted queue file message if it doesn't find it.

But in typical Matt fashion, the offset and size are read as such:

  if (isdigit(*s))
      sscanf(s, "%d,%d", offp, sizep);

With zero checks of the sscanf return value or of the resulting *offp
or *sizep values.  And *sizep is a stack variable which isn't even
initialized before this call.

So if the first line of a batch file is missing a size parameter, then the
size variable will end up with a random value.

And I just did a quick test of mmap().  If you map a size larger than
the file, it fills the extra space with nulls.  So that would make
the simple "last byte must be null" test pass with flying colors.

So if the size in the queue file is missing, or bogus (i.e. 146000000),
then Diablo will be happy to send the entire article batch file plus a ton
of nulls.

Like you say however, I've never had Diablo do anything like that to
me, so it seems likely this is caused by something UUNET has done.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000306180752.574$Tg@newsreader.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-mail
References: <20000306142427.543$YI@newsreader.com> <952371610.593095@news.netscum.dk> <20000306145245.750$Ev@newsreader.com> <38c42685$0$40276@news.execpc.com>

Show Full Headers
Complete Article Headers
Message-ID: <20000306180752.574$Tg@newsreader.com>
Subject: Re: 146 MB articles?
Date: Mon, 06 Mar 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <20000306142427.543$YI@newsreader.com> <952371610.593095@news.netscum.dk> <20000306145245.750$Ev@newsreader.com> <38c42685$0$40276@news.execpc.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-mail
X-Deja-AN: 594013204
X-User: Curt@NewsReader.Com
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Newsgroups: news.software.nntp