Bug 1687306 (CVE-2019-3858) - CVE-2019-3858 libssh2: Zero-byte allocation with a specially crafted SFTP packed leading to an out-of-bounds read
Summary: CVE-2019-3858 libssh2: Zero-byte allocation with a specially crafted SFTP pac...
Alias: CVE-2019-3858
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1688433 1688434 1688435 1690247 1690248 1690408 1696058 1697702
Blocks: 1687317
TreeView+ depends on / blocked
Reported: 2019-03-11 08:56 UTC by Andrej Nemec
Modified: 2020-04-21 11:32 UTC (History)
17 users (show)

Fixed In Version: libssh2 1.8.1
Doc Type: If docs needed, set a value
Doc Text:
An out of bounds read flaw was discovered in libssh2 when a specially crafted SFTP packet is received from the server. A remote attacker who compromises a SSH server may be able to cause a denial of service or read data in the client memory.
Clone Of:
Last Closed: 2019-08-06 13:22:09 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2136 None None None 2019-08-06 12:19:36 UTC

Description Andrej Nemec 2019-03-11 08:56:17 UTC
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.

Comment 2 Andrej Nemec 2019-03-12 09:15:22 UTC

Name: the libssh2 project
Upstream: Chris Coulson (Canonical Ltd.)

Comment 4 Riccardo Schirone 2019-03-13 17:29:34 UTC
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.

Comment 8 Doran Moppert 2019-03-19 04:41:20 UTC

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.

Comment 10 Dhananjay Arunesh 2019-03-19 06:31:32 UTC
External References:


Comment 11 Dhananjay Arunesh 2019-03-19 06:47:17 UTC
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]

Comment 12 Dhananjay Arunesh 2019-03-19 06:48:47 UTC
Created mingw-libssh2 tracking bugs for this issue:

Affects: epel-7 [bug 1690248]

Comment 13 Andrej Nemec 2019-03-19 12:28:22 UTC
Created libssh2 tracking bugs for this issue:

Affects: fedora-all [bug 1690408]

Comment 16 errata-xmlrpc 2019-08-06 12:19:34 UTC
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

Comment 17 Product Security DevOps Team 2019-08-06 13:22:09 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


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