Out-of-bounds reads with specially crafted payloads due to unchecked use of
_libssh2_packet_require
and _libssh2_packet_requirev
Project libssh2 Security Advisory, March 18 2019 - Permalink
A server could send a specially crafted partial packet in response to various commands such as: sha1 and sha226 key exchange, user auth list, user auth password response, public key auth response, channel startup/open/forward/ setenv/request pty/x11 and session start up. The result would be a memory out of bounds read (CWE-130).
There are no known exploits of this flaw at this time.
The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2019-3859 to this issue.
- Affected versions: versions 0.1 up to and including 1.8.0
- Not affected versions: libssh2 >= 1.8.1
libssh2 1.8.1 ensures the length of the payload is the required length before reading the packet buffer content.
A patch for this problem is available
We suggest you take one of the following actions immediately, in order of preference:
A - Upgrade to libssh2 1.8.1 or greater
B - Apply the patch and rebuild libssh2
It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
libssh2 1.8.1 was released on March 18 2019, coordinated with the publication of this advisory.
Reported by Chris Coulson of Canonical Ltd.