Re: [TLS] A question for TLS middle-box/middleware vendors/implementers

Yoav Nir <ynir.ietf@gmail.com> Sun, 28 January 2018 19:38 UTC

Return-Path: <ynir.ietf@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DC8E012FB3A for <tls@ietfa.amsl.com>; Sun, 28 Jan 2018 11:38:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0OjryZAwCYKY for <tls@ietfa.amsl.com>; Sun, 28 Jan 2018 11:38:10 -0800 (PST)
Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BEA1E12FB38 for <tls@ietf.org>; Sun, 28 Jan 2018 11:38:09 -0800 (PST)
Received: by mail-wr0-x231.google.com with SMTP id g21so4933636wrb.13 for <tls@ietf.org>; Sun, 28 Jan 2018 11:38:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ff+Os4hSfwdnbgBGUBIcnMLdu9OF2LH4T7meHqcz/L0=; b=kIBwMLZX3vcMWXTonHqQj49+UOEH9lcI5ORHE2DSYsJnJ6JAinbl6qCbs1ErTM64tE fqm3B6HHK992lN+UMq53iXyRXFGRLqRIHwbORLraL5x5CD0sO86eR+vOrk/ubyfPkN4A nTCK/0vbgSeYm6SuHTxEzYcxlhFCAKqSFGCtea17PenGQV6gUJaNn04Nid0r1iYQE5TI vSN83ZxoKK55CYOas3dcZNHI4jap3mgkNf93rslJR/kWfEWdEFN6oZY/j+bj447i/EuP leWDaPA6YK/FDfjBH1mMQUDLX+OgASX8EB+/yrOqC2s3/Oh+p3j+Imk/IZKkN5qCtNQ1 BW7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ff+Os4hSfwdnbgBGUBIcnMLdu9OF2LH4T7meHqcz/L0=; b=Rle5gsnAsHna3TMkc/LIFBJiVUN4MEf0ODTOLP08Kf40qU6MhAVRF/o8anHUcStFpG 2gAr3dcd5zY+Tmv61g/Y3WAavFdyjWbTs1ySdS+VohO97lodRF1ivhVKfyk28ajlPbVc +pXr6vVPZ4rZ+yLk5xy2TiOKTRPdetqI4WoijjPRfEo0G81B/VolBMia/85u/AkfyQ+S 3fXNGkjexDctF/hsLmbLP0uKbg7XLOiyBCAnLFE1ttUfLxQLv+07ZO2j5tX7sUrdQCp/ ZDJHqu3kmrBtnLx4uMkXpJRagF7b4NAeUT1ZRmczWT639z3HNn5a9qB9hI+jutMiil1k PQxQ==
X-Gm-Message-State: AKwxytdP4yFiOt3ef9G8bX9quN+EENaaLE5j33JzOPV8D/uo9f4EWMn/ 4U0E4Pzq1CnHUtVVlVnWDqw=
X-Google-Smtp-Source: AH8x225H2pwpIJQcxb96pi4royjYVPaL1y7H9yVCyfnfl05Lj5NKI5/P6VC9UhxAJlg3dmk6ru/unw==
X-Received: by 10.223.186.194 with SMTP id w2mr16161181wrg.154.1517168288273; Sun, 28 Jan 2018 11:38:08 -0800 (PST)
Received: from [192.168.1.18] ([46.120.57.147]) by smtp.gmail.com with ESMTPSA id p9sm11935810wra.76.2018.01.28.11.38.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 11:38:07 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
From: Yoav Nir <ynir.ietf@gmail.com>
In-Reply-To: <C5300BCB-190F-432C-9CB2-BE349708176C@nokia.com>
Date: Sun, 28 Jan 2018 21:38:04 +0200
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FBFB3DFA-408F-4230-B47B-1B94F663FA5C@gmail.com>
References: <7CC4F5F0-DCC1-420E-B91A-A4D5B9FC5D53@nokia.com> <AC31F5BD-A6CA-4F56-A181-BE84F9EF3F4E@gmail.com> <C5300BCB-190F-432C-9CB2-BE349708176C@nokia.com>
To: "Fossati, Thomas (Nokia - GB/Cambridge, UK)" <thomas.fossati@nokia.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/TQUHVQtrV0Id5FiN_BnSXch_C_Q>
Subject: Re: [TLS] A question for TLS middle-box/middleware vendors/implementers
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Jan 2018 19:38:12 -0000

