Subject: [TLS] Deprecating alert levels

From: Kyle Nekritz <[email-masked]>
Date: Fri, 14 Oct 2016 21:07:30 +0000

After PR #625 all alerts are required to be sent with fatal AlertLevel except for close_notify, end_of_early_data, and user_canceled. Since those three alerts all have separate specified behavior, the AlertLevel field is not serving much purpose, other than providing potential for misuse. We (Facebook) currently receive a number of alerts at incorrect levels from clients (internal_error warning alerts, etc.). I propose deprecating this field to simplify implementations and require that any misuse be ignored.

PR: https://github.com/tlswg/tls13-spec/pull/693

Kyle

---

From: Martin Thomson <[email-masked]>
Date: Sun, 16 Oct 2016 20:53:18 +1100

I'm sympathetic to this, but just to be clear...

You are suggesting that end_of_early_data and close_notify will be
marked "fatal".

WFM.

On 15 October 2016 at 08:07, Kyle Nekritz <[email-masked]> wrote:
> After PR #625 all alerts are required to be sent with fatal AlertLevel
> except for close_notify, end_of_early_data, and user_canceled. Since those
> three alerts all have separate specified behavior, the AlertLevel field is
> not serving much purpose, other than providing potential for misuse. We
> (Facebook) currently receive a number of alerts at incorrect levels from
> clients (internal_error warning alerts, etc.). I propose deprecating this
> field to simplify implementations and require that any misuse be ignored.
>
>
>
> _______________________________________________
> TLS mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/tls
>

---

From: Eric Rescorla <[email-masked]>
Date: Sun, 16 Oct 2016 13:40:40 -0700

This seems like a good change. I'll merge this on Monday (pre draft-17)
unless I hear objections

---

From: Hubert Kario <[email-masked]>
Date: Mon, 17 Oct 2016 13:20:00 +0200

On Friday, 14 October 2016 21:07:30 CEST Kyle Nekritz wrote:
> clients (internal_error warning alerts, etc.).

could you expand on why it's a problem?

-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic

---

From: Benjamin Kaduk <[email-masked]>
Date: Mon, 17 Oct 2016 11:11:43 -0500

> could you expand on why it's a problem?

Why what is a problem?

My understanding is that at present, the AlertLevel is not reliable
(that is, some noticeable fraction of clients send nonsense) and so the
change in PR 693 is merely documenting existing best practice.

-Ben

---

From: Hubert Kario <[email-masked]>
Date: Mon, 17 Oct 2016 18:19:25 +0200

> > could you expand on why it's a problem?

clients sending incorrect levels for the description they send
 
> change in PR 693 is merely documenting existing best practice.

the current draft says that any alert except the three defined as warning 
level must be considered fatal and cause connection closure

I don't see how deprecating the field changes anything - the implementations 
won't need to behave differently and data on the wire won't be different

---

From: Eric Rescorla <[email-masked]>
Date: Mon, 17 Oct 2016 12:29:49 -0400

This would actually simplify our implementation slightly because then we
would simply not look at the field at all, even for the closure alerts.

-Ekr

On Mon, Oct 17, 2016 at 12:19 PM, Hubert Kario <[email-masked]> wrote:

> > >> three alerts all have separate specified behavior, the AlertLevel
> field
> > >> is

---

From: [email-masked] (Martin Rex)
Date: Mon, 17 Oct 2016 19:04:18 +0200 (CEST)

Kyle Nekritz wrote:
> except for close_notify, end_of_early_data, and user_canceled.

This list is already missing the warning-level "unrecognized_name" alert,
and such a change would imply that all new/unrecognized alerts are going
to be treated as fatal forever (i.e. that no new warning-level alerts
can ever be defined).

I don't like that proposal.

-Martin

---

From: Dave Garrett <[email-masked]>
Date: Mon, 17 Oct 2016 13:26:09 -0400

