A server could send a specially crafted partial SFTP packet with a zero value for the payload length. This zero value would be used to then allocate memory resulting in a zero byte allocation and possible out of bounds read.
Acknowledgments: Name: the libssh2 project Upstream: Chris Coulson (Canonical Ltd.)
Function sftp_packet_read() in sftp.c does not check if partial_len is zero and it is vulnerable to an out-of-bounds read.
Reference: https://www.openwall.com/lists/oss-security/2019/03/18/3 Upstream Patch: https://libssh2.org/1.8.0-CVE/CVE-2019-3858.patch
External References: https://www.libssh2.org/CVE-2019-3858.html
Created libssh tracking bugs for this issue: Affects: fedora-all [bug 1690246] Created mingw-libssh2 tracking bugs for this issue: Affects: fedora-all [bug 1690247]
Created mingw-libssh2 tracking bugs for this issue: Affects: epel-7 [bug 1690248]
Created libssh2 tracking bugs for this issue: Affects: fedora-all [bug 1690408]
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2019:2136 https://access.redhat.com/errata/RHSA-2019:2136
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2019-3858
Statement: This flaw was present in libssh2 packages included in Red Hat Virtualization Hypervisor and Management Appliance, however libssh2 in these hosts is never exposed to malicious clients or servers. libssh2 is no longer included in the virt module since Red Hat Enterprise Linux 8.1.