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

Issue 780780 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Security



Sign in to add a comment

CrOS: Vulnerability reported in net-misc/curl

Project Member Reported by vomit.go...@appspot.gserviceaccount.com, Nov 2 2017

Issue description

Automated analysis has detected that the following third party packages have had vulnerabilities publicly reported. 

NOTE: There may be several bugs listed below - in almost all cases, all bugs can be quickly addressed by upgrading to the latest version of the package.

Package Name: net-misc/curl
Package Version: [cpe:/a:curl:curl:7.51.0 cpe:/a:curl:libcurl:7.51.0 cpe:/a:haxx:curl:7.51.0 cpe:/a:haxx:libcurl:7.51.0]


Advisory: CVE-2017-1000100
  Details: https://vomit.googleplex.com/advisory?id=CVE/CVE-2017-1000100
  CVSS severity score: 4.3/10.0
  Confidence: high
  Description:

When doing a TFTP transfer and curl/libcurl is given a URL that contains a very long file name (longer than about 515 bytes), the file name is truncated to fit within the buffer boundaries, but the buffer size is still wrongly updated to use the untruncated length. This too large value is then used in the sendto() call, making curl attempt to send more data than what is actually put into the buffer. The endto() function will then read beyond the end of the heap based buffer. A malicious HTTP(S) server could redirect a vulnerable libcurl-using client to a crafted TFTP URL (if the client hasn't restricted which protocols it allows redirects to) and trick it to send private memory contents to a remote server over UDP. Limit curl's redirect protocols with --proto-redir and libcurl's with CURLOPT_REDIR_PROTOCOLS.
Advisory: CVE-2017-1000254
  Details: https://vomit.googleplex.com/advisory?id=CVE/CVE-2017-1000254
  CVSS severity score: 5/10.0
  Confidence: high
  Description:

libcurl may read outside of a heap allocated buffer when doing FTP. When libcurl connects to an FTP server and successfully logs in (anonymous or not), it asks the server for the current directory with the `PWD` command. The server then responds with a 257 response containing the path, inside double quotes. The returned path name is then kept by libcurl for subsequent uses. Due to a flaw in the string parser for this directory name, a directory name passed like this but without a closing double quote would lead to libcurl not adding a trailing NUL byte to the buffer holding the name. When libcurl would then later access the string, it could read beyond the allocated heap buffer and crash or wrongly access data beyond the buffer, thinking it was part of the path. A malicious server could abuse this fact and effectively prevent libcurl-based clients to work with it - the PWD command is always issued on new FTP connections and the mistake has a high chance of causing a segfault. The simple fact that this has issue remained undiscovered for this long could suggest that malformed PWD responses are rare in benign servers. We are not aware of any exploit of this flaw. This bug was introduced in commit [415d2e7cb7](https://github.com/curl/curl/commit/415d2e7cb7), March 2005. In libcurl version 7.56.0, the parser always zero terminates the string but also rejects it if not terminated properly with a final double quote.


 
Owner: mnissler@chromium.org
Status: Started (was: Untriaged)
I'll pull 7.56.0 which is already available upstream and has all the fixes.
Labels: Security_Severity-Medium M-63 Security_Impact-Stable
Regarding severity, both issues are triggered by a malicious server. So we're essentially looking at what parts of the system access servers via curl and how much control attackers have over the URL we request.

A number of system packages (update_engine, rsyslog, etc.) depend on curl. Some of them can be tricked into talking to a malicious server even though they intend to connect to trusted servers, e.g. when update_engine downloads payloads via http using the p2p feature. That's the first one I found, there's probably more like that.

Note that Chrome itself doesn't curl, so this isn't easily exploitable by arbitrary web sites.

Given the above, I'll set medium severity, and we should probably try and merge to 63.
Project Member

Comment 3 by sheriffbot@chromium.org, Nov 8 2017

Labels: -Pri-2 Pri-1
Owner: wonderfly@chromium.org
Turns out wonderfly@ already has a CL going for 7.56.1: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/751700

Passing ownership.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/aef552f9f7d9d69268c63338b77c5837249f20ed

commit aef552f9f7d9d69268c63338b77c5837249f20ed
Author: Daniel Wang <wonderfly@google.com>
Date: Mon Nov 13 15:42:11 2017

curl: upgraded package to upstream

Upgraded net-misc/curl to version 7.56.1 for all

BUG=b:68794751
BUG= chromium:780780 
TEST=emerge-${BOARD} curl

Change-Id: Idf14ced868a1422de7aa69d34929b1fd83935ccb
Reviewed-on: https://chromium-review.googlesource.com/751700
Commit-Ready: Mattias Nissler <mnissler@chromium.org>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/aef552f9f7d9d69268c63338b77c5837249f20ed/metadata/md5-cache/net-misc/curl-7.56.1
[modify] https://crrev.com/aef552f9f7d9d69268c63338b77c5837249f20ed/net-misc/curl/Manifest
[rename] https://crrev.com/aef552f9f7d9d69268c63338b77c5837249f20ed/net-misc/curl/curl-7.56.1.ebuild

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 13 2017

Labels: merge-merged-release-R63-10032.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/d189182feaf8ae329108ebd563ae2f9b49450f0d

commit d189182feaf8ae329108ebd563ae2f9b49450f0d
Author: Daniel Wang <wonderfly@google.com>
Date: Mon Nov 13 22:21:10 2017

curl: upgraded package to upstream

Upgraded net-misc/curl to version 7.56.1 for all

BUG=b:68794751
BUG= chromium:780780 
TEST=emerge-${BOARD} curl

Change-Id: Idf14ced868a1422de7aa69d34929b1fd83935ccb
Reviewed-on: https://chromium-review.googlesource.com/751700
Commit-Ready: Mattias Nissler <mnissler@chromium.org>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit aef552f9f7d9d69268c63338b77c5837249f20ed)
Reviewed-on: https://chromium-review.googlesource.com/766868
Commit-Queue: Daniel Wang <wonderfly@google.com>

[rename] https://crrev.com/d189182feaf8ae329108ebd563ae2f9b49450f0d/metadata/md5-cache/net-misc/curl-7.56.1
[modify] https://crrev.com/d189182feaf8ae329108ebd563ae2f9b49450f0d/net-misc/curl/Manifest
[rename] https://crrev.com/d189182feaf8ae329108ebd563ae2f9b49450f0d/net-misc/curl/curl-7.56.1.ebuild

Project Member

Comment 7 by sheriffbot@chromium.org, Nov 14 2017

Status: Fixed (was: Started)
Please mark security bugs as fixed as soon as the fix lands, and before requesting merges. This update is based on the merge- labels applied to this issue. Please reopen if this update was incorrect.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

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

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

Comment 9 by sheriffbot@chromium.org, Feb 20 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
Project Member

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

Labels: -M-63 M-65

Sign in to add a comment