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

Issue 649359 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Security

Blocking:
issue 648971



Sign in to add a comment

Shill proxy crash due to failure to set MSG_NOSIGNAL flag

Project Member Reported by elawrence@chromium.org, Sep 22 2016

Issue description

Breakout bug from #648971
-----
From the writeup:

There is another bug that allows shill to be crashed more reliably. Shill sends data on a socket without specifying the MSG_NOSIGNAL flag to send(), http_proxy.cc:689:
 int ret = sockets_->Send(fd, server_data_.GetConstData(),
 server_data_.GetLength(), 0);

If the socket is already closed before send() then the kernel will signal a SIGPIPE that will kill shill.

The exploit causes just that to happen with the client socket. Normally, if the client connection is closed then the read_client_handler_ of the proxy will run the ReadFromClient callback that will stop both client and server connections. So it's hard to do a send() after that. But shill stops read_client_handler_ while it has data to send to the server. If server doesn't read out any incoming
data then the kernel receive buffer is filled. Next, the kernel send buffer of Chrome OS is filled and shill would block while sending further data to the server. So shill doesn't enable read_client_handler_ because it has further data to send to the server. 

JavaScript can then close the TURN connection and shill doesn't notice that. Finally, the server can send a single byte to the proxy. The proxy tries to
forward it to the client socket, which has been closed by chrome. And the shill process gets killed by SIGPIPE.
 
Labels: Restrict-View-SecurityTeam
Cc: ejcaruso@chromium.org
ejcaruso@: Can you take care of this too or know someone who can?
Status: Fixed (was: Available)
HTTPProxy was removed in https://chromium-review.googlesource.com/c/398300/ so we don't have to worry about this anymore.
Project Member

Comment 4 by sheriffbot@chromium.org, Nov 29 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 7 2017

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

Comment 6 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 7 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 8 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 9 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment