Bug 22772 - curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01], CVE-2018-0500, CVE-2018-14618
Summary: curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01], CVE-2018-...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA6-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks: 22457
  Show dependency treegraph
 
Reported: 2018-03-14 14:21 CET by David Walser
Modified: 2018-10-30 19:02 CET (History)
7 users (show)

See Also:
Source RPM: curl-7.54.1-2.5.mga6.src.rpm
CVE: CVE-2018-100012[0-2] CVE-2018-100030[01] CVE-2018-0500
Status comment: Patches available upstream


Attachments

Description David Walser 2018-03-14 14:21:04 CET
cURL has issued advisories today (March 14):
https://curl.haxx.se/docs/adv_2018-9cd6.html
https://curl.haxx.se/docs/adv_2018-97a2.html
https://curl.haxx.se/docs/adv_2018-b047.html

The issues are fixed upstream in 7.59.0 (already in Cauldron) and there are patches available.

Mageia 5 is also affected.
Comment 1 Marja Van Waes 2018-03-15 09:23:42 CET
Assigning to the registered Curl maintainer.

Assignee: bugsquad => shlomif
CC: (none) => marja11

Stig-Ørjan Smelror 2018-03-15 10:24:04 CET

CC: (none) => smelror
CVE: (none) => CVE-2018-1000120 CVE-2018-1000121 CVE-2018-1000122
Assignee: shlomif => smelror
Status comment: (none) => Patches available upstream

Comment 2 David Walser 2018-03-15 15:06:07 CET
Debian and Ubuntu have issued advisories for this on March 14 and today (15):
https://www.debian.org/security/2018/dsa-4136
https://usn.ubuntu.com/3598-1/
Comment 3 Stig-Ørjan Smelror 2018-03-18 21:32:24 CET
Working with the upstream devs to find out why the new test fails on us.

There may be a clash of patches somewhere, but I don't know what or where.

Cheers,
Stig
Comment 5 David Walser 2018-03-31 21:45:39 CEST
openSUSE has issued an advisory for this on March 24:
https://lists.opensuse.org/opensuse-updates/2018-03/msg00084.html
Comment 6 David Walser 2018-05-16 13:58:42 CEST
cURL has issued advisories today (May 16):
https://curl.haxx.se/docs/adv_2018-82c2.html
https://curl.haxx.se/docs/adv_2018-b138.html

The second one also affects Mageia 5 (the first one doesn't).

Blocks: (none) => 22457
CVE: CVE-2018-1000120 CVE-2018-1000121 CVE-2018-1000122 => CVE-2018-100012[0-2] CVE-2018-100030[01]
Summary: curl new security issues CVE-2018-100012[0-2] => curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01]

Comment 7 Stig-Ørjan Smelror 2018-05-16 15:00:36 CEST
Advisory
========

Curl has been updated to fix a security issue.

CVE-2018-1000301:
curl can be tricked into reading data beyond the end of a heap based buffer used to store downloaded content.

When servers send RTSP responses back to curl, the data starts out with a set of headers. curl parses that data to separate it into a number of headers to deal with those appropriately and to find the end of the headers that signal the start of the "body" part.

The function that splits up the response into headers is called Curl_http_readwrite_headers() and in situations where it can't find a single header in the buffer, it might end up leaving a pointer pointing into the buffer instead of to the start of the buffer which then later on may lead to an out of buffer read when code assumes that pointer points to a full buffer size worth of memory to use.

This could potentially lead to information leakage but most likely a crash/denial of service for applications if a server triggers this flaw.

We are not aware of any exploit of this flaw.

References
==========
https://curl.haxx.se/docs/adv_2018-b138.html

Files
=====

Uploaded to 5/core/updates_testing

curl-7.40.0-3.16.mga5
libcurl4-7.40.0-3.16.mga5
libcurl-devel-7.40.0-3.16.mga5
curl-examples-7.40.0-3.16.mga5
curl-debuginfo-7.40.0-3.16.mga5

