🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79478

Re: Behaviour when STARTTLS fails

#79478
From: Julien ÉLIE
Date: Thu, 25 Sep 2008 16:29
79 lines
5365 bytes
Some news from the TLS working group :)

http://www.ietf.org/mail-archive/web/tls/current/index.html


Eric Rescorla:

TLS doesn't have any opinion about what you do with the underlying
transport. So, as far as TLS is concerned, the underlying transport
(TCP) could stay open and you could try to negotiate NNTP on it.
It might even work. It's recommended not for the reasons noted
above. I wouldn't have a problem with 4462 saying MUST, but
I don't think it's required by the logic of TLS.


Martin Rex:

I have no experience with STARTTLS-style extensions for protocols
such as NNTP or HTTP, but I think I know where the "should close down"
suggestion" because of the "indeterminate state" of the connection
comes from.  I also don't see a need for a MUST close down here.

The possibility to get back in sync on a connection after a SSL/TLS
handshake error (or a fatal SSL alert after a successful handshake)
is probably not a feature that most SSL/TLS stacks
offer in their APIs because it is not really deterministic.

A SSL/TLS stack could try to  recv(,,,MSG_PEEK) from the network socket
and apply heuristics whether anything that arrived during the
timeout might be a leftover SSL record from the failed SSL/TLS handshake
(or data) which would need to be cleared from the connection.
But it is completely unclear how much SSL/TLS handshake (or data) messages
may still be in the network pipe when one side detects a fatal handshake
(or data) error and aborts.

Even in the successful TLS session closure case, when the connection is
gracefully completed with the CloseNotify closure alerts it is common
behaviour that the closure alert of one side dies unread in the network
pipe.  TLS v1.1 (and newer) explicitly mentions this characteristic for the
successful closure and describes what would have to be done/changed to
reuse a network connection of a _successfully_ closed SSL/TLS communication:

   Unless some other fatal alert has been transmitted, each party is
   required to send a close_notify alert before closing the write side
   of the connection.  The other party MUST respond with a close_notify
   alert of its own and close down the connection immediately,
   discarding any pending writes.  It is not required for the initiator
   of the close to wait for the responding close_notify alert before
   closing the read side of the connection.

   If the application protocol using TLS provides that any data may be
   carried over the underlying transport after the TLS connection is
   closed, the TLS implementation must receive the responding
   close_notify alert before indicating to the application layer that
   the TLS connection has ended.  If the application protocol will not
   transfer any additional data, but will only close the underlying
   transport connection, then the implementation MAY choose to close the
   transport without waiting for the responding close_notify.  No part
   of this standard should be taken to dictate the manner in which a
   usage profile for TLS manages its data transport, including when
   connections are opened or closed.

I can not think of a good and robust way to clear a network
connection from SSL/TLS errors, and even if someone came up with
a workable scheme, it would take much to long to be adopted by the
installed base and probably not usable/useful for several years.
Btw. not all (network) pipes offer "PEEK" and how long do you wait?




Interesting answers!

-- 
Julien ÉLIE

« À l'école, en algèbre, j'étais du genre Einstein.
  Mais plutôt Franck qu'Albert. » (Philippe Geluck)
Technical Details
Message-ID: <gbgea2$4kk$1@news.trigofacile.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.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!87.106.161.54.MISMATCH!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mail
References: <gb34f2$8rm$1@news.trigofacile.com> <87ej3ebjh3.fsf@windlord.stanford.edu> <gb3r4b$k3u$1@news.trigofacile.com> <gb46s5$jh3$1@snarked.org> <gb4t03$saq$1@news.trigofacile.com> <87od2h1hcr.fsf@windlord.stanford.edu> <gbdu0r$4ub$1@news.trigofacile.com> <87d4itmkra.fsf@windlord.stanford.edu> <gbe3ts$c01$1@news.trigofacile.com> <87hc85f1vx.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <gbgea2$4kk$1@news.trigofacile.com>
Subject: Re: Behaviour when STARTTLS fails
Date: Thu, 25 Sep 2008 18:29:44 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gb34f2$8rm$1@news.trigofacile.com> <87ej3ebjh3.fsf@windlord.stanford.edu> <gb3r4b$k3u$1@news.trigofacile.com> <gb46s5$jh3$1@snarked.org> <gb4t03$saq$1@news.trigofacile.com> <87od2h1hcr.fsf@windlord.stanford.edu> <gbdu0r$4ub$1@news.trigofacile.com> <87d4itmkra.fsf@windlord.stanford.edu> <gbe3ts$c01$1@news.trigofacile.com> <87hc85f1vx.fsf@windlord.stanford.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.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!87.106.161.54.MISMATCH!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 79
NNTP-Posting-Host: aaubervilliers-151-1-58-236.w83-112.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1222360194 4756 83.112.31.236 (25 Sep 2008
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Thu, 25 Sep 2008 16:29:54 +0000 (UTC)
In-Reply-To: <87hc85f1vx.fsf@windlord.stanford.edu>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049