Arch Linux Security Advisory ASA-201504-10
=========================================
Severity: Medium
Date    : 2015-04-09
CVE-ID  : CVE-2015-1782
Package : libssh2
Type    : out-of-bounds read
Remote  : Yes
Link    : https://wiki.archlinux.org/title/CVE

Summary
======
The package libssh2 before version 1.5.0-1 is vulnerable to
out-of-bounds read leading to denial of service and information disclosure.

Resolution
=========
Upgrade to 1.5.0-1.

# pacman -Syu "libssh2>=1.5.0-1"

The problem has been fixed upstream in version 1.5.0.

Workaround
=========
None.

Description
==========
When negotiating a new SSH session with a remote server, one of
libssh2's functions for doing the key exchange (kex_agree_methods()) was
naively reading data from the incoming packet and using it without doing
sufficient range checks. The SSH_MSG_KEXINIT packet arrives to libssh2
with a set of strings, sent as a series of LENGTH + DATA pairs. libssh2
would go through the list and read the LENGTH field, read the string
following the LENGTH and then advance the pointer LENGTH bytes in memory
and expect to find the next LENGTH + DATA pair there. Then move on until
seven subsequent strings are taken care of. It would naively assume that
the (unsigned 32 bit) LENGTH fields were valid.

This packet arrives in the negotiating phase so the remote server has
not yet been deemed to be a known or trusted party.

Impact
=====
A remote attacker could man-in-the-middle a real server and cause
libssh2 using clients to crash, resulting in denial of service, or
otherwise read and use completely unintended memory areas in this process.

References
=========
https://libssh2.org/adv_20150311.html
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1782
https://bugs.archlinux.org/task/44146

ArchLinux: 201504-10: libssh2: out-of-bounds read

April 9, 2015

Summary

When negotiating a new SSH session with a remote server, one of libssh2's functions for doing the key exchange (kex_agree_methods()) was naively reading data from the incoming packet and using it without doing sufficient range checks. The SSH_MSG_KEXINIT packet arrives to libssh2 with a set of strings, sent as a series of LENGTH + DATA pairs. libssh2 would go through the list and read the LENGTH field, read the string following the LENGTH and then advance the pointer LENGTH bytes in memory and expect to find the next LENGTH + DATA pair there. Then move on until seven subsequent strings are taken care of. It would naively assume that the (unsigned 32 bit) LENGTH fields were valid. This packet arrives in the negotiating phase so the remote server has not yet been deemed to be a known or trusted party.

Resolution

Upgrade to 1.5.0-1. # pacman -Syu "libssh2>=1.5.0-1"
The problem has been fixed upstream in version 1.5.0.

References

https://libssh2.org/adv_20150311.html https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1782 https://bugs.archlinux.org/task/44146

Severity
Package : libssh2
Type : out-of-bounds read
Remote : Yes
Link : https://wiki.archlinux.org/title/CVE

Workaround

None.

Related News