from curl-7.40.0-3.16.mga5.src.rpm
Comment 8 David Walser 2018-05-16 15:17:24 CEST
Mageia 5 curl is in Bug 22457.  The Mageia 6 update will be here.  The Mageia 5 package also fixes CVE-2018-1000007, but still needs the patches for CVE-2018-1000012[0-2].
Comment 9 David Walser 2018-06-07 21:23:37 CEST
Fedora advisory for CVE-2018-100030[01] from May 25:
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/DOHQJ7DDUE5U4L6FHSUVPFQ7TAZLWSMI/
Comment 10 David Walser 2018-07-12 21:57:22 CEST
cURL has issued an advisory on July 11:
https://curl.haxx.se/docs/adv_2018-70a2.html

The issue is fixed upstream in 7.61.0.

Mageia 6 is affected but Mageia 5 is not.

Summary: curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01] => curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01], CVE-2018-0500
CVE: CVE-2018-100012[0-2] CVE-2018-100030[01] => CVE-2018-100012[0-2] CVE-2018-100030[01] CVE-2018-0500

Comment 11 David Walser 2018-07-16 19:56:49 CEST
(In reply to David Walser from comment #10)
> cURL has issued an advisory on July 11:
> https://curl.haxx.se/docs/adv_2018-70a2.html
> 
> The issue is fixed upstream in 7.61.0.

Ubuntu has issued an advisory for this on July 11:
https://usn.ubuntu.com/3710-1/
Comment 12 David Walser 2018-09-05 13:51:53 CEST
Upstream has issued an advisory today (September 5):
https://curl.haxx.se/docs/CVE-2018-14618.html

The issue is fixed upstream in 7.61.1.

Summary: curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01], CVE-2018-0500 => curl new security issues CVE-2018-100012[0-2], CVE-2018-100030[01], CVE-2018-0500, CVE-2018-14618

