CVE-2021-3634: Medium severity libssh libssh vulnerability
A flaw has been found in libssh in versions prior to 0.9.6. The SSH protocol keeps track of two shared secrets during the lifetime of the session. One of them is called secrethash and the other sessionid. Initially, both of them are the same, but after key re-exchange, previous sessionid is kept and used as an input to new secrethash. Historically, both of these buffers had shared length variable, which worked as long as these buffers were same. But the key re-exchange operation can also change the key exchange method, which can be based on hash of different size, eventually creating "secrethash" of different size than the sessionid has. This becomes an issue when the sessionid memory is zeroed or when it is used again during second key re-exchange.
Other sources
The SSH protocol keeps track of two shared secrets during the lifetime of the session. One of them is called secrethash and the other sessionid. Initially, both of them are the same, but after key re-exchange, previous sessionid is kept and used as an input to new secrethash. Historically, both of these buffers had shared length variable, which worked as long as these buffers were same. But the key re-exchange operation can also change the key exchange method, which can be based on hash of different size, eventually creating secrethash of different size than the sessionid has. This becomes an issue when the sessionid memory is zeroized or when it is used again during second key re-exchange.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/libsshto a version that resolves this vulnerability.Fixed in 0.8.7-1+deb10u1Fixed in 0.8.7-1+deb10u2Fixed in 0.9.7-0+deb11u1Fixed in 0.9.8-0+deb11u1Fixed in 0.10.5-2Fixed in 0.10.6-0+deb12u1Fixed in 0.10.6-2 - Upgrade
Upgrade
redhat/libsshto a version that resolves this vulnerability.Fixed in 0.9.6
Event History
Frequently Asked Questions
What is CVE-2021-3634?
CVE-2021-3634 is a vulnerability found in libssh in versions prior to 0.9.6.
What is the severity of CVE-2021-3634?
CVE-2021-3634 has a severity level of 6.5 (high).
Is libssh version 0.9.6 affected by CVE-2021-3634?
No, libssh version 0.9.6 is not affected by CVE-2021-3634.
How can I fix CVE-2021-3634 in libssh?
To fix CVE-2021-3634 in libssh, you should upgrade to version 0.9.6 or later.
Where can I find more information about CVE-2021-3634?
You can find more information about CVE-2021-3634 in the following references: [Link 1](https://bugzilla.redhat.com/show_bug.cgi?id=1978810), [Link 2](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DRK67AJCWYYVAGF5SGAHNZXCX3PN3ZFP/), [Link 3](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JKYD3ZRAMDAQX3ZW6THHUF3GXN7FF6B4/)