Article View: news.software.nntp
Article #90041Re: No colon-space in header field check in INN
From: Jesse Rehmer
Date: Wed, 01 Feb 2023 21:47
Date: Wed, 01 Feb 2023 21:47
61 lines
4103 bytes
4103 bytes
On Feb 1, 2023 at 12:03:50 PM CST, "Nigel Reed" <sysop@endofthelinebbs.com>
wrote:
> 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.
They are legimately posted articles in my eyes, but maybe not others.
Switching to Diablo may be best to acommodate my unique needs. INN with
cleanfeed or pyclean does not scale well with my traffic, so this is another
push to the dark side.
Technical Details
Message-ID:
<treml8$1nrq$1@nnrp.usenet.blueworldhosting.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-mailReferences:
<trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <87bkmdnzo2.fsf@hope.eyrie.org> <20230201120350.09e5e61a@wibble.sysadmininc.com>Show Full Headers
Complete Article Headers
Message-ID: <treml8$1nrq$1@nnrp.usenet.blueworldhosting.com> Subject: Re: No colon-space in header field check in INN Date: Wed, 01 Feb 2023 21:47:20 +0000 From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com> References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <87bkmdnzo2.fsf@hope.eyrie.org> <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 Newsgroups: news.software.nntp Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 1 Feb 2023 21:47:20 -0000 (UTC) Injection-Info: nnrp.usenet.blueworldhosting.com; logging-data="57210"; mail-complaints-to="usenet@blueworldhosting.com" User-Agent: Usenapp for MacOS Cancel-Lock: sha1:EW5Wsj/AfFm2Xt74ZS84ZUl1Mv0= sha256:gsviC99h43UG0se2FETFuystMQAbiMctWoiHPtApLME= sha1:NE4ERMGj0KK1LFKIo3Nm60iHP54= sha256:eVanY9DAX+teJJL0N4cjtKST5ntZlKNHdN11kLCA8Xk= X-Usenapp: v1.26/d - Full License