CVE-2016-8620: Integer Overflow
The 'globbing' feature in curl before version 7.51.0 has a flaw that leads to integer overflow and out-of-bounds read via user controlled input.
Other sources
The curl tool's "globbing" feature allows a user to specify a numerical range through which curl will iterate. It is typically specified as [1-5], specifying the first and the last numbers in the range. Or with [a-z], using letters.
1. The curl code for parsing the second unsigned number did not check for a leading minus character, which allowed a user to specify [1--1] with no complaints and have the latter -1 number get turned into the largest unsigned long value the system can handle. This would ultimately cause curl to write outside the dedicated malloced buffer after no less than 100,000 iterations, since it would have room for 5 digits but not 6.
2. When the range is specified with letters, and the ending letter is left out [L-], the code would still advance its read pointer 5 bytes even if the string was just 4 bytes and end up reading outside the given buffer.
External References:
https://curl.haxx.se/docs/adv20161102F.html
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/curlto a version that resolves this vulnerability.Fixed in 7.51.0
Event History
Frequently Asked Questions
What is the severity of CVE-2016-8620?
CVE-2016-8620 has been assigned a moderate severity level due to the potential for integer overflow and out-of-bounds reads.
How do I fix CVE-2016-8620?
To fix CVE-2016-8620, upgrade curl to version 7.51.0 or later.
What versions of curl are affected by CVE-2016-8620?
CVE-2016-8620 affects curl versions prior to 7.51.0.
What feature of curl is linked to CVE-2016-8620?
The 'globbing' feature in curl is linked to CVE-2016-8620.
Can user input exploit CVE-2016-8620?
Yes, user-controlled input can exploit CVE-2016-8620, leading to potential security issues.