🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90039

Re: No colon-space in header field check in INN

#90039
From: Nigel Reed
Date: Wed, 01 Feb 2023 18:03
61 lines
3469 bytes
On Wed, 01 Feb 2023 08:00:45 -0800
Russ Allbery <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
> 
> > It is probably against a RFC to accept these messages, but I'm not
> > concerned about the User-Agent header. I went looking for a way to
> > relax the check, but is strict for all headers in innd/art.c:  
> 
> >     /* Find first colon */
> >     if ((colon = memchr(header, ':', size)) == NULL ||
> > !ISWHITE(colon[1])) { if ((p = memchr(header, '\r', size)) != NULL)
> >             *p = '\0';
> >         snprintf(cp->Error, sizeof(cp->Error),
> >                  "%d No colon-space in \"%s\" header field",
> >                  ihave ? NNTP_FAIL_IHAVE_REJECT :
> > NNTP_FAIL_TAKETHIS_REJECT, MaxLength(header, header));
> >         if (p != NULL)
> >             *p = '\r';
> >         return;
> >     }  
> 
> > I know there are potential implications for accepting messages with
> > empty headers, but do we need to treat all headers so strictly?  
> 
> We do need to be pretty strict, since otherwise you can get into
> really nasty situations with ambiguous parses where two servers may
> disagree about something fundamental like the message ID of the
> article.
> 
> I think if someone wanted to send a patch that added the ability to
> accept articles with headers that (a) weren't part of the protocol
> (so not Message-ID, Path, etc.), (b) specifically ended in a colon
> and a newline and no other variation, and (c) did not have a
> continuation, and it was configurable with the syntaxchecks setting
> and was off by default, that would be worth considering.  I wouldn't
> want to relax the checks any farther than that.  (It may be a bit
> difficult to wedge that into innd's code, though, since the above
> error happens at a fairly low level of the parse.)

I wouldn't be happy about relaxing the checks or having a server feed
in that does. They're there for a reason. Most legitimate users are
going to follow the RFC. Spammers and script kiddies are less likely to
adhere to the requirements, which is where we get them.

The proper course of action is to identify if the messages are
legitimate and then refer the poster to their software's author to
correct the issue.

Once you start making exceptions for one, then you're going to be
making exceptions for others and, as you say, this could lead to a
nasty mess. Let's please not fix innd which isn't broken to fix a
client that is.




-- 
End Of The Line BBS - Plano, TX
telnet endofthelinebbs.com 23
Technical Details
Message-ID: <20230201120350.09e5e61a@wibble.sysadmininc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <87bkmdnzo2.fsf@hope.eyrie.org>

Show Full Headers
Complete Article Headers
Message-ID: <20230201120350.09e5e61a@wibble.sysadmininc.com>
Subject: Re: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 12:03:50 -0600
From: Nigel Reed <sysop@endofthelinebbs.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <87bkmdnzo2.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: End Of The Line BBS
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: www.sysadmininc.com; posting-host="47.186.32.124"; logging-data="3160250"; mail-complaints-to="usenet@www.sysadmininc.com"
X-Newsreader: Claws Mail 4.1.1git14 (GTK 3.24.20; x86_64-pc-linux-gnu)