CURL-CVE-2018-0500

Source
https://curl.se/docs/CVE-2018-0500.html
Import Source
https://curl.se/docs/CURL-CVE-2018-0500.json
JSON Data
https://api.osv.dev/v1/vulns/CURL-CVE-2018-0500
Aliases
Published
2018-07-11T08:00:00Z
Modified
2024-06-07T13:53:51Z
Summary
SMTP send heap buffer overflow
Details

curl might overflow a heap based memory buffer when sending data over SMTP and using a reduced read buffer.

When sending data over SMTP, curl allocates a separate "scratch area" on the heap to be able to escape the uploaded data properly if the uploaded data contains data that requires it.

The size of this temporary scratch area was mistakenly made to be 2 * sizeof(download_buffer) when it should have been made 2 * sizeof(upload_buffer).

The upload and the download buffer sizes are identically sized by default (16KB) but since version 7.54.1, curl can resize the download buffer into a smaller buffer (as well as larger). If the download buffer size is set to a value smaller than 10923, the Curl_smtp_escape_eob() function might overflow the scratch buffer when sending contents of sufficient size and contents.

The curl command line tool lowers the buffer size when --limit-rate is set to a value smaller than 16KB.

References
Credits
    • Peter Wu - FINDER
    • Daniel Stenberg - REMEDIATION_DEVELOPER

Affected packages

Git / github.com/curl/curl.git

Affected ranges

Type
SEMVER
Events
Introduced
7.54.1
Fixed
7.61.0
Type
GIT
Repo
https://github.com/curl/curl.git
Events

Affected versions

7.*

7.54.1
7.55.0
7.55.1
7.56.0
7.56.1
7.57.0
7.58.0
7.59.0
7.60.0