🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83924

STARTTLS / SASL and plaintext command injection

#83924
From: Julien ÉLIE
Date: Tue, 15 Mar 2011 22:55
44 lines
2517 bytes
Hi all,

An interesting report (CVE-2011-0411):
     http://www.postfix.org/CVE-2011-0411.html

I have not tested with INN but at first thought, I do not see why it 
would not be impacted (nnrpd/line.c goes on reading the input of commands).
I write in this public newsgroup because CVE-2011-0411 is public.

An example would be to send:

STARTTLS\r\nARTICLE <private@article.id>\r\n

INN (and maybe other servers) will negotiate the TLS layer and then run 
the subsequent command as though it had been sent encrypted (whereas in 
fact it was sent before the security layer was negotiated).


Probably the same problem affects AUTHINFO SASL with a negotiation of a 
TLS layer.
But why doesn't this article address it?  (Don't similar SASL 
authentication commands exist in SMTP?)


Wouldn't it be interesting to answer 501 (syntax error) or another 
response code when a command which should not be pipelined has in fact 
been detected as pipelined?


Otherwise, another straightforward solution would be to drop what is in 
the read buffer when the TLS layer has been negotiated successfully.
I think that just setting
line->where = line->where + line->remaining;
in nnrpd/nnrpd.c does the trick.

Any thoughts about that?

That would also be something worthwhile mentioning in RFC 4642 and RFC 4643.

-- 
Julien ÉLIE

« C'est comme chercher une aiguille dans du foin en bottes ! »
   (Jolitorax)
Technical Details
Message-ID: <8ua932Fhr1U1@mid.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <8ua932Fhr1U1@mid.individual.net>
Subject: STARTTLS / SASL and plaintext command injection
Date: Tue, 15 Mar 2011 23:55:29 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 44
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 6qcZTVL2nqfjFh73ATT8NQCSGArmOW8Yj+qDznPPZJfP0MtKI=
Cancel-Lock: sha1:RzTxH+RYXC6tM5JTpIPi7ah9NNw=
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr;
X-Original-Bytes: 2307