CVE-2019-3822

NameCVE-2019-3822
Descriptionlibcurl 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-1672-1, DSA-4386-1
NVD severityhigh (attack range: remote)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
curl (PTS)jessie7.38.0-4+deb8u11vulnerable
jessie (security)7.38.0-4+deb8u14fixed
stretch (security), stretch7.52.1-5+deb9u9fixed
buster, sid7.64.0-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
curlsource(unstable)7.64.0-1high
curlsourcejessie7.38.0-4+deb8u14highDLA-1672-1
curlsourcestretch7.52.1-5+deb9u9highDSA-4386-1

Notes

https://curl.haxx.se/docs/CVE-2019-3822.html
Fixed by: https://github.com/curl/curl/commit/50c9484278c63b958655a717844f0721263939cc
Introduced by: https://github.com/curl/curl/commit/86724581b6c02d160b52f817550cfdfc9c93af62

Search for package or bug name: Reporting problems