Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1515757 - (CVE-2017-8816) CVE-2017-8816 curl: NTLM buffer overflow via integer overflow
CVE-2017-8816 curl: NTLM buffer overflow via integer overflow
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20171129,repor...
: Security
Depends On: 1518622 1518620 1518621 1526300
Blocks: 1515763
  Show dependency treegraph
 
Reported: 2017-11-21 05:27 EST by Adam Mariš
Modified: 2018-01-11 07:45 EST (History)
14 users (show)

See Also:
Fixed In Version: curl 7.57.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-01-03 10:44:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Upstream patch (3.58 KB, patch)
2017-11-21 05:29 EST, Adam Mariš
no flags Details | Diff
Upstream patch (1.93 KB, patch)
2017-11-21 05:43 EST, Adam Mariš
no flags Details | Diff

  None (edit)
Description Adam Mariš 2017-11-21 05:27:21 EST
libcurl contains a buffer overrun flaw in the NTLM authentication code.

The internal function `Curl_ntlm_core_mk_ntlmv2_hash` sums up the lengths of
the user name + password (= SUM) and multiplies the sum by two (= SIZE) to
figure out how large storage to allocate from the heap.

The SUM value is subsequently used to iterate over the input and generate
output into the storage buffer. On systems with a 32 bit `size_t`, the math to
calculate SIZE triggers an integer overflow when the combined lengths of the
user name and password is larger than 2GB (2^31 bytes). This integer overflow
usually causes a very small buffer to actually get allocated instead of the
intended very huge one, making the use of that buffer end up in a buffer
overrun.

This is only an issue on 32 bit systems. It also requires the user and
password fields to use more than 2GB of memory combined, which in itself
should be rare.

- Affected versions: libcurl 7.36.0 to and including 7.56.1
- Not affected versions: libcurl < 7.36.0 and >= 7.57.0
Comment 1 Adam Mariš 2017-11-21 05:27:26 EST
Acknowledgments:

Name: the Curl project
Upstream: Alex Nichols
Comment 3 Adam Mariš 2017-11-21 05:29 EST
Created attachment 1356597 [details]
Upstream patch
Comment 4 Adam Mariš 2017-11-21 05:43 EST
Created attachment 1356599 [details]
Upstream patch
Comment 5 Adam Mariš 2017-11-28 08:57:09 EST
Issue was introduced by commit:

https://github.com/curl/curl/commit/86724581b6c02d160b52f817550cfdfc9c93af62
Comment 6 Adam Mariš 2017-11-29 05:51:07 EST
External References:

https://curl.haxx.se/docs/adv_2017-12e7.html
Comment 7 Adam Mariš 2017-11-29 05:52:12 EST
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1518621]


Created mingw-curl tracking bugs for this issue:

Affects: epel-7 [bug 1518622]
Affects: fedora-all [bug 1518620]

Note You need to log in before you can comment on or make changes to this bug.