REDHAT-BUG-2493955: Buffer Overflow
libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation numattrs sizeof(libssh2publickeyattribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.
Affected Software
Event History
Frequently Asked Questions
Which systems are realistically exposed to this issue?
The issue affects libssh2 clients through version 1.11.1 running on 32-bit platforms when they connect to an SSH server that can provide a crafted publickey-subsystem response.
What does an attacker need to exploit it?
An attacker needs to control, or cause a client to connect to, a malicious SSH server. The vulnerable client must process the server's attacker-controlled publickey attribute data.