GLSA-202312-05 : libssh: Multiple Vulnerabilities

medium Nessus Plugin ID 187202

Description

The remote host is affected by the vulnerability described in GLSA-202312-05 (libssh: Multiple Vulnerabilities)

- 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. (CVE-2021-3634)

- A NULL pointer dereference was found In libssh during re-keying with algorithm guessing. This issue may allow an authenticated client to cause a denial of service. (CVE-2023-1667)

- A vulnerability was found in libssh, where the authentication check of the connecting client can be bypassed in the`pki_verify_data_signature` function in memory allocation problems. This issue may happen if there is insufficient memory or the memory usage is limited. The problem is caused by the return value `rc,` which is initialized to SSH_ERROR and later rewritten to save the return value of the function call `pki_key_check_hash_compatible.` The value of the variable is not changed between this point and the cryptographic verification. Therefore any error between them calls `goto error` returning SSH_OK.
(CVE-2023-2283)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

All libssh users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=net-libs/libssh-0.10.5

See Also

https://security.gentoo.org/glsa/202312-05

https://bugs.gentoo.org/show_bug.cgi?id=810517

https://bugs.gentoo.org/show_bug.cgi?id=905746

Plugin Details

Severity: Medium

ID: 187202

File Name: gentoo_GLSA-202312-05.nasl

Version: 1.0

Type: local

Published: 12/22/2023

Updated: 12/22/2023

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Low

Score: 3.6

CVSS v2

Risk Factor: Medium

Base Score: 4

Temporal Score: 3.1

Vector: CVSS2#AV:N/AC:L/Au:S/C:N/I:N/A:P

CVSS Score Source: CVE-2021-3634

CVSS v3

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 5.9

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2023-2283

Vulnerability Information

CPE: cpe:/o:gentoo:linux, p-cpe:/a:gentoo:linux:libssh

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/22/2023

Vulnerability Publication Date: 8/31/2021

Reference Information

CVE: CVE-2021-3634, CVE-2023-1667, CVE-2023-2283