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

Issue 766592 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Buried. Ping if important.
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug-Security

Blocking:
issue 680969



Sign in to add a comment

Security: `\n` and `<` in `ping` aren't completely blocked.

Reported by ma7h1a...@gmail.com, Sep 19 2017

Issue description

AFFECTED PRODUCTS
--------------------
chrome 61.0.3163.91 stable
chrome 62.0.3202.18 beta

DESCRIPTION
--------------------
chrome use a security feature
Blocking resources whose URLs contain both `\n` and `<` characters.
 issue 680970 

but with 2 ways we could bypass it

1. iframe name
2. a ping

so here comes the poc , and bypass.gif show how to perform this attack.
 
poc1.html
180 bytes View Download
poc2.html
177 bytes View Download
bypass.gif
1.1 MB View Download
Cc: mkwst@chromium.org
Components: Blink>HTML>Parser
Summary: Security: Malformed URLs incompletely blocked (was: Security: bypass chrome security feature)
I don't think this change was intended to block all malformed HTML. Mike?

Comment 2 by mkwst@chromium.org, Sep 19 2017

I don't understand the exploit in POC1. Can you help me figure out what the risk is?

POC2 looks like it ought to be blocking the ping. If it's not, I agree that that's that's a bug in the mitigation.

Comment 3 by mkwst@chromium.org, Sep 19 2017

Cc: -mkwst@chromium.org
Owner: mkwst@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: Security: `\n` and `<` in `ping` aren't completely blocked. (was: Security: Malformed URLs incompletely blocked )
Ah. Ping is special. :P It accepts a space-delimited series of URLs that are pinged in sequence. So, if you can inject on the same line as the interesting data, it will send the ping, followed by a number of same-origin pings. Hrm. Should be straightforward to work around, but the spec will end up being ugly. :(

Comment 4 by ma7h1a...@gmail.com, Sep 19 2017

hello,thanks for replay
for POC1
as you said in  issue 680970  
<img src='` eats the page until the next `'`
here comes the same problem:
<iframe name=' eats the page until the next `'` ,too.
if an attacker inject the next href=attacker.com
then the user data is stolen by attacker.
so it's maybe not a bug in this mitigation , but shows a similar problem that this mitigation could not solve

for POC2
the POC2 shows it could not block ping request
so it's a bug in this mitigation

Comment 5 by ma7h1a...@gmail.com, Sep 19 2017

or, in an word, there is need for an attacker to stolen the data in iframe src , he could simply use iframe name to eat them , and use a valid iframe src to send those data

Comment 6 by mkwst@chromium.org, Sep 19 2017

Blocking: 680969

Comment 7 by mkwst@chromium.org, Sep 19 2017

Put a patch up at https://chromium-review.googlesource.com/c/chromium/src/+/672845 for POC2.

I agree that POC1 is a potential issue. But it's not one that the existing mitigation is meant to solve. I'll mark this as blocking the wrapper bug 680969 so we can come back to it once we feel like we have a handle on direct leakage.

Comment 8 by palmer@chromium.org, Sep 19 2017

Labels: Security_Severity-Low M-63 OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows Pri-2
Does any of the markup leak cross-domain or over the network? That'd be my first concern regarding severity.

This could also be part of a technique to induce DOM XSS, perhaps? But that would seem to party depend on the behavior of the web contents, and not just Chrome.

Calling it Severity-Low for the time being.

Comment 9 by ma7h1a...@gmail.com, Sep 19 2017

yes, but this issue is bypass a existing mitigation.
the problem itself do not need to peroform a XSS attack (this is not script to be eval),instead,it just need to insert an element.
like a CSP-Bypass I reported before  issue 747847 ,it was marked as medium. (CSP bypass need a XSS first)
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 20 2017

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

commit 70feb2c848996e0d09ba19502fc0fe02f8754e5f
Author: Mike West <mkwst@chromium.org>
Date: Wed Sep 20 09:41:16 2017

Block `ping` attributes containing `\n` and `<`.

We're blocking requests to URLs that containin both `\n` and `<`; given
`ping`'s space-delimited semantics, to apply the same mitigation we'll
need to scan the initial attribute value, rather than relying on each
URL found after splitting the attribute value on whitespace.

Bug:  766592 
Change-Id: Ibdd52ee63a37ef4e1998cf10dc860648cba929c5
Reviewed-on: https://chromium-review.googlesource.com/672845
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503095}
[add] https://crrev.com/70feb2c848996e0d09ba19502fc0fe02f8754e5f/third_party/WebKit/LayoutTests/http/tests/security/dangling-markup/a-ping-expected.txt
[add] https://crrev.com/70feb2c848996e0d09ba19502fc0fe02f8754e5f/third_party/WebKit/LayoutTests/http/tests/security/dangling-markup/a-ping.html
[modify] https://crrev.com/70feb2c848996e0d09ba19502fc0fe02f8754e5f/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Project Member

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

Labels: Security_Impact-Head
Project Member

Comment 12 by sheriffbot@chromium.org, Oct 18 2017

Labels: -Security_Impact-Head Security_Impact-Beta
Project Member

Comment 13 by sheriffbot@chromium.org, Dec 7 2017

Labels: -Security_Impact-Beta Security_Impact-Stable
Project Member

Comment 14 by sheriffbot@chromium.org, Jan 25 2018

Labels: -M-63 M-64

Comment 15 by f...@chromium.org, Feb 14 2018

Status: Fixed (was: Assigned)
Based on #10, it looks like this has been fixed.
Project Member

Comment 16 by sheriffbot@chromium.org, Feb 15 2018

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: reward-topanel
Labels: -reward-topanel reward-0
I'm afraid the VRP panel declined to reward for this bug. Thanks for the report!
Project Member

Comment 19 by sheriffbot@chromium.org, Mar 27 2018

Labels: -M-64 M-65
Project Member

Comment 20 by sheriffbot@chromium.org, May 24 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

Sign in to add a comment