> to be treated as fatal forever (i.e. that no new warning-level alerts

That's already true:

https://tools.ietf.org/html/draft-ietf-tls-tls13-16#section-6
https://tlswg.github.io/tls13-spec/#alert-protocol
"Unknown alert types MUST be treated as fatal."

Changelog says this change was made for draft 14.

Dave

---

From: Kyle Nekritz <[email-masked]>
Date: Mon, 17 Oct 2016 17:34:05 +0000

> You are suggesting that end_of_early_data and close_notify will be marked "fatal".

Yes, technically they would have no alert level (since alert level is deprecated), but as far as bytes on the wire changes with this PR, that's correct.

> could you expand on why it's a problem?

Alert level is not conveying any additional information since there is one (and only one) alert level each alert type must be sent as. Having a separate field that does not convey additional information is only providing an opportunity for implementations to misuse it and create subtle bugs (for example if one implementation ignores warning level alerts, while another incorrectly sends alerts defined as fatal at warning level).

> This list is already missing the warning-level "unrecognized_name" alert, and such a change would imply that all new/unrecognized alerts are going to be treated as fatal forever (i.e. that no new warning-level alerts can ever be defined).

That alert is currently defined as a fatal alert (see section 6.2 in the current draft). RFC 6066 also states "It is NOT RECOMMENDED to send a warning-level unrecognized_name(112) alert, because the client's behavior in response to warning-level alerts is unpredictable.", which I think illustrates the problem. Allowing new non-fatal alerts to be added later would require that existing clients ignore unknown warning alerts, which I think is somewhat dangerous.

-----Original Message-----
From: Martin Thomson [mailto:[email-masked]] 
Sent: Sunday, October 16, 2016 5:53 AM
To: Kyle Nekritz <[email-masked]>
Cc: [email-masked]
Subject: Re: [TLS] Deprecating alert levels

You are suggesting that end_of_early_data and close_notify will be marked "fatal".

WFM.

On 15 October 2016 at 08:07, Kyle Nekritz <[email-masked]> wrote:
> except for close_notify, end_of_early_data, and user_canceled. Since 
> those three alerts all have separate specified behavior, the 
> AlertLevel field is not serving much purpose, other than providing 
> potential for misuse. We
> (Facebook) currently receive a number of alerts at incorrect levels 
> from clients (internal_error warning alerts, etc.). I propose 
> deprecating this field to simplify implementations and require that any misuse be ignored.
>
>
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mail
> man_listinfo_tls&d=DQIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=l2j4BjkO0Lc3u4CH2
> z7jPw&m=D6vgejwavMxoWSed2ANWwkecWIlc1MnHfgXfiejFS8Y&s=-fFwoxaS4TZXNkoZ
> M04oEUCKz283dy6QYRuhlOK0mQo&e=
>

---

From: David Benjamin <[email-masked]>
Date: Mon, 17 Oct 2016 17:46:57 +0000

On Mon, Oct 17, 2016 at 1:34 PM Kyle Nekritz <[email-masked]> wrote:

> Yes, technically they would have no alert level (since alert level is
> deprecated), but as far as bytes on the wire changes with this PR, that's
> correct.
>
> Alert level is not conveying any additional information since there is one
> (and only one) alert level each alert type must be sent as. Having a
> separate field that does not convey additional information is only
> providing an opportunity for implementations to misuse it and create subtle
> bugs (for example if one implementation ignores warning level alerts, while
> another incorrectly sends alerts defined as fatal at warning level).
>
> > This list is already missing the warning-level "unrecognized_name"
> alert, and such a change would imply that all new/unrecognized alerts are
> going to be treated as fatal forever (i.e. that no new warning-level alerts
> can ever be defined).
>
> That alert is currently defined as a fatal alert (see section 6.2 in the
> current draft). RFC 6066 also states "It is NOT RECOMMENDED to send a
> warning-level unrecognized_name(112) alert, because the client's behavior
> in response to warning-level alerts is unpredictable.", which I think
> illustrates the problem. Allowing new non-fatal alerts to be added later
> would require that existing clients ignore unknown warning alerts, which I
> think is somewhat dangerous.
>

Unfortunately, while NOT RECOMMENDED, some servers do this. I do not think
we'll be able to retroactively declare warning alerts nonexistent in TLS
1.2 and earlier.
https://bugzilla.mozilla.org/show_bug.cgi?id=1296862

David

---

From: Hubert Kario <[email-masked]>
Date: Mon, 17 Oct 2016 20:00:49 +0200

> Changelog says this change was made for draft 14.

but unrecognized_name is defined (it's a part of MTI extension in fact), and 
any value defined by a new RFC automatically becomes a known alert

Not to mention that implementations are not supposed to send unknown alerts 
unless negotiated by extension.

---

From: Hubert Kario <[email-masked]>
Date: Mon, 17 Oct 2016 20:07:03 +0200

On Monday, 17 October 2016 17:34:05 CEST Kyle Nekritz wrote:
> Allowing new non-fatal alerts to be added later

but the standard doesn't say that you need to ignore unknown warning level 
alerts

it says that any unknown alerts, irrespective of their level MUST be 
considered fatal
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic

---

From: [email-masked] (Martin Rex)
Date: Wed, 19 Oct 2016 17:58:45 +0200 (CEST)

Kyle Nekritz wrote:
> would require that existing clients ignore unknown warning alerts,
> which I think is somewhat dangerous.

It seems that rfc6066 is not clear enough in explaining the issue
about the situation with the two WELL-DEFINED (but poorly implemented)
variants of the TLS alerts

  (1)  unrecognized_name(112)  level WARNING
  (2)  unrecognized_name(112)  level FATAL

See the *ORIGINAL* specification which created *BOTH* of these alert variants:

https://tools.ietf.org/html/rfc3546#page-10

   If the server understood the client hello extension but does not
   recognize the server name, it SHOULD send an "unrecognized_name"
   alert (which MAY be fatal).

-Martin

---

From: Joseph Salowey <[email-masked]>
Date: Wed, 19 Oct 2016 11:24:01 -0700

It does not look like we have sufficient consensus to adopt this PR.  While
there is some support for simplifying alerts by removing the alert level,
the current discussion raises some issues about the general approach.

1.  Is it appropriate for all unknown alerts to be treated as fatal? (the
current draft already states this)
2.  Are there cases, such as unrecognized name. where it is useful to
indicate that an alert is not fatal?  If so how should this case be handled?

Cheers,

J&S

On Wed, Oct 19, 2016 at 8:58 AM, Martin Rex <[email-masked]> wrote:

> alert,

---

From: Eric Rescorla <[email-masked]>
Date: Wed, 19 Oct 2016 11:28:04 -0700

On Wed, Oct 19, 2016 at 11:24 AM, Joseph Salowey <[email-masked]> wrote:

> It does not look like we have sufficient consensus to adopt this PR.
> While there is some support for simplifying alerts by removing the alert
> level, the current discussion raises some issues about the general
> approach.
>

I thought we had pretty strong consensus on this. I'd be sad to take it
back.

> indicate that an alert is not fatal?  If so how should this case be handled?

I think this alert was a mistake :)

-Ekr

---

From: Martin Thomson <[email-masked]>
Date: Thu, 20 Oct 2016 13:18:25 +1100

> I think this alert was a mistake :)

