Fixes have been made available, mitigation is also possible

Jan 14, 2016 22:02 GMT  ·  By

The OpenSSH team has just closed a critical security flaw in the OpenSSH client that allowed a malicious server to trick clients into handing over memory (RAM) data.

The flaw (CVE-2016-0777), discovered by Qualys, affects only OpenSSH clients from version 5.4 (released on March 8, 2010) and higher.

According to Qualys researchers, the OpenSSH client contained an undocumented feature called roaming, which never made it to the server-side code. Despite not being used, the roaming feature was turned on by default on all clients, and servers could trick clients into thinking they supported roaming.

Attackers need to control the OpenSSH server to use this exploit

Theoretically, the roaming feature would allow SSH clients to reconnect automatically in case connections broke off unexpectedly. A vulnerability in this feature could be exploited after the client connects to a server under an attacker's control.

An attacker can force the client to disconnect, and when it reconnects, trick it into disclosing data it currently has in its memory, which may include the private SSH keys, memory addresses for various applications, and so on.

Obtaining real-time information from a computer's memory can help attackers craft targeted attacks with a higher chance of success against that computer.

OpenSSH clients can avoid exploitation without updating

Security researchers say that the attack can be mitigated without updating by adding "UseRoaming no" to the OpenSSH's configuration file, but updating would be the safest choice, since the OpenSSH client also includes a fix for another buffer overflow issue, again reported by Qualys.

"This information leak may have already been exploited in the wild by sophisticated attackers, and high-profile sites or users may need to regenerate their SSH keys accordingly," Qualys security researchers note.

Theoretically, this vulnerability looks a lot like the Heartbleed flaw in OpenSSL, but it is harder to exploit since it requires attackers to control the OpenSSH server beforehand.