Heap-based buffer overflow in cURL - CVE-2018-1000300

 

Heap-based buffer overflow in cURL - CVE-2018-1000300

Published: May 17, 2018 / Updated: May 17, 2018


Vulnerability identifier: #VU12799
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-1000300
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The weakness exists due to heap-based buffer overflow 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 buffer overwrite. A remote attacker can execute arbitrary code.

Successful exploitation of the vulnerability may result in system compromise.

Affected software

cURL

Arch Linux
Gentoo Linux
Slackware Linux
Ubuntu
Fedora
PeopleSoft Enterprise PeopleTools
Oracle Enterprise Manager Ops Center
openSUSE Leap
curl (Alpine package)
libcurl3 (Ubuntu package)
curl (Ubuntu package)
libcurl3-gnutls (Ubuntu package)
libcurl3-nss (Ubuntu package)
libcurl4 (Ubuntu package)
curl
Oracle Communications WebRTC Session Controller

How to mitigate CVE-2018-1000300

Update to version 7.60.0.

curl (Alpine package) - update to 7.60.0-r0
libcurl3 (Ubuntu package) - addressed in versions 7.35.0-1ubuntu2.16, 7.47.0-1ubuntu2.8, 7.55.1-1ubuntu2.5
curl (Ubuntu package) - addressed in versions 7.35.0-1ubuntu2.16, 7.47.0-1ubuntu2.8, 7.55.1-1ubuntu2.5, 7.58.0-2ubuntu3.1
libcurl3-gnutls (Ubuntu package) - addressed in versions 7.35.0-1ubuntu2.16, 7.47.0-1ubuntu2.8, 7.55.1-1ubuntu2.5, 7.58.0-2ubuntu3.1
libcurl3-nss (Ubuntu package) - addressed in versions 7.35.0-1ubuntu2.16, 7.47.0-1ubuntu2.8, 7.55.1-1ubuntu2.5, 7.58.0-2ubuntu3.1
libcurl4 (Ubuntu package) - update to 7.58.0-2ubuntu3.1
curl - addressed in versions 7.55.1-11.fc27, 7.59.0-3.fc28
Oracle Communications WebRTC Session Controller - update to 7.2

External References

Related Security Bulletins