Thread View: news.software.nntp
8 messages
8 total messages
Started by Julien ÉLIE
Mon, 02 Nov 2015 14:02
Preferred use of port 563 instead of STARTTLS
Author: Julien ÉLIE
Date: Mon, 02 Nov 2015 14:02
Date: Mon, 02 Nov 2015 14:02
74 lines
4146 bytes
4146 bytes
Hi all,
I've just read in RFC 7525 (which is a BCP for TLS):
https://tools.ietf.org/html/rfc7525
3.2. Strict TLS
The following recommendations are provided to help prevent SSL
Stripping (an attack that is summarized in Section 2.1 of [RFC7457]):
o In cases where an application protocol allows implementations or
deployments a choice between strict TLS configuration and dynamic
upgrade from unencrypted to TLS-protected traffic (such as
STARTTLS), clients and servers SHOULD prefer strict TLS
configuration.
o Application protocols typically provide a way for the server to
offer TLS during an initial protocol exchange, and sometimes also
provide a way for the server to advertise support for TLS (e.g.,
through a flag indicating that TLS is required); unfortunately,
these indications are sent before the communication channel is
encrypted. A client SHOULD attempt to negotiate TLS even if these
indications are not communicated by the server.
Rationale: Combining unprotected and TLS-protected communication
opens the way to SSL Stripping and similar attacks, since an initial
part of the communication is not integrity protected and therefore
can be manipulated by an attacker whose goal is to keep the
communication in the clear.
Also in a draft (for e-mails) currently discussed in the UTA WG:
https://tools.ietf.org/html/draft-ietf-uta-email-deep-01
4. Implicit TLS
Previous standards for use of email protocols with TLS used the
STARTTLS mechanism: [RFC2595], [RFC3207], and [RFC3501]. With
STARTTLS, the client establishes a clear text application session and
determines whether to issue a STARTTLS command based on server
capabilities and client configuration. If the client issues a
STARTTLS command, a TLS handshake follows that can upgrade the
connection. While this mechanism has been deployed, an alternate
mechanism where TLS is negotiated immediately at connection start on
a separate port (referred to in this document as "Implicit TLS") has
been deployed more successfully. To increase use of TLS, this
specification recommends use of implicit TLS by new POP, IMAP and
SMTP Submission software.
I think it may be of interest to people involved in newsreaders
development here.
I've recently changed INN documentation to mention that the use of
STARTTLS is the recommended way, but apparently things have greatly
changed since RFC 4642 about TLS for NNTP.
I will probably revert that change for INN 2.6.1.
FYI, I've sent a mail to the UTA WG this morning to ask what to do about
RFC 4642 (unsecure ciphers, use of TLS compression, and now implicit
TLS). I'll let you know the outcome.
--
Julien ÉLIE
« – Vous croyez qu'on s'est fait rouler, chef ?
– P'têt ben qu'oui, p'têt ben qu'non… » (Astérix)
Re: Preferred use of port 563 instead of STARTTLS
Author: Julien ÉLIE
Date: Mon, 02 Nov 2015 14:37
Date: Mon, 02 Nov 2015 14:37
24 lines
1858 bytes
1858 bytes
And it also seems that "Security via Opportunistic DNS-Based
Authentication of Named Entities (DANE)" is the path that other
protocols are taking.
RFC 6698 that defines the TLSA record in DNS:
https://tools.ietf.org/html/rfc6698
RFC 7672 for SMTP that uses that TLSA record:
https://tools.ietf.org/html/rfc7672
More details in RFC 7435 about Opportunistic Security:
https://tools.ietf.org/html/rfc7435
Maybe the revised RFC 4642 about TLS for NNTP should take that into
account... (with the distinction between transit mode and reader mode)
--
Julien ÉLIE
« Eh oui… Ce sont les pires qui s'en vont ! » (Astérix)
Re: Preferred use of port 563 instead of STARTTLS
Author: Michael Baeuerle
Date: Fri, 06 Nov 2015 17:56
Date: Fri, 06 Nov 2015 17:56
59 lines
3497 bytes
3497 bytes
Julien ÉLIE wrote: > > I've just read in RFC 7525 (which is a BCP for TLS): > https://tools.ietf.org/html/rfc7525 > > 3.2. Strict TLS > > The following recommendations are provided to help prevent SSL > Stripping (an attack that is summarized in Section 2.1 of [RFC7457]): > > o In cases where an application protocol allows implementations or > deployments a choice between strict TLS configuration and dynamic > upgrade from unencrypted to TLS-protected traffic (such as > STARTTLS), clients and servers SHOULD prefer strict TLS > configuration. > [...] > > Also in a draft (for e-mails) currently discussed in the UTA WG: > https://tools.ietf.org/html/draft-ietf-uta-email-deep-01 > > 4. Implicit TLS > > Previous standards for use of email protocols with TLS used the > STARTTLS mechanism: [RFC2595], [RFC3207], and [RFC3501]. With > STARTTLS, the client establishes a clear text application session and > determines whether to issue a STARTTLS command based on server > capabilities and client configuration. If the client issues a > STARTTLS command, a TLS handshake follows that can upgrade the > connection. While this mechanism has been deployed, an alternate > mechanism where TLS is negotiated immediately at connection start on > a separate port (referred to in this document as "Implicit TLS") has > been deployed more successfully. To increase use of TLS, this > specification recommends use of implicit TLS by new POP, IMAP and > SMTP Submission software. > [...] > > I think it may be of interest to people involved in newsreaders > development here. I was a bit surprised reading this. Formerly I thought that STARTTLS was the way to go for the future. My plan for flnews was to wait until most servers¹ support STARTTLS, implement it and remove the NNTPS support instead. Currently the server configuration of flnews looks like this: <http://micha.freeshell.org/tmp/2015-11-06_flnews_server_config.png> and I don't want to add more config options like "Use STARTTLS". Would "Use STARTTLS" mean "use if available" or "abort if not available"? Following the documents above, it looks like that "change nothing and stay with NNTPS" is the better option. ____________________ ¹) My provider Individual.Net still don't support NNTP V2 and can't even offer the STARTTLS capability.
Re: Preferred use of port 563 instead of STARTTLS
Author: Julien ÉLIE
Date: Sat, 07 Nov 2015 14:03
Date: Sat, 07 Nov 2015 14:03
71 lines
4962 bytes
4962 bytes
Hi Michael,
> I was a bit surprised reading this. Formerly I thought that STARTTLS
> was the way to go for the future. My plan for flnews was to wait until
> most servers¹ support STARTTLS, implement it and remove the NNTPS
> support instead.
I think it was the plan, but...
[draft-ietf-uta-email-deep-01]
One author of this document was also the author of RFC 2595 that
became the standard for TLS usage with POP and IMAP, and the other
author was perhaps the first to propose that idea. In hindsight both
authors now believe that that approach was a mistake. At this point
the authors believe that while anything that makes it easier to
deploy TLS is good, the desirable end state is that these protocols
always use TLS, leaving no need for a separate port for cleartext
operation except to support legacy clients while they continue to be
used. The separate port model for TLS is inherently simpler to
implement, debug and deploy. It also enables a "generic TLS load-
balancer" that accepts secure client connections for arbitrary foo-
over-TLS protocols and forwards them to a server that may or may not
support TLS. Such load-balancers cause many problems because they
violate the end-to-end principle and the server loses the ability to
log security-relevant information about the client unless the
protocol is designed to forward that information (as this
specification does for the cipher suite). However, they can result
in TLS deployment where it would not otherwise happen which is a
sufficiently important goal that it overrides the problems.
Although STARTTLS appears only slightly more complex than separate-
port TLS, we again learned the lesson that complexity is the enemy of
security in the form of the STARTTLS command injection vulnerability
(CERT vulnerability ID #555316). Although there's nothing inherently
wrong with STARTTLS, the fact it resulted in a common implementation
error (made independently by multiple implementers) suggests it is a
less secure architecture than Implicit TLS.
Section 7 of RFC 2595 critiques the separate-port approach to TLS.
The first bullet was a correct critique. There are proposals in the
http community to address that, and use of SRV records as described
in RFC 6186 resolves that critique for email. The second bullet is
correct as well, but not very important because useful deployment of
security layers other than TLS in email is small enough to be
effectively irrelevant. The third bullet is incorrect because it
misses the desirable option of "use and latch-on TLS if available".
The fourth bullet may be correct, but is not a problem yet with
current port consumption rates. The fundamental error was
prioritizing a perceived better design based on a mostly valid
critique over real-world deployability. But getting security and
confidentiality facilities actually deployed is so important it
should trump design purity considerations.
> Currently the server configuration of flnews looks like this:
> <http://micha.freeshell.org/tmp/2015-11-06_flnews_server_config.png>
> and I don't want to add more config options like "Use STARTTLS".
> Would "Use STARTTLS" mean "use if available" or "abort if not
> available"?
I think "abort if not available" is the right thing to do. Otherwise,
people will think the connection is secure (because they asked "Use
STARTTLS") whereas it is not. They should uncheck "Use STARTTLS".
--
Julien ÉLIE
« Faites le mur, pas la guerre. » (Astérix)
Re: Preferred use of port 563 instead of STARTTLS
Author: Michael Baeuerle
Date: Sat, 07 Nov 2015 19:43
Date: Sat, 07 Nov 2015 19:43
71 lines
4927 bytes
4927 bytes
Julien ÉLIE wrote:
>
> [STARTTLS vs Implicit TLS]
> I think it was the plan, but...
>
> [draft-ietf-uta-email-deep-01]
> One author of this document was also the author of RFC 2595 that
> became the standard for TLS usage with POP and IMAP, and the other
> author was perhaps the first to propose that idea. In hindsight both
> authors now believe that that approach was a mistake. At this point
> the authors believe that while anything that makes it easier to
> deploy TLS is good, the desirable end state is that these protocols
> always use TLS, leaving no need for a separate port for cleartext
> operation except to support legacy clients while they continue to be
> used. The separate port model for TLS is inherently simpler to
> implement, debug and deploy. It also enables a "generic TLS load-
> balancer" that accepts secure client connections for arbitrary foo-
> over-TLS protocols and forwards them to a server that may or may not
> support TLS. Such load-balancers cause many problems because they
> violate the end-to-end principle and the server loses the ability to
> log security-relevant information about the client unless the
> protocol is designed to forward that information (as this
> specification does for the cipher suite). However, they can result
> in TLS deployment where it would not otherwise happen which is a
> sufficiently important goal that it overrides the problems.
Thanks for explaining the background.
> Although STARTTLS appears only slightly more complex than separate-
> port TLS, we again learned the lesson that complexity is the enemy of
> security in the form of the STARTTLS command injection vulnerability
> (CERT vulnerability ID #555316). Although there's nothing inherently
> wrong with STARTTLS, the fact it resulted in a common implementation
> error (made independently by multiple implementers) suggests it is a
> less secure architecture than Implicit TLS.
Looks like STARTTLS is sometimes associated with the "opportunistic
encryption" approach by mistake.
> Section 7 of RFC 2595 critiques the separate-port approach to TLS.
> The first bullet was a correct critique. There are proposals in the
> http community to address that, and use of SRV records as described
> in RFC 6186 resolves that critique for email. The second bullet is
> correct as well, but not very important because useful deployment of
> security layers other than TLS in email is small enough to be
> effectively irrelevant. The third bullet is incorrect because it
> misses the desirable option of "use and latch-on TLS if available".
> The fourth bullet may be correct, but is not a problem yet with
> current port consumption rates. The fundamental error was
> prioritizing a perceived better design based on a mostly valid
> critique over real-world deployability. But getting security and
> confidentiality facilities actually deployed is so important it
> should trump design purity considerations.
Agreed. But it is still way too hard to implement TLS in a secure way.
flnews use OpenSSL for TLS and I think the word "nightmare" matches to
describe how bad the documentation is, how hard it is to not overlook
some important setup option and to implement things like certificate
revocation checks.
The source code of the flnews OpenSSL wrapper is currently approx.
80KiByte (!) in size - only to get an encrypted connection and
the server-to-client authentication. What should (IMHO) be a thin
glue layer is currently larger than the NNTP module.
--
> It works.
Die Beschreibung hört sich aber eher nach "It würgs" an...
Günter Frenz in ger.ct
Re: Preferred use of port 563 instead of STARTTLS
Author: Julien ÉLIE
Date: Sat, 14 Nov 2015 14:51
Date: Sat, 14 Nov 2015 14:51
18 lines
1947 bytes
1947 bytes
Hi Michael, > it is still way too hard to implement TLS in a secure way. > flnews use OpenSSL for TLS and I think the word "nightmare" matches to > describe how bad the documentation is, how hard it is to not overlook > some important setup option and to implement things like certificate > revocation checks. The WANT_READ and WANT_WRITE stuff is also not trivial. Do you happen to have looked at GnuTLS to see whether it is easier to use that library? -- Julien ÉLIE « Aliquis non debet esse iudex in propria causa, quia non potest esse iudex et pars. »
Re: Preferred use of port 563 instead of STARTTLS
Author: Julien ÉLIE
Date: Sat, 14 Nov 2015 15:06
Date: Sat, 14 Nov 2015 15:06
29 lines
2454 bytes
2454 bytes
> 4. Implicit TLS > > Previous standards for use of email protocols with TLS used the > STARTTLS mechanism: [RFC2595], [RFC3207], and [RFC3501]. With > STARTTLS, the client establishes a clear text application session and > determines whether to issue a STARTTLS command based on server > capabilities and client configuration. If the client issues a > STARTTLS command, a TLS handshake follows that can upgrade the > connection. While this mechanism has been deployed, an alternate > mechanism where TLS is negotiated immediately at connection start on > a separate port (referred to in this document as "Implicit TLS") has > been deployed more successfully. To increase use of TLS, this > specification recommends use of implicit TLS by new POP, IMAP and > SMTP Submission software. As for the use of implicit TLS with NNTP, should port 563 be used for both reading and peering? Or should another port for peering with implicit TLS be reserved? We already have port 433 for NNSP but it has never been used with implicit TLS... -- Julien ÉLIE « Avoir un sale caractère n'empêche pas d'être ponctuel : on peut être râleur et être à l'heure. » (Philippe Geluck)
Re: Preferred use of port 563 instead of STARTTLS
Author: Michael Baeuerle
Date: Sun, 15 Nov 2015 18:19
Date: Sun, 15 Nov 2015 18:19
19 lines
1763 bytes
1763 bytes
Julien ÉLIE wrote: > Michael Bäuerle wrote: > > > > [OpenSSL] > > [...] Do you happen > to have looked at GnuTLS to see whether it is easier to use that > library? Not really, but the few things I have checked have looked better. The choice for OpenSSL was because of license issues. -- Sorry, aber mit der Einstellung würden wir heute aus Sicherheitsgründen noch auf dem Baum sitzen. Wer etwas Neues schaffen will, muß auch was wagen - aber da heute Kinder schon zu Fuß mit Helm rumlaufen gilt das wohl nicht mehr... [Eric Brücklmeier in dse]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads