CVE-2016-0777
Medium · 6.5CVSS
6.5
EPSS
63.5%
Published
Jan 14, 2016
CISA due date
—
Cloudanix analysis
A bug in SSH client software can let a malicious server steal private keys from a user's computer during a connection.
- Exploitation
- Requires User Interaction
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The resend_bytes function in roaming_common.c allows a remote SSH server to request transmission of an entire client buffer, exposing sensitive process memory contents such as private keys.
Why it matters to the business
Organizations risk exposure of authentication credentials and keys when clients connect to untrusted servers, potentially enabling account compromise and downstream breaches; the issue has been public for over a decade with stable exploitability signals.
How an attack unfolds
An attacker hosts or compromises an SSH server configured to trigger the roaming resend mechanism during key exchange; when a vulnerable client connects, the server requests the full buffer, reading private key material and other memory from the client process.
How to fix it
Upgrade OpenSSH clients to version 7.1p2 or later; disable the roaming feature via configuration options in unpatched versions where feasible.
How to confirm the fix worked
Verify client OpenSSH version is 7.1p2 or newer; perform connection tests against controlled servers and inspect memory disclosure behavior.
Typical attack path
- Attacker positions a malicious or compromised SSH server reachable by targets
- Victim client initiates an SSH connection to the server
- Server exploits the roaming resend_bytes path to request oversized buffer transmission
- Client memory contents including private keys are sent to the attacker
How to detect it
Review SSH client logs for connections to unknown servers and any roaming-related activity indicators; examine process memory artifacts or network captures showing unexpected buffer transmissions.
What your security team should do
- Prioritize patching all OpenSSH client installations across endpoints and servers
- Restrict SSH connections to trusted servers only via allowlists
- Audit and disable roaming support in legacy deployments
The record
The resend_bytes function in roaming_common.c in the client in OpenSSH 5.x, 6.x, and 7.x before 7.1p2 allows remote servers to obtain sensitive information from process memory by requesting transmission of an entire buffer, as demonstrated by reading a private key.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | openssh | 0 | 1:7.1p2-1 |
| Debian:12 | openssh | 0 | 1:7.1p2-1 |
| Debian:13 | openssh | 0 | 1:7.1p2-1 |
| Debian:14 | openssh | 0 | 1:7.1p2-1 |
| Debian:6.0 | openssh | 0 | 1:5.5p1-6+squeeze8 |
| Debian:7 | openssh | 0 | 1:6.0p1-4+deb7u3 |
| Debian:8 | openssh | 0 | 1:6.7p1-5+deb8u1 |
| Mageia:5 | openssh | 0 | 6.6p1-5.6.mga5 |
| Red Hat:enterprise_linux:7::client | openssh | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-askpass | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-clients | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-debuginfo | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-keycat | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-ldap | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-server | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | openssh-server-sysvinit | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::client | pam_ssh_agent_auth | 0 | 0:0.9.3-9.23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-askpass | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-clients | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-debuginfo | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-keycat | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-ldap | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-server | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | openssh-server-sysvinit | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::computenode | pam_ssh_agent_auth | 0 | 0:0.9.3-9.23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-askpass | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-clients | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-debuginfo | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-keycat | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-ldap | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-server | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | openssh-server-sysvinit | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::server | pam_ssh_agent_auth | 0 | 0:0.9.3-9.23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-askpass | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-clients | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-debuginfo | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-keycat | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-ldap | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-server | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | openssh-server-sysvinit | 0 | 0:6.6.1p1-23.el7_2 |
| Red Hat:enterprise_linux:7::workstation | pam_ssh_agent_auth | 0 | 0:0.9.3-9.23.el7_2 |
| SUSE:Linux Enterprise Desktop 11 SP3 | openssh | 0 | 6.2p2-0.24.1 |
| SUSE:Linux Enterprise Desktop 11 SP3 | openssh-askpass-gnome | 0 | 6.2p2-0.24.3 |
| SUSE:Linux Enterprise Desktop 11 SP4 | openssh | 0 | 6.6p1-16.1 |
| SUSE:Linux Enterprise Desktop 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-16.4 |
| SUSE:Linux Enterprise Desktop 12 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Desktop 12 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server 11 SP3 | openssh | 0 | 6.2p2-0.24.1 |
| SUSE:Linux Enterprise Server 11 SP3 | openssh-askpass-gnome | 0 | 6.2p2-0.24.3 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh | 0 | 6.2p2-0.24.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh-askpass-gnome | 0 | 6.2p2-0.24.3 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh | 0 | 6.6p1-16.1 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-16.4 |
| SUSE:Linux Enterprise Server 11-SECURITY | openssh-openssl1 | 0 | 6.6p1-10.1 |
| SUSE:Linux Enterprise Server 12 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server 12 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP3 | openssh | 0 | 6.2p2-0.24.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP3 | openssh-askpass-gnome | 0 | 6.2p2-0.24.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh | 0 | 6.6p1-16.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-16.4 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh | 0 | 6.6p1-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-33.1 |
| Ubuntu:14.04:LTS | openssh | 0 | 1:6.6p1-2ubuntu2.4 |
| openSUSE:Tumbleweed | openssh | 0 | 7.2p2-3.1 |
Related vulnerabilities
- CVE-2023-51385 In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host… Also affects openssh
- CVE-2021-41617 sshd in OpenSSH 6.2 through 8.x before 8.8, when certain non-default configurations are… Also affects openssh
- CVE-2016-10708 sshd in OpenSSH before 7.4 allows remote attackers to cause a denial of service (NULL… Also affects openssh
- CVE-2016-1908 The client in OpenSSH before 7.2 mishandles failed cookie generation for untrusted X11… Also affects openssh
- CVE-2016-6210 sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing… Also affects openssh
- CVE-2016-10009 Untrusted search path vulnerability in ssh-agent.c in ssh-agent in OpenSSH before 7.4… Also affects openssh
- CVE-2016-8858 The kex_input_kexinit function in kex.c in OpenSSH 6.x and 7.x through 7.3 allows remote… Also affects openssh
- CVE-2016-6515 The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit… Also affects openssh