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

Issue 2528813002: Fix Self-Referencing OOPIF Infinite Loop (Closed)

Created:
4 years ago by davidsac (gone - try alexmos)
Modified:
3 years, 10 months ago
Reviewers:
alexmos, dcheng, nasko
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix infinite loop of frames being created when one or more frames contain nested IFrames to one another. To reproduce this issue, run Chrome in site-per-process mode and visit either http://dudeguy409.github.io/coreferencingframe1 or https://davidsac.github.io/coreferencingframe2.html. The current check refuses to load a URL if any two ancestors in the frame tree have the same URL. It is currently inadequate for two reasons: 1) This doesn't work for OOPIFs. If the parent frames are in a different process, they will be remote frames which don't have URLs, so the check is simply skipped. (2) it's only applied in a subset of cases and doesn't handle redirects, for example. To fix these issues, this CL moves these checks to the browser process, where it's applied inside NavigationHandleImpl any time a request is started or a redirect is received. BUG=650332, 527367 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2528813002 Cr-Commit-Position: refs/heads/master@{#450728} Committed: https://chromium.googlesource.com/chromium/src/+/04fdd09f342badeb2af3a639d62a4da65d4baaa1

Patch Set 1 #

Patch Set 2 : added tests and html files for coreferencing iframes #

Patch Set 3 : add tests for self-referencing iframes w/ and w/o site-per-process #

Patch Set 4 : remove blink self-referencing solution #

Patch Set 5 : add self-referencing oopif check to core #

Patch Set 6 : add fix to find and renderframe tests #

Total comments: 48

Patch Set 7 : Add tests and small fixes #

Patch Set 8 : Add |state_| change in |WillStartRequest| and |WillRedirectRequest| #

Total comments: 45

Patch Set 9 : small fixes and renaming #

Patch Set 10 : small fixes and renaming #

Patch Set 11 : made small fix to test #

Patch Set 12 : added log stmts #

Patch Set 13 : rebased and added log stmts #

Patch Set 14 : small fix #

Patch Set 15 : fix broken test case and remove log statements #

Patch Set 16 : actually fix broken test #

Total comments: 31

Patch Set 17 : commented and cleaned up tests #

Patch Set 18 : commented and cleaned up tests #

Total comments: 2

Patch Set 19 : make EqualIgnoringFragmentIdentifier more efficient #

Total comments: 2

Patch Set 20 : rename variables and remove FIXME #

Patch Set 21 : replace old EqualsIgnoringRef with new version #

Patch Set 22 : rebase #

Total comments: 2

