Re: [Gen-art] Gen-ART and OPS-Dir review of draft-ietf-httpbis-header-compression-10

"Black, David" <david.black@emc.com> Tue, 20 January 2015 19:23 UTC

Return-Path: <david.black@emc.com>
X-Original-To: gen-art@ietfa.amsl.com
Delivered-To: gen-art@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2EF741B2ADC; Tue, 20 Jan 2015 11:23:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.311
X-Spam-Level:
X-Spam-Status: No, score=-4.311 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 CjQ8dbWkHGdS; Tue, 20 Jan 2015 11:23:09 -0800 (PST)
Received: from mailuogwhop.emc.com (mailuogwhop.emc.com [168.159.213.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1029F1B2A50; Tue, 20 Jan 2015 11:23:08 -0800 (PST)
Received: from maildlpprd02.lss.emc.com (maildlpprd02.lss.emc.com [10.253.24.34]) by mailuogwprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id t0KJN06j022450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 14:23:01 -0500
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com t0KJN06j022450
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1421781782; bh=LhTLFcafMVbd/PKueG5kURrAvc4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=RCyxGmzjJd8WYrd36vpIGVx9N0hskCZ95QjO9ya238gWCpCKaYKULg7sFsEMZrR64 iWxBHsfvmRmEUHyASfOBKC0+aVYmq1jQs6z0x3XtOTuIx8Z8sw5tJ5G5QLcpoXx8wc Fmi/ILROWFPTyb5xR7fCTFLyZDnKJcxh4F2p+xAI=
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com t0KJN06j022450
Received: from mailusrhubprd04.lss.emc.com (mailusrhubprd04.lss.emc.com [10.253.24.22]) by maildlpprd02.lss.emc.com (RSA Interceptor); Tue, 20 Jan 2015 14:21:59 -0500
Received: from mxhub08.corp.emc.com (mxhub08.corp.emc.com [128.222.70.205]) by mailusrhubprd04.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id t0KJMgCG010258 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 20 Jan 2015 14:22:42 -0500
Received: from MXHUB209.corp.emc.com (10.253.68.35) by mxhub08.corp.emc.com (128.222.70.205) with Microsoft SMTP Server (TLS) id 8.3.327.1; Tue, 20 Jan 2015 14:22:42 -0500
Received: from MX104CL02.corp.emc.com ([169.254.8.208]) by MXHUB209.corp.emc.com ([10.253.68.35]) with mapi id 14.03.0195.001; Tue, 20 Jan 2015 14:22:42 -0500
From: "Black, David" <david.black@emc.com>
To: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>, Martin Thomson <martin.thomson@gmail.com>
Thread-Topic: [Gen-art] Gen-ART and OPS-Dir review of draft-ietf-httpbis-header-compression-10
Thread-Index: AdAu1mrrhPGv6xDFSDefkyOsNh6OXQF3akyAABXj4QAACmrY4A==
Date: Tue, 20 Jan 2015 19:22:41 +0000
Message-ID: <CE03DB3D7B45C245BCA0D243277949362E9050@MX104CL02.corp.emc.com>
References: <CE03DB3D7B45C245BCA0D243277949362DE459@MX104CL02.corp.emc.com>, <CABkgnnUwNQUcFg5w5HFpSQrAUxtbqG_UN-_WDGop1eqqoCS+Aw@mail.gmail.com> <1421779730757.42642@crf.canon.fr>
In-Reply-To: <1421779730757.42642@crf.canon.fr>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.238.45.73]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd04.lss.emc.com
X-RSA-Classifications: DLM_1, public
Archived-At: <http://mailarchive.ietf.org/arch/msg/gen-art/yxMY1qmI04IeHr9tmogzLerpCtU>
Cc: "fenix@google.com" <fenix@google.com>, "General Area Review Team (gen-art@ietf.org)" <gen-art@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Subject: Re: [Gen-art] Gen-ART and OPS-Dir review of draft-ietf-httpbis-header-compression-10
X-BeenThere: gen-art@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "GEN-ART: General Area Review Team" <gen-art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/gen-art>, <mailto:gen-art-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/gen-art/>
List-Post: <mailto:gen-art@ietf.org>
List-Help: <mailto:gen-art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/gen-art>, <mailto:gen-art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Jan 2015 19:23:13 -0000

Herve and Martin,

Thank you for your replies.  I'm responding briefly to the topics that
still need attention - major issue -2- still looks like a serious security
problem area, IMHO.  Everything else is either resolved or editorial.

Anything that I don't comment on here is fine with me.

-1-

For major issue -1- regarding extensibility, upon further thought after
sending the review I wound up fairly close to Martin's comment:

> > A few people objected to this on the grounds that this flies in the
> > face of a body of accepted wisdom on extensibility in protocols.  But
> > that flexibility turns out to be contrary to the aforementioned goals.
> > Ultimately, this choice was very clearly and consistently the
> > consensus of the working group.

Documenting that design choice will suffice for me, and Martin's proposed
text for that looks reasonable.  I think it's ok for an HPACK change to
require doing something in HTTP, although I'm not sure what ought to
be done in HTTP to signal a new header compression algorithm that replaces
HPACK - that's a matter for the main HTTP v2 draft.

-2-

For major issue -2- regarding when to use the never-indexed format in order
to avoid attacks like the CRIME attack on DEFLATE, I disagree with the
discussion:

> > > The second major issue is that I can't find the list of fields
> > > that are required to use the never-indexed syntax for security
> > > reasons.
> >
> > That list doesn't exist, because the need to avoid indexing is highly
> > contextual.  Like padding, I don't expect this feature to be widely
> > used, because it requires specific knowledge, but it is necessary to
> > avoid low-entropy secrets from being exposed to CRIME-like attacks.

Designing a mechanism to resist an attack but failing to provide guidance
(either here or in the main HTTP v2 draft) on how to use it to resist that
attack does not solve the actual problem, no matter how clever the
mechanism.

I hope the Security ADs notice this discussion, because the current
situation looks like a security flaw from here (likely to result
in insecure implementations, even though the implementations contain
the mechanism needed to fix the security problem).

If a list of specific fields is not reasonable, some specific guidance on
where and why this mechanism needs to be applied is in order, as (IMHO)
it is unreasonable to expect the entire global implementer community
to have a detailed working command of the CRIME attack and its HPACK
implications wrt specific pieces of information exchanged in the HTTP v2
protocol.

> > I can't confirm, but I think we're using it in Firefox for short
> > cookies (over which we have little control, but still wish to
> > protect).

I expect HPACK to be implemented as part of HTTP v2 in systems whose
implementation teams have far less security talent & insight by complarison
to the major browser vendors, so while I appreciate the Firefox example,
I don't consider it to be typical of many of the groups that are likely
to  implement HTTP v2.

-- Everything beyond here is an editorial nit --

> > > -- Section 1:
> > >
> > >    As
> > >    Web pages have grown to include dozens to hundreds of requests,
> > >
> > > "include dozens to hundreds of requests" ->
> > >         "require dozens to hundreds of requests to retrieve"
> >
> > "to retrieve" is too specific.

How about "to access"?  If not, I guess the text is ok.

> > >    Header Field:  A name-value pair.  Both the name and value are
> > >       treated as opaque sequences of octets.
> > >
> > > Indicate what header or headers these fields come from.
> >
> > ?

For HPACK, these fields are from the HTTP v2 header, right?

> > >    Static Table:  The static table (see Section 2.3.1) is a header table
> > >       used to associate static header fields to index values.
> > >
> > > "associate static header fields" ->
> > >         "statically associate commonly used header fields"
> >
> > I'm going to avoid the "commonly used" value judgment.  Whether they
> > are commonly used or not isn't pertinent.  I'll let the editors decide
> > if they would prefer your text.
> 
> I also prefer to avoid "commonly used".

How about "statically associate header fields that occur frequently in practice" ?

The intent of the suggested edit it to provide some insight into why the static
fields exist.

Thanks,
--David


> -----Original Message-----
> From: RUELLAN Herve [mailto:Herve.Ruellan@crf.canon.fr]
> Sent: Tuesday, January 20, 2015 1:49 PM
> To: Martin Thomson; Black, David
> Cc: fenix@google.com; General Area Review Team (gen-art@ietf.org);
> ietf@ietf.org; ietf-http-wg@w3.org
> Subject: RE: [Gen-art] Gen-ART and OPS-Dir review of draft-ietf-httpbis-
> header-compression-10
> 
> Thanks for all these edits, Martin.
> 
> I did a few additional ones in:
> https://github.com/http2/http2-spec/pull/694
> 
> See below for my comments.
> 
> Hervé.
> ________________________________________
> > From: Martin Thomson <martin.thomson@gmail.com>
> > Sent: Tuesday, January 20, 2015 09:22
> > To: Black, David
> > Cc: fenix@google.com; RUELLAN Herve; General Area Review Team (gen-
> art@ietf.org); ietf@ietf.org; ietf-http-wg@w3.org
> > Subject: Re: [Gen-art] Gen-ART and OPS-Dir review of draft-ietf-httpbis-
> header-compression-10
> >
> > In the absence of answers from the editors, I can provide an
> > explanation for the choices you have identified as being issues.
> >
> > I've also turned your comments into a pull request.
> >
> > https://github.com/http2/http2-spec/pull/693
> >
> > You can review that; but the editors will likely have some more to say
> > about this.
> >
> > (Note: I dropped opsdir from this reply, there was no substance there.
> > I look forward to a review of HTTP/2 proper.)
> >
> > On 12 January 2015 at 18:12, Black, David <david.black@emc.com> wrote:
> > > The first major issue involves the dense packing of static and
> > > dynamic table indices, and what appears to be an inability to
> > > ever change this  and HPACK in general (if that's a "feature,"
> > > an explanation of why is in order).
> >
> > That is entirely intentional.  The same question has been raised
> > several times, and the answer from the working group has been
> > consistent:
> >
> > This compression scheme will not be the fastest, or give the best
> > compression ratios.  It will have those limitations, but it will be
> > easy to understand, implement and get correct and it will provide good
> > enough compression performance.
> >
> > It will also be completely inflexible, but if that turns out to be a
> > problem, we will fix it in HTTP/3, even if that means that HTTP/3 is
> > almost entirely identical to HTTP/2.
> >
> > A few people objected to this on the grounds that this flies in the
> > face of a body of accepted wisdom on extensibility in protocols.  But
> > that flexibility turns out to be contrary to the aforementioned goals.
> > Ultimately, this choice was very clearly and consistently the
> > consensus of the working group.
> >
> > I'm going to propose the following text be added:
> >
> >    The HPACK format is intentionally simple and inflexible.  Both
> >    characteristics reduce the risk of interoperability or security
> >    issues based by implementation error.  No extensibility mechanisms
> >    are defined; changes to the format are only possible by defining a
> >    complete replacement.
> >
> > > The second major issue is that I can't find the list of fields
> > > that are required to use the never-indexed syntax for security
> > > reasons.
> >
> > That list doesn't exist, because the need to avoid indexing is highly
> > contextual.  Like padding, I don't expect this feature to be widely
> > used, because it requires specific knowledge, but it is necessary to
> > avoid low-entropy secrets from being exposed to CRIME-like attacks.
> >
> > I'll note that the combination of "low-entropy" and "secret"
> > immediately makes this a scenario into which only the very careful and
> > knowledgeable should venture.  But apparently some do and those few
> > (along with the paranoid) need the mechanism.  The rest of us can just
> > use more entropy on our secrets.
> >
> > I can't confirm, but I think we're using it in Firefox for short
> > cookies (over which we have little control, but still wish to
> > protect).
> >
> > [snip]
> > > Minor issues:
> > >
> > > -A- Section 1.3:
> > >
> > >    Dynamic Table:  The dynamic table (see Section 2.3.2) is a header
> > >       table used to associate stored header fields to index values.
> > >       This table is dynamic and specific to an encoding or decoding
> > >       context.
> > >
> > > Need to define "header table" before using it in this definition, or
> > > point to the discussion of the term in Section 1.
> >
> > Or you could not use "header table":
> >
> >    Dynamic Table:  The dynamic table (see Section 2.3.2) is a table that
> >       associates stored header fields with index values.  This table is
> >       dynamic and specific to an encoding or decoding context.
> >
> > > -B- Section 4.2
> > >
> > > This paragraph is unclear on what has to be communicated:
> > [snip]
> > > I suggest:
> > >
> > >    Multiple updates to the maximum table size can occur between the
> > >    sending of two header blocks.  In the case that this size
> > >    is changed more than once in this interval, the smallest
> > >    maximum table size that occurs in that interval MUST
> > >    be sent in an encoding context update.  The final maximum size is
> > >    always sent, resulting in at most two encoding context updates.  This
> > >    ensures that the decoder is able to perform eviction based on
> > >    reductions in decoder table size (see Section 4.3).
> >
> > LGTM (I apologize, that was my text).
> >
> > > -C- Section 4.4:
> > >
> > > This paragraph is unclear on whether eviction occurs before or after
> > > adding an entry:
> > >
> > >    Whenever a new entry is to be added to the dynamic table, entries are
> > >    evicted from the end of the dynamic table until the size of the
> > >    dynamic table is less than or equal to (maximum size - new entry
> > >    size), or until the table is empty.
> > >
> > > I suggest inserting "(before the new entry is added)" after
> > > "until the size of the dynamic table"
> >
> > How about this instead:
> >
> > s/Whenever a new entry is to be added.../Before a new entry is added.../
> >
> > > -D- Section 4.4:
> > >
> > >    If the representation of the added entry references the name of an
> > >    entry in the dynamic table, the referenced name is cached prior to
> > >    performing eviction to avoid having the name inadvertently evicted.
> > >
> > > Cached where and how?  Please explain.
> >
> > I don't find this unclear, would "saved" cause less confusion than "cached"?
> 
> I think that this paragraph is too implementation oriented. In particular, the
> "cached" is implementation-dependent. I propose changing it to:
> 
>                     A new entry can reference the name of an entry in the
>                     dynamic table that will be evicted when adding this new
>                     entry into the dynamic table. Implementations have to take
>                     care not deleting the referenced name from memory while
>                     evicting the referenced entry from the dynamic table.
> 
> 
> >
> > > -E- Section 5.1
> > >
> > > N is supposed to be the number of bits in the prefix, which makes the
> > > use of N in "Value (N)" incorrect in Figure 2.  I think just deleting
> > > "(N)" in the figure will fix this.
> >
> > I think that's a fair point; I think removing the "(7)" from Figure 3
> > is necessary though.
> 
> The "(N)" in the figure was supposed to indicate the size of the value in
> bits. But I'm OK with removing it.
> 
> > >
> > > -F- Section 7.1.3
> > >
> > > This section applies only to intermediaries that are aware of HPACK
> > > (and presumably use it).  That should be stated, along with a reminder
> > > that an HPACK-unaware intermediary that does HPACK-unaware compression
> > > may create vulnerabilities to attacks like CRIME.
> > >
> > > Nits/editorial comments:
> > >
> > > -- Section 1:
> > >
> > >    As
> > >    Web pages have grown to include dozens to hundreds of requests,
> > >
> > > "include dozens to hundreds of requests" ->
> > >         "require dozens to hundreds of requests to retrieve"
> >
> > "to retrieve" is too specific.
> >
> > > -- Section 1.3:
> > >
> > >    Header Field:  A name-value pair.  Both the name and value are
> > >       treated as opaque sequences of octets.
> > >
> > > Indicate what header or headers these fields come from.
> >
> > ?
> >
> > >    Static Table:  The static table (see Section 2.3.1) is a header table
> > >       used to associate static header fields to index values.
> > >
> > > "associate static header fields" ->
> > >         "statically associate commonly used header fields"
> >
> > I'm going to avoid the "commonly used" value judgment.  Whether they
> > are commonly used or not isn't pertinent.  I'll let the editors decide
> > if they would prefer your text.
> 
> I also prefer to avoid "commonly used".
> 
> >
> > > -- Section 2.4:
> > >
> > > The rationale for the additional format that forbids ever encoding a
> > > field should be repeated here (it's stated in Section 2.3).
> >
> > With the forward reference to 6.2.3, which contains an explanation, I
> > think that this is adequately covered already.
> 
> I added it here, because it is somewhat hidden in 6.2.3 (or at least less
> visible).
> 
> >
> > > -- Section 5.1:
> >
> > I think moving the figures and related text is better.
> >
> >
> > > idnits complained that it couldn't find an IANA Considerations
> > > section.  Please add an empty one (stating that there are no IANA
> > > Considerations) if/when the draft is revised.
> >
> > I tend to think that absence of "IANA Considerations" and a section
> > with "This document has no IANA actions." should be treated as
> > precisely equivalent.  But I guess that ship sailed already.
> >
> 
> I added this "IANA Considerations" section.