Hi, Thomas

Inline

> On 28 Jan 2018, at 12:19, Fossati, Thomas (Nokia - GB/Cambridge, UK) <thomas.fossati@nokia.com> wrote:
> 
> Hi Yoav,
> 
> Thanks for the answers - much appreciated.
> 
> On 27/01/2018, 19:31, "Yoav Nir" <ynir.ietf@gmail.com> wrote:
>> The length field is byte-aligned. So any implementation of a TLS
>> parser or TLS proxy will do one of two things:
>> 
>> 1. Consider the MSB to be a must-be-zero bit and drop any length field
>> that has it set as faulty.
>> 
>> 2. Ignore text about limits on length and assume the record is that
>> big. Depending on what field that is, this may cause a drop on some
>> other sanity check.
>> 
>> As always there’s option #3 (crash), but the industry is getting
>> better at avoiding that.
>> 
>> You seem to want the behaviour that the middlebox masks out the
>> must-be-zero bits and considers only the relevant length bits. I don’t
>> think that would pass code review at my former employer.
> 
> What I was thinking was rather "once handshake is done and client has
> successfully passed the SNI checks, just blindly copy the byte stream
> across." I had this specific mental model (that of an HTTPS filter) in
> my head, which of course is just one of many.

When middleboxes just classify and route (at Check Point we called that “passive inspection” as opposed to “active inspection” which was a TLS proxy) then yes - as soon as the data becomes encrypted you either drop it or let it through. As this is much higher performance (a given piece of hardware can handle much more passive inspection that it can active inspection), it was preferred for domains that were considered low-risk. 

TLS 1.3 means that a passive proxy needs to make the decision earlier.

> If the use case is "check for data exfiltration or covert channels",
> then the box is probably going to be a fully-fledged interception proxy.
> In that case the parser can't be sloppy, and the bit will not go through
> unnoticed (as you correctly note above).
> 
> But - pardon a naive mind -  these look like the kind of boxes that you
> can't just switch on and forget about.  Instead, I'd imagine you need to
> keep their release cycle aligned with that of the endpoints, especially
> browsers, which tends to be pretty aggressive.  (But yes, one thing is
> the vendor release cycle, and a completely different one is the network
> operator's upgrade schedule…)

Vendors release updates at a good pace, some through software upgrades and some through updating data files. An upgrade from supporting TLS 1.2 to supporting TLS 1.3 as a proxy usually requires a software upgrade. But the changes for passive proxy can be done through issuing an update to some regular expression or other rule. Typically customers buy a piece of software and subscribe to updates. 

The Internet is full of old versions because the administrators don’t don’t want to rock the boat or are content with a good, stable release, the same way that Windows 7 is still so popular. In some cases the middlebox vendor has gone out of business.

The Internet is also full of middleboxes where the subscription was allowed to lapse. It seems like carelessness. 

> Since you are here, and you have amassed a considerable amount of wisdom
> in this space, I have a further question: Is, in your opinion, DTLS in a
> better spot than TLS WRT the use of that bit?

With a firewall that doesn’t know about DTLS, there are three choices:
1. Allow all the DTLS
2. Block all the DTLS
3. Write a regular expression (or equivalent) that will check the DTLS handshake for sanity.

If DTLS becomes popular, newer versions of firewalls will be able to handle them the same as they do TLS. For now, DTLS is seeing little use.

Yoav