Comment 13 David Walser 2018-09-07 19:01:32 CEST
(In reply to David Walser from comment #12)
> Upstream has issued an advisory today (September 5):
> https://curl.haxx.se/docs/CVE-2018-14618.html

Debian has issued an advisory for this on September 5:
https://www.debian.org/security/2018/dsa-4286
Comment 14 Bruno Cornec 2018-10-13 15:27:46 CEST
See https://github.com/curl/curl/issues/3129

CC: (none) => bruno
Status: NEW => ASSIGNED

Comment 15 David Walser 2018-10-13 16:15:05 CEST
(In reply to Bruno Cornec from comment #14)
> See https://github.com/curl/curl/issues/3129

We need to patch curl and not upgrade it in stable releases as upgrading it usually breaks things eventually.
Comment 16 Bruno Cornec 2018-10-13 19:58:13 CEST
While I understand the concern for server software, or large client software, here we speak of a "simple" client so I think the risks in that case are limited, that it's easier than to collect 6 patches for our version and also we do have that version in cauldron already, so it will be easy to sync if an issue is seen on one side. Now the valgrind issue means I may have to drop the %check phase completely (gagain not that critical a it's done for cauldron).
Comment 17 David Walser 2018-10-13 20:24:34 CEST
It has nothing to do with client or server.  Curl is also a library.  This also isn't a hypothetical concern, it's speaking from experience with this package.  I know it's easier to update, but it's just not safe.
Comment 18 Bruno Cornec 2018-10-25 01:19:08 CEST
cauldron already has curl 7.61.1
mga6 has now a patched curl with all above mentioned patches adapted for us in curl-7.54.1-2.7.mga6

Assignee: smelror => qa-bugs

Comment 19 David Walser 2018-10-25 17:55:46 CEST
Advisory:
========================

Updated curl packages fix security vulnerabilities:

Phan Thanh discovered that curl incorrectly handled certain FTP paths. An
attacker could use this to cause a denial of service or possibly execute
arbitrary code (CVE-2018-1000120).

Dario Weisser discovered that curl incorrectly handled certain LDAP URLs. An
attacker could possibly use this issue to cause a denial of service
(CVE-2018-1000121).

Max Dymond discovered that curl incorrectly handled certain RTSP data. An
attacker could possibly use this to cause a denial of service or even to get
access to sensitive data. (CVE-2018-1000122)

A heap-based buffer overflow can happen when closing down an FTP connection
with very long server command replies. When doing FTP transfers, curl keeps a
spare "closure handle" around internally that will be used when an FTP
connection gets shut down since the original curl easy handle is then already
removed. FTP server response data that gets cached from the original transfer
might then be larger than the default buffer size (16 KB) allocated in the
"closure handle", which can lead to a buffer overwrite. The contents and size
of that overwrite is controllable by the server (CVE-2018-1000300).

curl can be tricked into reading data beyond the end of a heap based buffer
used to store downloaded content. When servers send RTSP responses back to
curl, the data starts out with a set of headers. curl parses that data to
separate it into a number of headers to deal with those appropriately and to
find the end of the headers that signal the start of the "body" part. The
function that splits up the response into headers is called
`Curl_http_readwrite_headers()` and in situations where it can't find a single
header in the buffer, it might end up leaving a pointer pointing into the
buffer instead of to the start of the buffer which then later on may lead to
an out of buffer read when code assumes that pointer points to a full buffer
size worth of memory to use. This could potentially lead to information
leakage but most likely a crash/denial of service for applications if a server
triggers this flaw (CVE-2018-1000301).

Peter Wu discovered that curl incorrectly handled certain SMTP buffers. A
remote attacker could use this issue to cause curl to crash, resulting in a
denial of service, or possibly execute arbitrary code (CVE-2018-0500).

Zhaoyang Wu discovered that cURL, an URL transfer library, contains a buffer
overflow in the NTLM authentication code triggered by passwords that exceed
2GB in length on 32bit systems (CVE-2018-14618).

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-0500
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14618
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000120
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000121
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000122
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000300
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000301
https://curl.haxx.se/docs/adv_2018-9cd6.html
https://curl.haxx.se/docs/adv_2018-97a2.html
https://curl.haxx.se/docs/adv_2018-b047.html
https://curl.haxx.se/docs/adv_2018-82c2.html
https://curl.haxx.se/docs/adv_2018-b138.html
https://curl.haxx.se/docs/adv_2018-70a2.html
https://curl.haxx.se/docs/CVE-2018-14618.html
https://usn.ubuntu.com/3598-1/
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/DOHQJ7DDUE5U4L6FHSUVPFQ7TAZLWSMI/
https://usn.ubuntu.com/3710-1/
https://www.debian.org/security/2018/dsa-4286
========================

Updated packages in core/updates_testing:
========================
curl-7.54.1-2.7.mga6
libcurl4-7.54.1-2.7.mga6
libcurl-devel-7.54.1-2.7.mga6
curl-examples-7.54.1-2.7.mga6

from curl-7.54.1-2.7.mga6.src.rpm

Severity: normal => critical

Comment 20 PC LX 2018-10-27 21:05:20 CEST
installed and tested without issues.

Tests included:
- HTTP(S) GET, POST, HEAD;
- FTP(S) GET, PUT, DIR, etc;
- SCP to/from remote;
- Direct or through tor's SOCKS v5 proxy.

System: Mageia 6, x86_64, Intel CPU.

$ uname -a
Linux marte 4.14.78-desktop-1.mga6 #1 SMP Sun Oct 21 20:31:12 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -qa | egrep 'curl.*-7\.54\.1' | sort
curl-7.54.1-2.7.mga6
lib64curl4-7.54.1-2.7.mga6
libcurl4-7.54.1-2.5.mga6

Whiteboard: (none) => MGA6-64-OK
CC: (none) => mageia

Comment 21 Thomas Andrews 2018-10-30 04:36:26 CET
Validating. Advisory in Comment 19.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Thomas Backlund 2018-10-30 17:35:02 CET

Keywords: (none) => advisory
CC: (none) => tmb

Comment 22 Mageia Robot 2018-10-30 19:02:51 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2018-0423.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.