In NSS is to tolerate it, but it's an exception.  I'm happier with a
lone exception than with atrophied and redundant alert levels
continuing as they are.  I'd prefer to take the PR, with a minor
amendment noting the hazard caused by unrecognized_name(112).  Clients
that intend to accept TLS 1.2 and lower probably have to ignore
warning alerts until they see that the server is doing TLS 1.3 or
higher.

---

From: Martin Thomson <[email-masked]>
Date: Thu, 20 Oct 2016 13:20:06 +1100

On 20 October 2016 at 13:18, Martin Thomson <[email-masked]> wrote:
> In NSS is to tolerate it

*(Learn to write fool) In NSS we tolerate warning alerts

---

From: Kyle Nekritz <[email-masked]>
Date: Tue, 25 Oct 2016 01:14:23 +0000

+1 to both Martin and ekr, I think simplifying these alerts with clearly defined behavior for each alert description is the best way forward.

Kyle 

-----Original Message-----
From: TLS [mailto:[email-masked]] On Behalf Of Martin Thomson
Sent: Wednesday, October 19, 2016 10:18 PM
To: Eric Rescorla <[email-masked]>
Cc: [email-masked]
Subject: Re: [TLS] Deprecating alert levels

> I think this alert was a mistake :)

In NSS is to tolerate it, but it's an exception.  I'm happier with a lone exception than with atrophied and redundant alert levels continuing as they are.  I'd prefer to take the PR, with a minor amendment noting the hazard caused by unrecognized_name(112).  Clients that intend to accept TLS 1.2 and lower probably have to ignore warning alerts until they see that the server is doing TLS 1.3 or higher.

_______________________________________________
TLS mailing list
[email-masked]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_tls&d=DQICAg&c=5VD0RTtNlTh3ycd41b3MUw&r=l2j4BjkO0Lc3u4CH2z7jPw&m=1svSdxAuionbHyrUN4ThSCRLZ1pCQuLaO0qtgQ8Dk7A&s=jWxxDB9uWwT6kP_7TcZ4isUa_Z5LNWOhgMX_O1s3oaw&e=

---

From: Olivier Levillain <[email-masked]>
Date: Wed, 26 Oct 2016 13:36:07 +0200

Hi list,

I recently saw a related CVE regarding OpenSSL on oss-security mailing
list: CVE-2016-8610. The original mail is
http://seclists.org/oss-sec/2016/q4/224. As I understand it, the idea is
to send a continuous flow of unauthenticated, warning-level alerts in
the middle of the initial handshake. This leads OpenSSL to keep the
connection open (and apparently to consume some CPU).

Even if this might not be the attack of the century, it may also be
another reason to reconsider how a TLS stack should handle
[multiple|warning|unauthenticated] alerts.

olivier