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

Richard Barnes <rlb@ipv.sx> Mon, 19 August 2013 13:38 UTC

Return-Path: <rlb@ipv.sx>
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 4846511E8277 for <websec@ietfa.amsl.com>; Mon, 19 Aug 2013 06:38:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.784
X-Spam-Level:
X-Spam-Status: No, score=-2.784 tagged_above=-999 required=5 tests=[AWL=0.192, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 oDSlAbTQpWZx for <websec@ietfa.amsl.com>; Mon, 19 Aug 2013 06:38:20 -0700 (PDT)
Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by ietfa.amsl.com (Postfix) with ESMTP id 36C3A11E8102 for <websec@ietf.org>; Mon, 19 Aug 2013 06:38:18 -0700 (PDT)
Received: by mail-ob0-f177.google.com with SMTP id f8so580832obp.8 for <websec@ietf.org>; Mon, 19 Aug 2013 06:38:16 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1p3ogPlvNw52t1BfMWpwgQpHTQPG8BfiQX+ZGiBnXeU=; b=Cv+UVDPc1Jr9187Aez1n05b1qo31CzCZ2zkSX74BDIl7OpXdwlQ7ZIIfNKIEe2qyOP hN/L+EA5Dar/2qKsepjjKE3DwO2M9FX9FeYeph5tieZ1FPpM1GycvVsaKdm8cjRlafqY /pFjJ98NGa35aTKDBEMNTl4dkRElLEElw0EYXAnCqX1KSDPetA9rK2BE3iR/QkFpVBUw h1AkkwJycqZ+gXK0+o8r9I1of7cWSW6rYffvP9C1SBCif++kK2klA369fVT1w83AYZGb 0KiGZD7PNVVnv+oDS0LvBlmXlB6H0SoKLN3qJYzDKhOG2QCQGiqnw5Oihlp6HCaE1gWl 5atg==
X-Gm-Message-State: ALoCoQmKJT9KmV4yBbYhaSU2H9Bh/NF5tO/638vXP9/R/1XFiJocabkXacivbeMTSPrUJqbUMT7s
MIME-Version: 1.0
X-Received: by 10.60.115.164 with SMTP id jp4mr13044763oeb.19.1376919496689; Mon, 19 Aug 2013 06:38:16 -0700 (PDT)
Received: by 10.60.31.74 with HTTP; Mon, 19 Aug 2013 06:38:16 -0700 (PDT)
X-Originating-IP: [192.1.255.218]
In-Reply-To: <370C9BEB4DD6154FA963E2F79ADC6F2E27BAD2A7@DEN-EXDDA-S12.corp.ebay.com>
References: <20130815014121.17800.33179.idtracker@ietfa.amsl.com> <370C9BEB4DD6154FA963E2F79ADC6F2E27BAD2A7@DEN-EXDDA-S12.corp.ebay.com>
Date: Mon, 19 Aug 2013 09:38:16 -0400
Message-ID: <CAL02cgQSQWAfeZNtEwtNrbajSx8Q7ACyjZ0gEaYB8Oj0HL0jOA@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: "Hill, Brad" <bhill@paypal-inc.com>
Content-Type: multipart/alternative; boundary="089e01161b467c181b04e44d0d5b"
Cc: "draft-ietf-websec-x-frame-options@tools.ietf.org" <draft-ietf-websec-x-frame-options@tools.ietf.org>, "websec@ietf.org" <websec@ietf.org>, The IESG <iesg@ietf.org>, "websec-chairs@tools.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: Mon, 19 Aug 2013 13:38:34 -0000

On Fri, Aug 16, 2013 at 7:44 PM, Hill, Brad <bhill@paypal-inc.com> wrote:

> Additional comments inline.
> ________________________________________
>
>
> (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"?
>
> [Hill, Brad] Agreed.


Great.



> (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?  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.
>
> [Hill, Brad]  This really does mean the top/final origin value in a frame
> ancestor
> chain walk.  Browsers have implemented X-Frame-Options to check the
> Origin context that is topmost in the window or tab.  (the _top target,
> representing the full, original browsing context, not just the immediate
> parent frame)  This could be clarified perhaps, but is not incorrect.
>

OK, that's fine.  Could you please just note the risk that an intermediate
frame in a nested scenario could do bad things?  For example, in the
Security Considerations:
"""
When SAMEORIGIN or ALLOW-FROM values are used, there is some residual risk
in nested framing scenarios.  For example, suppose that A loads B in an
iframe; B loads C; and C sends an X-Frame-Options header with the value
"ALLOW-FROM A".  The browser will allow this setup, because the ALLOW-FROM
origin sent by C matches the top-level origin.  However, the intermediate
framing page B may still be able to perform clickjacking attacks against A.
 Thus, sites using this mechanism should keep in mind that by emitting an
X-Frame-Options header with value SAMEORIGIN or ALLOW-FROM, they are not
only granting permission to the indicated origin (the same origin, or the
ALLOW-FROM origin), but also to any origins included as frames within that
origin.
"""

Thanks,
--Richard