Skip to content
OpenAdvisories
Medium ALAS2-2019-1162 12 CVEs

Moderate: curl security update (Amazon Linux 2)

Published Feb 16, 2019 · Updated Feb 18, 2019

Summary

Package updates are available for Amazon Linux 2 that fix the following vulnerabilities: CVE-2019-3823: libcurl versions from 7.34.0 to before 7.64.0 are vulnerable to a heap out-of-bounds read in the code handling the end-of-response for SMTP. If the buffer passed to `smtp_endofresp()` isn't NUL terminated and contains no character ending the parsed number, and `len` is set to 5, then the `strtol()` call reads beyond the allocated buffer. The read contents will not be returned to the caller. 1670256: CVE-2019-3823 curl: SMTP end-of-response out-of-bounds read CVE-2019-3822: libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. The function creating an outgoing NTLM type-3 header (`lib/vauth/ntlm.c:Curl_auth_create_ntlm_type3_message()`), generates the request HTTP header contents based on previously received data. The check that exists to prevent the local buffer from getting overflowed is implemented wrongly (using unsigned math) and as such it does not prevent the overflow from happening. This output data can grow larger than the local buffer if very large 'nt response' data is extracted from a previous NTLMv2 header provided by the malicious or broken HTTP server. Such a 'large value' needs to be around 1000 bytes or more. The actual payload data copied to the target buffer comes from the NTLMv2 type-2 response header. 1670254: CVE-2019-3822 curl: NTLMv2 type-3 header stack buffer overflow CVE-2018-20483: set_file_metadata in xattr.c in GNU Wget before 1.20.1 stores a file's origin URL in the user.xdg.origin.url metadata attribute of the extended attributes of the downloaded file, which allows local users to obtain sensitive information (e.g., credentials contained in the URL) by reading this attribute, as demonstrated by getfattr. This also applies to Referer information in the user.xdg.referrer.url metadata attribute. According to 2016-07-22 in the Wget ChangeLog, user.xdg.origin.url was partially based on the behavior of fwrite_xattr in tool_xattr.c in curl. 1662705: CVE-2018-20483 wget: Information exposure in set_file_metadata function in xattr.c CVE-2018-16890: libcurl versions from 7.36.0 to before 7.64.0 is vulnerable to a heap buffer out-of-bounds read. The function handling incoming NTLM type-2 messages (`lib/vauth/ntlm.c:ntlm_decode_type2_target`) does not validate incoming data correctly and is subject to an integer overflow vulnerability. Using that overflow, a malicious or broken NTLM server could trick libcurl to accept a bad length + offset combination that would lead to a buffer read out-of-bounds. 1670252: CVE-2018-16890 curl: NTLM type-2 heap out-of-bounds buffer read CVE-2018-16842: 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. 1644124: CVE-2018-16842 curl: Heap-based buffer over-read in the curl tool warning formatting CVE-2018-16840: A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. When closing and cleaning up an 'easy' handle in the `Curl_close()` function, the library code first frees a struct (without nulling the pointer) and might then subsequently erroneously write to a struct field within that already freed struct. 1642203: CVE-2018-16840 curl: Use-after-free when closing "easy" handle in Curl_close() CVE-2018-16839: Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service. 1642201: CVE-2018-16839 curl: Integer overflow leading to heap-based buffer overflow in Curl_sasl_create_plain_message() CVE-2017-8818: curl and libcurl before 7.57.0 on 32-bit platforms allow attackers to cause a denial of service (out-of-bounds access and application crash) or possibly have unspecified other impact because too little memory is allocated for interfacing to an SSL library. 1517691: CVE-2017-8818 curl: Out-of-bound access in SSL related cleanup code CVE-2017-8817: The FTP wildcard function in curl and libcurl before 7.57.0 allows remote attackers to cause a denial of service (out-of-bounds read and application crash) or possibly have unspecified other impact via a string that ends with an '[' character. 1515760: CVE-2017-8817 curl: FTP wildcard out of bounds read CVE-2017-8816: The NTLM authentication feature in curl and libcurl before 7.57.0 on 32-bit platforms allows attackers to cause a denial of service (integer overflow and resultant buffer overflow, and application crash) or possibly have unspecified other impact via vectors involving long user and password fields. 1515757: CVE-2017-8816 curl: NTLM buffer overflow via integer overflow CVE-2017-1000257: A buffer overrun flaw was found in the IMAP handler of libcurl. By tricking an unsuspecting user into connecting to a malicious IMAP server, an attacker could exploit this flaw to potentially cause information disclosure or crash the application. 1503705: CVE-2017-1000257 curl: IMAP FETCH response out of bounds read CVE-2017-1000254: libcurl may read outside of a heap allocated buffer when doing FTP. When libcurl connects to an FTP server and successfully logs in (anonymous or not), it asks the server for the current directory with the `PWD` command. The server then responds with a 257 response containing the path, inside double quotes. The returned path name is then kept by libcurl for subsequent uses. Due to a flaw in the string parser for this directory name, a directory name passed like this but without a closing double quote would lead to libcurl not adding a trailing NUL byte to the buffer holding the name. When libcurl would then later access the string, it could read beyond the allocated heap buffer and crash or wrongly access data beyond the buffer, thinking it was part of the path. A malicious server could abuse this fact and

Fixed packages 4

ReleasePackageFixed in
Amazon Linux · 2 curl 0:7.61.1-9.amzn2.0.1
Amazon Linux · 2 curl-debuginfo 0:7.61.1-9.amzn2.0.1
Amazon Linux · 2 libcurl 0:7.61.1-9.amzn2.0.1
Amazon Linux · 2 libcurl-devel 0:7.61.1-9.amzn2.0.1

Vulnerabilities 12

References

  • web
    https://alas.aws.amazon.com/cve/html/CVE-2017-1000254.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2017-1000257.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2017-8816.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2017-8817.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2017-8818.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2018-16839.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2018-16840.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2018-16842.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2018-16890.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2018-20483.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2019-3822.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2019-3823.html