Re: [websec] Richard Barnes' Discuss on draft-ietf-websec-x-frame-options-09: (with DISCUSS and COMMENT)

Tobias Gondrom <tobias.gondrom@gondrom.org> Sat, 17 August 2013 22:46 UTC

Return-Path: <tobias.gondrom@gondrom.org>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C9CAC11E8257 for <websec@ietfa.amsl.com>; Sat, 17 Aug 2013 15:46:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -95.362
X-Spam-Level:
X-Spam-Status: No, score=-95.362 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, FH_HELO_EQ_D_D_D_D=1.597, FH_HOST_EQ_D_D_D_D=0.765, FM_DDDD_TIMES_2=1.999, HELO_DYNAMIC_IPADDR=2.426, HELO_EQ_DE=0.35, RDNS_DYNAMIC=0.1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eGZ0vPDomh9m for <websec@ietfa.amsl.com>; Sat, 17 Aug 2013 15:46:14 -0700 (PDT)
Received: from lvps176-28-13-69.dedicated.hosteurope.de (lvps176-28-13-69.dedicated.hosteurope.de [176.28.13.69]) by ietfa.amsl.com (Postfix) with ESMTP id 55A3921F9B26 for <websec@ietf.org>; Sat, 17 Aug 2013 15:46:07 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gondrom.org; b=pfwU8tCeIXt3wt18qIfPFDc3qZ7OItV+3kSSUL3mkCdJfnyDD1agGqlnl90mQBC8YEJjXgTTRAu/WI9neAm9QdARi51zWlAWbv2t5MVPb3UN/JLPrEjOinoGXGJMInn2; h=Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:X-Enigmail-Version:Content-Type:Content-Transfer-Encoding;
Received: (qmail 24246 invoked from network); 18 Aug 2013 00:45:45 +0200
Received: from 188-222-103-191.zone13.bethere.co.uk (HELO ?192.168.1.64?) (188.222.103.191) by lvps176-28-13-69.dedicated.hosteurope.de with ESMTPSA (DHE-RSA-AES256-SHA encrypted, authenticated); 18 Aug 2013 00:45:45 +0200
Message-ID: <520FFD18.2010008@gondrom.org>
Date: Sat, 17 Aug 2013 23:45:44 +0100
From: Tobias Gondrom <tobias.gondrom@gondrom.org>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8
MIME-Version: 1.0
To: rlb@ipv.sx
References: <20130815014121.17800.33179.idtracker@ietfa.amsl.com>
In-Reply-To: <20130815014121.17800.33179.idtracker@ietfa.amsl.com>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: draft-ietf-websec-x-frame-options@tools.ietf.org, websec@ietf.org, iesg@ietf.org, websec-chairs@tools.ietf.org
Subject: Re: [websec] Richard Barnes' Discuss on draft-ietf-websec-x-frame-options-09: (with DISCUSS and COMMENT)
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>, <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>, <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Aug 2013 22:46:19 -0000

Dear Richard,

thanks for the review and your discusses and comments.
Answers inline.
I followed all your suggestions in version-10, except for D2.
Thanks for the review and all the best,

Tobias



On 15/08/13 02:41, Richard Barnes wrote:
> Richard Barnes has entered the following ballot position for
> draft-ietf-websec-x-frame-options-09: Discuss
>
> When responding, please keep the subject line intact and reply to all
> email addresses included in the To and CC lines. (Feel free to cut this
> introductory paragraph, however.)
>
>
> Please refer to http://www.ietf.org/iesg/statement/discuss-criteria.html
> for more information about IESG DISCUSS and COMMENT positions.
>
>
> The document, along with other ballot positions, can be found here:
> http://datatracker.ietf.org/doc/draft-ietf-websec-x-frame-options/
>
>
>
> ----------------------------------------------------------------------
> DISCUSS:
> ----------------------------------------------------------------------
>
> (D1) The privacy considerations make no sense to me.  To whom is data
> being leaked?  To the browser?  To random people who send a request to a
> URI?  Do you mean that X-Frame-Options leaks information about who the
> site authorizes?  That's true, but also true of things like CORS.  If
> this is the concern, you should recommend a mitigation that's basically
> the same as what CORS does, namely varying the value of X-Frame-Options
> based on the Referer or Origin header.
Yes.
Ok. I expanded the text and explanation of the privacy considerations
section accordingly.

>
> (D2) It seems like this is a value that browsers might cache, to avoid
> unnecessary requests if the same page is framed in the future.  If this
> is something browsers do today, please say so.  

Actually I like to push back in this case, as I don't think we should go
into implementation specific details that have no effect on the bits on
the wire nor on the effective behavior of the browser.
The X-Frame-Options header determines the behaviour for every individual
requested page regarding framing in another web page in the browser.
Whether the browser caches this information and compares the request
with an existing cache from a request from before AND if the value is
identical proceeds as before or whether the browser evaluates the
X-Frame-Options header on each request should not be specified in this
draft.

>
> (D3) Shouldn't ALLOW-FROM be followed by an origin, not a URI?  In other
> words, what does it mean to send "X-Frame-Options: ALLOW-FROM
> https://example.com/this/is/a/path?query#fragment"?  

Yes. You are right we can refine the definition to "serialized-origin"
(as a subset of URI).
Please note that according to RFC6454 we need to use "serialized-origin"
here and not origin (as origin in RFC6454 refers also to a list of
origins, which would not be acceptable here).
I adjusted the text accordingly.

Note: From an editorial standpoint we can debate whether to use lower
case "serialized-origin" or capital "SERIALIZED-ORIGIN". RFC6454 uses
lower case. So I used that one, but I am open for either.


>
> (D3) In the ALLOW-FROM: what does "top level context" mean?  Do you
> really mean the top level here, as opposed to the next one up?  
Yes. And unfortunately with the problems you outlined in the next
sentence (which are also described in the security considerations
sections of the draft.)
Ted raised a related comment. So I guess the current text regarding
nesting and potential problem is not sufficiently clear. So I will add
further explanations. And I will add a reference to the security
considerations section which already contains a paragraph about this
problem. (i.e. the 2nd paragraph).


> For
> example, suppose A loads B in an iframe, and B loads C, and then C sends
> an X-Frame-Options header with ALLOW-FROM.  Is the ALLOW-FROM origin
> compared to B or A?  In either case, you should also note the attacks
> that remain.  For example, if the answer is B, then B needs to use
> X-Frame-Options as well, or else, A can maliciously frame A within B.  Or
> if the answer is A, then C is trusting A not to load any malicious
> intermediate frames B.
I added text accordingly to section 5.
(and I initiated a research query to re-confirm again that we still have
the two inconsistent browser behaviour cases here (framing page vs.
top-level frame, as I wrote in the draft).

>
>
> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
>
> (C1) In the Introduction, the phrase "secure web page" would seem to
> imply that this mechanism only applies to pages delivered over HTTPS,
> which I'm pretty sure isn't true.  Suggest just deleting "secure".
Ok. removed.

>
> (C2) In Section 2.1, the sentence starting "And the algorithm" seems to
> imply that ALLOW-FROM allows SAMEORIGIN requests as well, which I think
> you actually mean something like:
> """
> And the algorithm to compare origins from [RFC6454] SHOULD be used to
> verify that a referring page is of the same origin as the content (in the
> case of SAMEORIGIN) or that the referring page's origin is identical with
> the ALLOW-FROM URI (in the case of ALLOW-FROM). 
> """
Thank you. I changed the text to your suggestion.

>
> _______________________________________________
> websec mailing list
> websec@ietf.org
> https://www.ietf.org/mailman/listinfo/websec