Bug 1597101 - (CVE-2018-0500) CVE-2018-0500 curl: Heap-based buffer overflow in Curl_smtp_escape_eob() when uploading data over SMTP
CVE-2018-0500 curl: Heap-based buffer overflow in Curl_smtp_escape_eob() when...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20180711,repor...
: Security
Depends On: 1600082 1600081
Blocks: 1597103
  Show dependency treegraph
 
Reported: 2018-07-02 00:06 EDT by Sam Fowler
Modified: 2018-08-16 12:09 EDT (History)
28 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Upstream patch (1.15 KB, patch)
2018-07-02 21:08 EDT, Sam Fowler
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2486 None None None 2018-08-16 12:09 EDT

  None (edit)
Description Sam Fowler 2018-07-02 00:06:15 EDT
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 00:13:34 EDT
Flaw introduced by:

https://github.com/curl/curl/commit/e40e9d7f0decc79
Comment 3 Sam Fowler 2018-07-02 21:08 EDT
Created attachment 1456079 [details]
Upstream patch
Comment 4 Adam Mariš 2018-07-04 07:27:41 EDT
Acknowledgments:

Name: the Curl project
Comment 13 Riccardo Schirone 2018-07-05 09:26:24 EDT
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 09:26:41 EDT
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 06:07:21 EDT
Patch:
https://github.com/curl/curl/commit/ba1dbd78e5f1e.patch
Comment 16 Riccardo Schirone 2018-07-11 06:09:53 EDT
External References:

https://curl.haxx.se/docs/adv_2018-70a2.html
Comment 17 Riccardo Schirone 2018-07-11 07:39:18 EDT
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1600081]
Comment 19 errata-xmlrpc 2018-08-16 12:09:15 EDT
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.