Patch Set 23 : refactor allowedToLoadFrame conditional #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -34 lines) Patch
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +37 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +168 lines, -2 lines 0 comments Download
A content/test/data/coreferencingframe_1.html View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
A content/test/data/coreferencingframe_2.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
A content/test/data/page_with_meta_refresh_frame.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 87 (59 generated)
davidsac (gone - try alexmos)
Hi Nasko and Alex, Could you please review this CL? A few lengthy notes: I ...
4 years ago (2016-12-21 19:26:08 UTC) #16
alexmos
[+site-isolation-reviews] Thanks! Some initial comments below. Also, one correction in the description: > Currently, the ...
3 years, 12 months ago (2016-12-28 00:26:00 UTC) #17
davidsac (gone - try alexmos)
https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc File content/browser/find_request_manager_browsertest.cc (left): https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc#oldcode322 content/browser/find_request_manager_browsertest.cc:322: if (cross_process) On 2016/12/28 00:25:59, alexmos wrote: > Can ...
3 years, 11 months ago (2017-01-03 19:29:35 UTC) #18
alexmos
https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc File content/browser/find_request_manager_browsertest.cc (left): https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc#oldcode322 content/browser/find_request_manager_browsertest.cc:322: if (cross_process) On 2017/01/03 19:29:35, davidsac wrote: > On ...
3 years, 11 months ago (2017-01-03 22:12:05 UTC) #19
davidsac (gone - try alexmos)
https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc File content/browser/find_request_manager_browsertest.cc (left): https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc#oldcode322 content/browser/find_request_manager_browsertest.cc:322: if (cross_process) On 2017/01/03 22:12:05, alexmos wrote: > On ...
3 years, 11 months ago (2017-01-03 23:14:18 UTC) #20
alexmos
https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc File content/browser/find_request_manager_browsertest.cc (left): https://codereview.chromium.org/2528813002/diff/100001/content/browser/find_request_manager_browsertest.cc#oldcode322 content/browser/find_request_manager_browsertest.cc:322: if (cross_process) On 2017/01/03 23:14:18, davidsac wrote: > On ...
3 years, 11 months ago (2017-01-04 22:35:11 UTC) #21
davidsac (gone - try alexmos)
Hi Alex, I have addressed all of your comments. I think we are ready for ...
3 years, 11 months ago (2017-01-06 00:44:58 UTC) #26
alexmos
Thanks, this is getting there! A few more comments below. https://codereview.chromium.org/2528813002/diff/140001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2528813002/diff/140001/content/browser/frame_host/navigation_handle_impl.cc#newcode824 ...
3 years, 11 months ago (2017-01-06 02:27:30 UTC) #27
alexmos
Oh, before I forget, let's also add 527367 as a bug reference in the description.
3 years, 11 months ago (2017-01-11 18:07:38 UTC) #38
davidsac (gone - try alexmos)
Hey Alex, I have addressed all of your comments and got the tests working again. ...
3 years, 11 months ago (2017-01-19 18:26:24 UTC) #45
alexmos
Thanks, this is almost there! Just a few more minor comments. https://codereview.chromium.org/2528813002/diff/140001/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): ...
3 years, 11 months ago (2017-01-19 23:45:54 UTC) #46
davidsac (gone - try alexmos)
https://codereview.chromium.org/2528813002/diff/300001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2528813002/diff/300001/content/browser/frame_host/navigation_handle_impl.cc#newcode840 content/browser/frame_host/navigation_handle_impl.cc:840: if (url_.SchemeIs("about")) { On 2017/01/19 23:45:53, alexmos wrote: > ...
3 years, 11 months ago (2017-01-24 01:16:39 UTC) #51
alexmos
Thanks! LGTM
3 years, 11 months ago (2017-01-24 22:39:29 UTC) #52
davidsac (gone - try alexmos)
Hi Daniel, Could you please review this CL for OWNER approval of the modified WebKit ...
3 years, 10 months ago (2017-01-27 22:21:40 UTC) #55
davidsac (gone - try alexmos)
Hi Daniel, Could you please review this CL for OWNER approval of the modified WebKit ...
3 years, 10 months ago (2017-01-27 22:23:00 UTC) #57
dcheng
https://codereview.chromium.org/2528813002/diff/340001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2528813002/diff/340001/content/browser/frame_host/navigation_handle_impl.cc#newcode61 content/browser/frame_host/navigation_handle_impl.cc:61: url2.ReplaceComponents(replacements)); We (or more precisely, csharrison@) has gone to ...
3 years, 10 months ago (2017-01-28 01:51:44 UTC) #59
davidsac (gone - try alexmos)
Hey dcheng, could you take a look at my attempt to make EqualIgnoringFragmentIdentifier more efficient?
3 years, 10 months ago (2017-02-07 19:35:56 UTC) #60
nasko
drive-by comment. https://codereview.chromium.org/2528813002/diff/360001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2528813002/diff/360001/content/browser/frame_host/navigation_handle_impl.cc#newcode59 content/browser/frame_host/navigation_handle_impl.cc:59: bool EqualIgnoringFragmentIdentifier(const GURL& a, const GURL& b) ...
3 years, 10 months ago (2017-02-07 19:51:20 UTC) #61
dcheng
On 2017/02/07 19:51:20, nasko (very slow) wrote: > drive-by comment. > > https://codereview.chromium.org/2528813002/diff/360001/content/browser/frame_host/navigation_handle_impl.cc > File ...
3 years, 10 months ago (2017-02-08 04:35:17 UTC) #62
nasko
On 2017/02/08 04:35:17, dcheng wrote: > On 2017/02/07 19:51:20, nasko (very slow) wrote: > > ...
3 years, 10 months ago (2017-02-08 17:01:59 UTC) #63
davidsac (gone - try alexmos)
Hi Daniel, This CL is ready for another round of reviews. Thanks. https://codereview.chromium.org/2528813002/diff/340001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc ...
3 years, 10 months ago (2017-02-10 18:44:26 UTC) #65
dcheng
LGTM with a minor nit https://codereview.chromium.org/2528813002/diff/420001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2528813002/diff/420001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode472 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:472: return true; Nit: it's ...
3 years, 10 months ago (2017-02-12 08:34:59 UTC) #71
davidsac (gone - try alexmos)
Hi Nasko, Please feel free to take another look at this CL if you would ...
3 years, 10 months ago (2017-02-14 00:49:11 UTC) #74
davidsac (gone - try alexmos)
Hi Dcheng, I made the fix https://codereview.chromium.org/2528813002/diff/420001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2528813002/diff/420001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode472 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:472: return true; On ...
3 years, 10 months ago (2017-02-14 00:50:03 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528813002/440001
3 years, 10 months ago (2017-02-15 01:06:59 UTC) #80
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/282408)
3 years, 10 months ago (2017-02-15 03:34:15 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528813002/440001
3 years, 10 months ago (2017-02-15 15:32:29 UTC) #84
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 17:07:15 UTC) #87
Message was sent while issue was closed.
Committed patchset #23 (id:440001) as
https://chromium.googlesource.com/chromium/src/+/04fdd09f342badeb2af3a639d62a...

Powered by Google App Engine
This is Rietveld 408576698