Bug 1597101 (CVE-2018-0500) - CVE-2018-0500 curl: Heap-based buffer overflow in Curl_smtp_escape_eob() when uploading data over SMTP
Summary: CVE-2018-0500 curl: Heap-based buffer overflow in Curl_smtp_escape_eob() when...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-0500
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1600081 1600082
Blocks: 1597103
TreeView+ depends on / blocked
 
Reported: 2018-07-02 04:06 UTC by Sam Fowler
Modified: 2021-02-17 00:02 UTC (History)
28 users (show)

Fixed In Version: curl 7.61.0
Doc Type: If docs needed, set a value
Doc Text:
A heap-based buffer overflow has been found in the Curl_smtp_escape_eob() function of curl. An attacker could exploit this by convincing a user to use curl to upload data over SMTP with a reduced buffer to cause a crash or corrupt memory.
Clone Of:
Environment:
Last Closed: 2018-11-11 22:59:12 UTC


Attachments (Terms of Use)
Upstream patch (1.15 KB, patch)
2018-07-03 01:08 UTC, Sam Fowler
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2486 0 None None None 2018-08-16 16:09:27 UTC

Description Sam Fowler 2018-07-02 04:06:15 UTC
curl versions 7.54.1 through 7.60.0 are vulnerable to a heap-based buffer overflow in the Curl_smtp_escape_eob() function when uploading data over SMTP and using a reduced read buffer. An attacker could exploit this by convincing a user to use curl to upload data over SMTP with a reduced buffer to cause a crash or corrupt memory.

Comment 2 Sam Fowler 2018-07-02 04:13:34 UTC
Flaw introduced by:

https://github.com/curl/curl/commit/e40e9d7f0decc79

Comment 3 Sam Fowler 2018-07-03 01:08:04 UTC
Created attachment 1456079 [details]
Upstream patch

Comment 4 Adam Mariš 2018-07-04 11:27:41 UTC
Acknowledgments:

Name: the Curl project
Upstream: Peter Wu

Comment 13 Riccardo Schirone 2018-07-05 13:26:24 UTC
Even though some versions shipped in RHEL and in RHSCL 3 provide the option to reduce the read buffer, they are not vulnerable to this flaw because they do not use the buffer size value to allocate the scratch buffer in Curl_smtp_escape_eob.

Comment 14 Riccardo Schirone 2018-07-05 13:26:41 UTC
Statement:

This issue did not affect the versions of curl/libcurl as shipped with Red Hat Enterprise Linux 5, 6 and 7 as they did not include the vulnerable code.

This issue did not affect the versions of curl/libcurl as shipped with Red Hat Software Collections 3 as they did not include the vulnerable code.

Comment 15 Riccardo Schirone 2018-07-11 10:07:21 UTC
Patch:
https://github.com/curl/curl/commit/ba1dbd78e5f1e

Comment 16 Riccardo Schirone 2018-07-11 10:09:53 UTC
External References:

https://curl.haxx.se/docs/adv_2018-70a2.html

Comment 17 Riccardo Schirone 2018-07-11 11:39:18 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1600081]

Comment 19 errata-xmlrpc 2018-08-16 16:09:15 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

Via RHSA-2018:2486 https://access.redhat.com/errata/RHSA-2018:2486


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