Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Issue 20822002: 'X-Frame-Options: SAMEORIGIN' should check all ancestor frames. (Closed)

Created:
7 years, 4 months ago by Mike West
Modified:
7 years, 2 months ago
CC:
blink-reviews, dglazkov+blink, Nate Chapin, eae+blinkwatch, gavinp+loader_chromium.org
Visibility:
Public.

Description

'X-Frame-Options: SAMEORIGIN' should check all ancestor frames. Currently, XFO performs a same origin check only against the top-level frame in a document's ancestor chain. As lcamtuf notes in [1], "Any site that allows a rogue ad to be displayed in an IFRAME; or that frames third-party content for other reasons (e.g., iGoogle, Image Search results, Facebook gadgets), is effectively not protected, because the framed content from evil.com can load and arbitrarily decorate any page in the same origin as the top-level window, and entice the user to interact with it." This patch adjusts Blink's behavior to check each of a document's ancestors, and blocks the load if any aren't same-origin with the document being loaded. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=725490 BUG=250309 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158466

Patch Set 1 #

Patch Set 2 : tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -1 line) Patch
A LayoutTests/http/tests/security/XFrameOptions/resources/x-frame-options-parent-same-origin-ancestor.html View 1 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-deny.html View 1 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-deny-expected.txt View 1 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Mike West
Hi Tom, Adam. This patch follows up on our earlier discussion around X-Frame-Options and ancestors ...
7 years, 4 months ago (2013-07-26 22:10:08 UTC) #1
abarth-chromium
What data did we get back from the UseCounter?
7 years, 4 months ago (2013-07-27 00:12:13 UTC) #2
Mike West
On 2013/07/27 00:12:13, abarth wrote: > What data did we get back from the UseCounter? ...
7 years, 4 months ago (2013-07-27 16:10:28 UTC) #3
Mike West
On 2013/07/27 16:10:28, Mike West wrote: > On 2013/07/27 00:12:13, abarth wrote: > > What ...
7 years, 4 months ago (2013-07-27 19:08:50 UTC) #4
Tom Sepez
Drive-by: ping. What does it take to get this going again? Is it time to ...
7 years, 2 months ago (2013-09-26 16:55:37 UTC) #5
Mike West
On 2013/09/26 16:55:37, Tom Sepez wrote: > Drive-by: ping. What does it take to get ...
7 years, 2 months ago (2013-09-26 17:35:33 UTC) #6
Mike West
On 2013/09/26 17:35:33, Mike West wrote: > On 2013/09/26 16:55:37, Tom Sepez wrote: > > ...
7 years, 2 months ago (2013-09-27 09:47:18 UTC) #7
abarth-chromium
lgtm I suspect we'll need to roll this back, but we can try it.
7 years, 2 months ago (2013-09-27 16:46:16 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/20822002/5001
7 years, 2 months ago (2013-09-27 16:46:41 UTC) #9
commit-bot: I haz the power
7 years, 2 months ago (2013-09-27 19:29:31 UTC) #10
Message was sent while issue was closed.
Change committed as 158466

Powered by Google App Engine
This is Rietveld 408576698