warning message out-of-buffer read
curl contains a heap out of buffer read vulnerability. The command line tool has a generic function for displaying warning and informational messages to stderr for various situations. For example if an unknown command line argument is used, or passed to it in a "config" file. This display function formats the output to wrap at 80 columns. The wrap logic is however flawed, so if a single word in the message is itself longer than 80 bytes the buffer arithmetic calculates the remainder wrong and ends up reading behind the end of the buffer. This could lead to information disclosure or crash. This vulnerability could lead to a security issue if used in this or similar situations: 1. a server somewhere uses the curl command line to run something 2. if it fails, it shows stderr to the user 3. the server takes user input for parts of its command line input 4. user provides something overly long that triggers this crash 5. the stderr output may now contain user memory contents that was not meant to be available
02 / AFFECTED SOFTWARE
Affected packages
90 explicit affected versions
182 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
Curl versions 7.14.1 through 7.61.1 are vulnerable to a heap-based buffer over-read in the tool_msgs.c:voutf() function that may result in information exposure and denial of service.
curl contains a heap out of buffer read vulnerability. The command line tool has a generic function for displaying warning and informational messages to stderr for various situations. For example if an unknown command line argument is used, or passed to it in a "config" file. This display function formats the output to wrap at 80 columns. The wrap logic is however flawed, so if a single word in the message is itself longer than 80 bytes the buffer arithmetic calculates the remainder wrong and ends up reading behind the end of the buffer. This could lead to information disclosure or crash. This vulnerability could lead to a security issue if used in this or similar situations: 1. a server somewhere uses the curl command line to run something 2. if it fails, it shows stderr to the user 3. the server takes user input for parts of its command line input 4. user provides something overly long that triggers this crash 5. the stderr output may now contain user memory contents that was not meant to be available
05 / REFERENCES
Further evidence
- http://www.securitytracker.com/id/1042014
- https://access.redhat.com/errata/RHSA-2019:2181
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16842
- https://curl.haxx.se/docs/CVE-2018-16842.html
- https://github.com/curl/curl/commit/d530e92f59ae9bb2d47066c3c460b25d2ffeb211
- https://lists.debian.org/debian-lts-announce/2018/11/msg00005.html
- https://security.gentoo.org/glsa/201903-03
- https://usn.ubuntu.com/3805-1/
- https://usn.ubuntu.com/3805-2/
- https://www.debian.org/security/2018/dsa-4331
- https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html