Në bibliotekën libssh (mos e konfuzoni me libssh2), e cila është dizajnuar për të shtuar mbështetje për klientin dhe serverin për protokollin SSHv2 në programet e shkruara në gjuhën C, është zbuluar një dobësi (CVE-2021-3634) që çon në një tejkalim të buffers në procesin e iniciimit të ndryshimit të çelësit (rekey) duke përdorur mekanizmin e ndryshimit të çelësit që aplikon një algoritëm të ndryshëm të hashimit. Problemi është zgjidhur në versionin 0.9.6.
The core issue is that the key exchange operation allows the use of cryptographic hashes with a digest size different from the one initially used in the algorithm. In this case, memory for the hash in libssh was allocated based on the original hash size, and using a larger hash results in overwriting data beyond the allocated buffer. As a fallback method of protection, one could restrict the list of supported key exchange methods to algorithms with the same hash size. For example, to bind to SHA256 in the code, you can add: rc = ssh_options_set(s->ssh.session, SSH_OPTIONS_KEY_EXCHANGE, "diffie-hellman-group14-sha256,curve25519-sha256,ecdh-sha2-nistp256");
Burimi: opennet.ru
