New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758745 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Security



Sign in to add a comment

Security: Hostname not elided securely

Project Member Reported by elawrence@chromium.org, Aug 24 2017

Issue description

Chrome Version: 62.0.3194.0
OS: Android O

What steps will reproduce the problem?
(1) Visit https://manage-myaccount.paypal.com-webapps.verifcheck.com/signin/ by clicking the link in Outlook App.

What is the expected result?

Expect: URL in UI elides securely, showing e.g. https://...verifcheck.com/

Actual: URL elided incorrectly, showing "https://manage-myaccount.paypal.com" in the UI.
 
Spoofy.jpg
39.3 KB View Download

Comment 1 by est...@chromium.org, Aug 24 2017

Cc: yus...@chromium.org cjgrant@chromium.org mgiuca@chromium.org
Labels: -Type-Bug Security_Severity-High Security_Impact-Stable Type-Bug-Security
Status: Available (was: Untriaged)
This bug has already been made public and we have similar bugs on other Chrome variants that are public, but I'm marking as a security bug out of an abundance of caution. Technically this is high severity according to our guidelines.

cjgrant, is your URL elision work going in a direction where it could be re-used on Chrome Custom Tabs?

Comment 2 by yus...@chromium.org, Aug 24 2017

More than the eliding logic, it seems like LocationBarLayout.splitPathFromUrlDisplayText(String) is not working correctly which has been our shared code within Android for getting the domain for a while. So even if we did have enough space, we were going to show the wrong domain if I am understanding this correctly.

I would be happy to update it if we believe this is high severity, but I probably will need some direction on what logic to use.
Re #2: The text displayed in this scenario is part of the Hostname component of the URL; the path is not shown. 

The problem is that the Hostname component exceeds the width of the display area, allowing truncation of the displayed text to result in spoofing.

Comment 4 by yus...@chromium.org, Aug 24 2017

But the hostname should have included verifcheck.com right? What I mean is if we only change the eliding logic and not change how we get the hostname, it will still be incorrect.
Re #4: The hostname /does/ include the "-webapps.verifcheck.com" text, but that text isn't visible in portrait mode due to truncation. If the device is rotated to landscape mode (such that there's more horizontal display area) it is not truncated.
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 25 2017

Labels: M-60
Project Member

Comment 7 by sheriffbot@chromium.org, Aug 25 2017

Labels: -Pri-2 Pri-1
Cc: fgor...@chromium.org
estark, to your question of whether reworked elision code could help here:

This field is Android UI, so AFAIK, its font rendering is Android-specific, and does not use gfx::RenderText (the mechanism elision uses to measure rendered text size).

In theory, and in *general*, Android Java code could call C++ eliding methods with a callback to some Android text measurement system, but that sounds like a long-shot.  In the Android omnibox case, I have no idea how much field/font/UI magic is going on behind the scenes.

cc'ing fgorski@, who may be able to expand on this.
Cc: twelling...@chromium.org tedc...@chromium.org
Adding owners to CC: Ted and Theresa.

Had a quick look:

If I understand the code correctly, the URL is shortened in: 
UrlBar#limitDisplayableLenght()

If I understand that code correctly, we might have the following problems:
* We are eliding the text based on the length of char sequence, and not available display frame.
* allowed string size before we elide is pretty big: 1000 on low-end, 4000 elsewhere.
* We are eliding someplace the middle of allowed span, leaving around max length of characters (therefore no effect for the URL above).
* We are using custom code. :(

I think it should be possible to elide based on display frame size (at the cost of extra IPC), with elision span starting right after the https://, but that would still be custom code.
fgorski, separate from issues with the current custom code, there's the question of whether we can ultimately unify the elision code used here and elsewhere.

There's some work going on to make C++ elision code more generally usable.  If it were possible to have the Android omnibox call to C++ for URL shortening, one implementation could disappear.

When you said "extra IPC", were you referring to JNI calls, or something else unrelated?
I think Ted and the UI team is already planning to reuse as much of common C++ code and I would expect that applies to elision as well. It may take time. In any case Theresa and Ted are the best people to ask here.

RE: extra IPC. My comment is based on the View#getWindowVisibleDisplayFrame documentation:
...
This function requires an IPC back to the window manager to retrieve the requested information, so should not be used in performance critical code like drawing.

(This says don't do it, but it would be a trade-off between security and performance, and I think it could be done once and cached) 

https://developer.android.com/reference/android/view/View.html#getWindowVisibleDisplayFrame(android.graphics.Rect)

Also, that is the first idea that came to mind, so perhaps there is a better way of arriving that that information.

Comment 12 by ta...@google.com, Aug 28 2017

Owner: tedc...@chromium.org
Status: Assigned (was: Available)
Owner: tommycli@chromium.org
Custom Tabs and Chrome should both be calling UrlBar#scrollToTLD.  It seems like that isn't working reliably enough.  Tommy changed that most recently, so again, I'll defer to him initially.
Project Member

Comment 14 by sheriffbot@chromium.org, Sep 6 2017

Labels: -M-60 M-61
Project Member

Comment 15 by sheriffbot@chromium.org, Sep 8 2017

tommycli: Uh oh! This issue still open and hasn't been updated in the last 14 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers?

If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one?

If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
When I worked on scrollToTLD, it did seem kind of flaky sometimes. It's possible our efforts to fix the RTL hostname case made the base use case flakier.

This is a tough nut to crack.
Labels: Team-Security-UX
Project Member

Comment 18 by sheriffbot@chromium.org, Sep 23 2017

tommycli: Uh oh! This issue still open and hasn't been updated in the last 14 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers?

If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one?

If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: tommycli@chromium.org
Owner: tedc...@chromium.org
Status: Fixed (was: Assigned)
I landed a fix for omnibox alignment on Android, which should fix this:
https://chromium-review.googlesource.com/c/chromium/src/+/677881
Project Member

Comment 20 by sheriffbot@chromium.org, Sep 25 2017

Labels: Restrict-View-SecurityNotify
Labels: -M-61 M-63
Project Member

Comment 22 by sheriffbot@chromium.org, Oct 27 2017

Labels: Merge-Request-63
Project Member

Comment 23 by sheriffbot@chromium.org, Oct 27 2017

Labels: -Merge-Request-63 Merge-Review-63 Hotlist-Merge-Review
This bug requires manual review: M63 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-63
No merge needed.  My fix landed in 63.0.3223.0
Labels: Release-0-M63
Project Member

Comment 26 by sheriffbot@chromium.org, Jan 1 2018

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: pelizzi@google.com

Sign in to add a comment