Allele Security Alert
warning message out-of-bounds read
the Curl project
curl 7.14.1 to and including 7.61.1
curl >= 7.62.0
Proof of concept
curl contains a heap out-of-bounds 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 will end 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:
- a server somewhere uses the curl command line to run something if it fails,
- it shows stderr to the user
- the server takes user input for parts of its command line input
- user provides something overly long that triggers this crash
- the stderr output may now contain user memory contents that wasn’t meant to be available
Brian Carpenter (Geeknik Labs)
CURL 7.62.0 MOAR STUFF
warning message out-of-buffer read
Added more verbose “warning” messages to the curl client for cases
voutf: fix bad arethmetic when outputting warnings to stderr
If there is any error in this alert or you wish a comprehensive analysis, let us know.
Last modified: February 6, 2019