New issue
Advanced search Search tips

Issue 687863 link

Starred by 0 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Denied of service in chrome(iOS) just using a link

Reported by zyzengst...@gmail.com, Feb 2 2017

Issue description

Steps to reproduce the problem:
1. Open the following poc page html,then click this link:

<a href="data:text/html,<script>var x=window;x.location='about:newtab';</script>" style="font-size:100px" target="_blank">click me</a>

Or you can visit online poc:
https://api.lightrains.org/poc/1.html

2. Then you will find chrome(iOS) try to open a "new tab" ,but the UI interface of chrome will crash.So it could cause a DoS attack,you must kill the chrome process to restart it.

What is the expected behavior?

What went wrong?
Chrome crashes and needs to be killed and restarted.

Did this work before? N/A 

Chrome version: <Copy from: 'about:version'>  Channel: stable
OS Version: 10.2.1
Flash Version:

 
IMG_2895.PNG
22.6 KB View Download
IMG_2896.PNG
38.5 KB View Download
Chrome(iOS) version:
56.0.2924.79 (Official Build) stable (64-bit)

Comment 2 by xzhou@chromium.org, Feb 2 2017

Components: Blink>JavaScript UI>Browser>Navigation
Labels: -Restrict-View-SecurityTeam Security_Impact-Stable Security_Severity-Low
Status: Available (was: Unconfirmed)

Comment 3 by xzhou@chromium.org, Feb 2 2017

Labels: allpublic
Components: -Blink>JavaScript
No blink on iOS

Comment 5 Deleted

Any follow-ups on this issue?
Are any experts dealing with it?
Cc: eugene...@chromium.org justincohen@chromium.org
Components: UI>Browser>NewTabPage
I can reproduce the issue on iPhone7. There is no crash in Chrome, its just that the NTP is corrupted.
Chrome can be used again by swiping on omnibox to switch tabs, or doing pull to refresh in the corrupted tab will bring the NTP back to normal.
Cc: -justincohen@chromium.org rohitrao@chromium.org
Owner: justincohen@chromium.org
Yes,My report title is not quite right.I did not find it can be used again by swiping on omnibox to switch tabs at that time.

So,I have tried to update my POC(#comment5,I delete it,because I don't think it's perfect)

In #comment 5,if user have turned off "block popup-window",so that POC will open a lot of windows in a moment.If so,you can't swipe on omnibox to switch tabs to bring the NTP back to normal.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 9 2017

Status: Assigned (was: Available)
Components: -UI>Browser>NewTabPage
Cc: -eugene...@chromium.org justincohen@chromium.org
Owner: eugene...@chromium.org
eugenebut@ Seems to be related to web_controller push state -- web controller is showing about blank but not trying to load a native controller.


Cc: -justincohen@chromium.org eugene...@chromium.org
Components: -UI>Browser>Navigation UI>Browser>Core
Labels: -Type-Bug-Security -Security_Severity-Low -Security_Impact-Stable Type-Bug
Owner: justincohen@chromium.org
Justin, web controlled has successfully loaded about:blank web page in the new window. Why do you think it should try to load a native controller for a web page? This looks like a bug in chrome layer, which does not present omnibox fox some reason. Can you take a look?
about:newtab loads the ntp, not about:blank.  if wkwebview is loading about:blank for whatever reason than chrome should get a url that reflects that.  if we are hiding the toolbar it's probably because the url appears to be a full-screen-hack-NTP.
WKWebView loads about:blank, however lastCommittedURL is this one:
data:text/html,%3Cscript%3Evar%20x=window;x.location='about:newtab';%3C/script%3E

That seems to be WAI from WebController's perspective.

I suspect that NTP just freaks out because of this data URL and hides omnibox for some reason. 
Components: Mobile>WebView>Glue
DCHECK fires in CRWWebController, which is also a problem that needs to be fixed, so adding Mobile>WebView>Glue label.
eugenebut@ 
BVC -updateToolbar is checking:
   [tab navigationManager]->GetVisibleItem()->GetURL(), which is returning 
   "chrome://newtab/"

BVC is doing what I think it's supposed to be doing...


Cc: -eugene...@chromium.org justincohen@chromium.org
Owner: eugene...@chromium.org
Oh, I see now. So ios/web reports that URL is native content, but did not present the native context. Thanks for pointing me to the code. I guess the right fix would be to load about:blank instead and correctly report lastCommittedURL.
Project Member

Comment 21 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/657495c5b5591a13ca826a373ada0c0038d79b61

commit 657495c5b5591a13ca826a373ada0c0038d79b61
Author: eugenebut <eugenebut@chromium.org>
Date: Fri Jun 02 18:00:44 2017

Do not rewrite about urls to chrome://  for cetain renderer-initated loads

This fixes the bug where about:newtab gets rewritten to chrome://newtab
and it corrupts omnibox UI. Chrome layer expects that chrome://newtab
will be NTP, but about:newtab can be loaded as a regular web page as
proven in  crbug.com/687863  POS.

This CL also enables testWindowOpenWithAboutNewTabScript, adds tests
for URLRewriting and allows |currentURLWithTrustLevel:| to return all kinds
of about:// urls (old workaround was put in place for UIWebView which used
JS overrides for window.open).

BUG= 687863 

Review-Url: https://codereview.chromium.org/2918013002
Cr-Commit-Position: refs/heads/master@{#476716}

[modify] https://crrev.com/657495c5b5591a13ca826a373ada0c0038d79b61/ios/chrome/browser/web/window_open_by_dom_egtest.mm
[modify] https://crrev.com/657495c5b5591a13ca826a373ada0c0038d79b61/ios/web/navigation/crw_session_controller.mm
[modify] https://crrev.com/657495c5b5591a13ca826a373ada0c0038d79b61/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/657495c5b5591a13ca826a373ada0c0038d79b61/ios/web/web_state/ui/crw_web_controller.mm

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
about:newtab is displayed in omnibox and toolbar is always displayed after running the testcase from original bug report.

Verified on M61.0.3112.0 canary.
iPhone SE, iOS9.3.5
iPhone5, iOS 10.2

Sign in to add a comment