CVE-2021-3634 Memory corruption in libssh
A memory corruption flaw in libssh allows attackers to execute arbitrary code or cause denial of service via key re-exchange.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3634?
CVE-2021-3634 is a medium-severity memory corruption vulnerability in Debian Debian Linux, published on 31 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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 secret_hash and the other session_id. Initially, both of them are the same, but after key re-exchange, previous session_id is kept and used as an input to new secret_hash. 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 "secret_hash" of different size than the session_id has. This becomes an issue when the session_id memory is zeroed or when it is used again during second key re-exchange.
Weakness: CWE-787
Which versions are affected by CVE-2021-3634?
It affects 7 products.
Linux distribution packages (11)
libssh AlmaLinux:8 | All versions | 0.9.6-3.el8 |
libssh-config AlmaLinux:8 | All versions | 0.9.6-3.el8 |
libssh-devel AlmaLinux:8 | All versions | 0.9.6-3.el8 |
libssh-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:0.9.6-3.el8 |
libssh-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:0.9.6-3.el8 |
libssh-devel Red Hat:enterprise_linux:8::appstream | All versions | 0:0.9.6-3.el8 |
libssh Red Hat:enterprise_linux:8::baseos | All versions | 0:0.9.6-3.el8 |
libssh-config Red Hat:enterprise_linux:8::baseos | All versions | 0:0.9.6-3.el8 |
libssh-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:0.9.6-3.el8 |
libssh-debugsource Red Hat:enterprise_linux:8::baseos | All versions | 0:0.9.6-3.el8 |
libssh Rocky Linux:8 | All versions | 0:0.9.6-3.el8 |
Products include Debian Debian Linux, Fedoraproject Fedora, Libssh Libssh, Netapp Cloud Backup, Oracle Mysql Workbench, Redhat Enterprise Linux and 1 more.
How do I fix CVE-2021-3634?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-3634 being exploited?
There is no known exploitation of CVE-2021-3634 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALSA-2022:2031, CLSA-2023-1685023099, CLSA-2023-1685023501, DEBIAN-CVE-2021-3634, DSA-4965-1, GHSA-4wwm-f449-qwpq and 6 more.